From 029a0500d8bc1b95b0a6309a961dbbd1d952cda2 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Wed, 21 Aug 2024 23:13:33 -0400 Subject: [PATCH] Fixes --- .../components/FiltersMenu.tsx | 6 +- .../components/ReloadButton.tsx | 6 +- .../components/SourcesMenu.tsx | 6 +- .../discordColorways/style.css | 57 ++++++++++--------- .../discordColorways/theme.discord.css | 7 ++- 5 files changed, 47 insertions(+), 35 deletions(-) diff --git a/src/equicordplugins/discordColorways/components/FiltersMenu.tsx b/src/equicordplugins/discordColorways/components/FiltersMenu.tsx index 75f275ae..4adebcff 100644 --- a/src/equicordplugins/discordColorways/components/FiltersMenu.tsx +++ b/src/equicordplugins/discordColorways/components/FiltersMenu.tsx @@ -4,6 +4,8 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ +import { MouseEvent } from "react"; + import { useEffect, useState } from ".."; import { SortOptions } from "../types"; import { SortIcon } from "./Icons"; @@ -12,7 +14,7 @@ export default function ({ sort, onSortChange }: { sort: SortOptions, onSortChan const [pos, setPos] = useState({ x: 0, y: 0 }); const [showMenu, setShowMenu] = useState(false); - function rightClickContextMenu(e) { + function rightClickContextMenu(e: MouseEvent) { e.stopPropagation(); window.dispatchEvent(new Event("click")); setShowMenu(!showMenu); @@ -80,6 +82,6 @@ export default function ({ sort, onSortChange }: { sort: SortOptions, onSortChan : null} - + ; } diff --git a/src/equicordplugins/discordColorways/components/ReloadButton.tsx b/src/equicordplugins/discordColorways/components/ReloadButton.tsx index c0acde87..010fdcb5 100644 --- a/src/equicordplugins/discordColorways/components/ReloadButton.tsx +++ b/src/equicordplugins/discordColorways/components/ReloadButton.tsx @@ -4,6 +4,8 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ +import { MouseEvent } from "react"; + import { useEffect, useRef, useState } from ".."; export default function ({ onClick, onForceReload }: { onClick: () => void, onForceReload: () => void; }) { @@ -11,7 +13,7 @@ export default function ({ onClick, onForceReload }: { onClick: () => void, onFo const [pos, setPos] = useState({ x: 0, y: 0 }); const [showMenu, setShowMenu] = useState(false); - function rightClickContextMenu(e) { + function rightClickContextMenu(e: MouseEvent) { e.stopPropagation(); window.dispatchEvent(new Event("click")); setShowMenu(!showMenu); @@ -69,7 +71,7 @@ export default function ({ onClick, onForceReload }: { onClick: () => void, onFo : null} - ; })} : null} - + ; } diff --git a/src/equicordplugins/discordColorways/style.css b/src/equicordplugins/discordColorways/style.css index e44ba331..623aae80 100644 --- a/src/equicordplugins/discordColorways/style.css +++ b/src/equicordplugins/discordColorways/style.css @@ -1,4 +1,3 @@ -/* stylelint-disable color-function-notation */ /* stylelint-disable no-descending-specificity */ /* stylelint-disable declaration-block-no-redundant-longhand-properties */ /* stylelint-disable selector-id-pattern */ @@ -40,16 +39,19 @@ height: 50%; } -.discordColorwayPreviewColorContainer:not(:has(> .discordColorwayPreviewColor:nth-child(2)))>.discordColorwayPreviewColor { +.discordColorwayPreviewColorContainer:not(:has(> .discordColorwayPreviewColor:nth-child(2))) + > .discordColorwayPreviewColor { height: 100%; width: 100%; } -.discordColorwayPreviewColorContainer:not(:has(> .discordColorwayPreviewColor:nth-child(3)))>.discordColorwayPreviewColor { +.discordColorwayPreviewColorContainer:not(:has(> .discordColorwayPreviewColor:nth-child(3))) + > .discordColorwayPreviewColor { height: 100%; } -.discordColorwayPreviewColorContainer:not(:has(> .discordColorwayPreviewColor:nth-child(4)))>.discordColorwayPreviewColor:nth-child(3) { +.discordColorwayPreviewColorContainer:not(:has(> .discordColorwayPreviewColor:nth-child(4))) + > .discordColorwayPreviewColor:nth-child(3) { width: 100%; } @@ -177,7 +179,7 @@ } .colorwaysSettings-switch { - background-color: rgb(85, 87, 94); + background-color: rgb(85 87 94); flex: 0 0 auto; position: relative; border-radius: 14px; @@ -389,8 +391,8 @@ color: var(--brand-500); } -.colorwayCreator-colorPreviews>[class^="colorSwatch"], -.colorwayCreator-colorPreviews>[class^="colorSwatch"]>[class^="swatch"] { +.colorwayCreator-colorPreviews > [class^="colorSwatch"], +.colorwayCreator-colorPreviews > [class^="colorSwatch"] > [class^="swatch"] { width: 100%; border: none; position: relative; @@ -408,7 +410,7 @@ pointer-events: none; } -.colorwayCreator-colorPreviews>.colorSwatch-2UxEuG:has([fill="var(--primary-530)"])>.colorwaysPicker-colorLabel { +.colorwayCreator-colorPreviews > .colorSwatch-2UxEuG:has([fill="var(--primary-530)"]) > .colorwaysPicker-colorLabel { color: var(--primary-530); } @@ -553,7 +555,7 @@ max-height: 185px; } -.colorwaysCreator-settingCat-collapsed> :is(.colorwaysCreator-settingsList, .colorwayInfo-cssCodeblock), +.colorwaysCreator-settingCat-collapsed > :is(.colorwaysCreator-settingsList, .colorwayInfo-cssCodeblock), .colorwaysColorpicker-collapsed { display: none !important; } @@ -594,7 +596,7 @@ pointer-events: all; } -.colorwaysPreview-modal>.colorwaysPreview-wrapper { +.colorwaysPreview-modal > .colorwaysPreview-wrapper { height: 100%; } @@ -792,11 +794,11 @@ flex: 1 0 auto; } -.colorwayPreview-channels>.colorwayPreview-topShadow { +.colorwayPreview-channels > .colorwayPreview-topShadow { border-top-left-radius: 8px; } -.colorwayPreview-channels>.colorwayPreview-topShadow:hover { +.colorwayPreview-channels > .colorwayPreview-topShadow:hover { background-color: hsl(var(--primary-500-hsl) / 30%); } @@ -1035,14 +1037,14 @@ align-items: end; } -.is-mobile .colorwaySelector-doublePillBar>.colorwaySelector-pillWrapper:first-child { +.is-mobile .colorwaySelector-doublePillBar > .colorwaySelector-pillWrapper:first-child { width: 100%; gap: 4px; overflow-x: auto; justify-content: space-between; } -.is-mobile .colorwaySelector-doublePillBar>.colorwaySelector-pillWrapper:first-child>.colorwaySelector-pill { +.is-mobile .colorwaySelector-doublePillBar > .colorwaySelector-pillWrapper:first-child > .colorwaySelector-pill { border-radius: 0; border-top: none; border-left: none; @@ -1053,7 +1055,10 @@ flex: 0 0 min-content; } -.is-mobile .colorwaySelector-doublePillBar>.colorwaySelector-pillWrapper:first-child>.colorwaySelector-pillSeparator { +.is-mobile + .colorwaySelector-doublePillBar + > .colorwaySelector-pillWrapper:first-child + > .colorwaySelector-pillSeparator { display: none; } @@ -1310,10 +1315,10 @@ background-color: var(--brand-experiment) !important; } -.colorwayCreator-colorPreview_primary+.colorwayCreator-colorPreview_primary, -.colorwayCreator-colorPreview_secondary+.colorwayCreator-colorPreview_secondary, -.colorwayCreator-colorPreview_tertiary+.colorwayCreator-colorPreview_tertiary, -.colorwayCreator-colorPreview_accent+.colorwayCreator-colorPreview_accent { +.colorwayCreator-colorPreview_primary + .colorwayCreator-colorPreview_primary, +.colorwayCreator-colorPreview_secondary + .colorwayCreator-colorPreview_secondary, +.colorwayCreator-colorPreview_tertiary + .colorwayCreator-colorPreview_tertiary, +.colorwayCreator-colorPreview_accent + .colorwayCreator-colorPreview_accent { display: none; } @@ -1455,14 +1460,14 @@ .dc-colorway-settings::before { /* stylelint-disable-next-line property-no-vendor-prefix */ - -webkit-mask: var(--si-vencordsettings) center/contain no-repeat !important; - mask: var(--si-vencordsettings) center/contain no-repeat !important; + -webkit-mask: var(--si-equicordsettings) center/contain no-repeat !important; + mask: var(--si-equicordsettings) center/contain no-repeat !important; } .dc-colorway-ondemand::before { /* stylelint-disable-next-line property-no-vendor-prefix */ - -webkit-mask: var(--si-vencordupdater) center/contain no-repeat !important; - mask: var(--si-vencordupdater) center/contain no-repeat !important; + -webkit-mask: var(--si-equicordupdater) center/contain no-repeat !important; + mask: var(--si-equicordupdater) center/contain no-repeat !important; } .dc-colorway-sources-manager::before { @@ -1687,7 +1692,7 @@ gap: 8px; } -.colorwaysModalFooter>.colorwaysPillButton { +.colorwaysModalFooter > .colorwaysPillButton { width: 100%; } @@ -1787,7 +1792,7 @@ border-top-color: var(--background-floating); } -.colorwaysTooltip-right>.colorwaysTooltipPointer { +.colorwaysTooltip-right > .colorwaysTooltipPointer { position: absolute; right: 100%; top: 50%; @@ -1837,6 +1842,6 @@ font-size: 12; } -.colorwaysManagerConnectionValue>b { +.colorwaysManagerConnectionValue > b { color: #a0a6ae; } diff --git a/src/equicordplugins/discordColorways/theme.discord.css b/src/equicordplugins/discordColorways/theme.discord.css index 123ce223..6c7cdb65 100644 --- a/src/equicordplugins/discordColorways/theme.discord.css +++ b/src/equicordplugins/discordColorways/theme.discord.css @@ -1,4 +1,4 @@ -/* stylelint-disable color-function-notation */ +/* stylelint-disable property-no-vendor-prefix */ .colorwaySelectorModal[data-theme="discord"], .colorwayModal[data-theme="discord"] { border: none; @@ -20,7 +20,7 @@ } [data-theme="discord"] .colorwaysSettings-switch { - background-color: rgb(128, 132, 142); + background-color: rgb(128 132 142); } [data-theme="discord"] .colorwaysSettings-switch.checked { @@ -62,6 +62,7 @@ font-weight: 500; line-height: 16px; padding: 2px 16px; + -moz-user-select: none; user-select: none; } @@ -134,7 +135,7 @@ align-items: center; text-indent: 0; font-weight: 600; - font-size: 12px; + font-size: 0.625rem; line-height: 16px; }