mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-18 21:33:35 -05:00
Fixes
This commit is contained in:
parent
9ac31fa936
commit
029a0500d8
5 changed files with 47 additions and 35 deletions
|
@ -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<HTMLButtonElement, MouseEvent>) {
|
||||
e.stopPropagation();
|
||||
window.dispatchEvent(new Event("click"));
|
||||
setShowMenu(!showMenu);
|
||||
|
@ -80,6 +82,6 @@ export default function ({ sort, onSortChange }: { sort: SortOptions, onSortChan
|
|||
</svg>
|
||||
</button>
|
||||
</nav> : null}
|
||||
<button className="colorwaysPillButton" onClick={rightClickContextMenu}><SortIcon width={14} height={14} /> Sort By...</button>
|
||||
<button className="colorwaysPillButton" onClick={() => rightClickContextMenu}><SortIcon width={14} height={14} /> Sort By...</button>
|
||||
</>;
|
||||
}
|
||||
|
|
|
@ -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<HTMLButtonElement, MouseEvent>) {
|
||||
e.stopPropagation();
|
||||
window.dispatchEvent(new Event("click"));
|
||||
setShowMenu(!showMenu);
|
||||
|
@ -69,7 +71,7 @@ export default function ({ onClick, onForceReload }: { onClick: () => void, onFo
|
|||
</svg>
|
||||
</button>
|
||||
</nav> : null}
|
||||
<button className="colorwaysPillButton" onContextMenu={rightClickContextMenu} onClick={onClick}>
|
||||
<button className="colorwaysPillButton" onContextMenu={() => rightClickContextMenu} onClick={onClick}>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
x="0px"
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { MouseEvent } from "react";
|
||||
|
||||
import { useEffect, useRef, useState } from "..";
|
||||
|
||||
export default function ({ source, sources, onSourceChange }: { source: { name: string, id: string; }, sources: { name: string, id: string; }[], onSourceChange: (sourceId: string) => void; }) {
|
||||
|
@ -12,7 +14,7 @@ export default function ({ source, sources, onSourceChange }: { source: { name:
|
|||
const [showMenu, setShowMenu] = useState(false);
|
||||
const [current, setCurrent] = useState(source);
|
||||
|
||||
function rightClickContextMenu(e) {
|
||||
function rightClickContextMenu(e: MouseEvent<HTMLButtonElement, MouseEvent>) {
|
||||
e.stopPropagation();
|
||||
window.dispatchEvent(new Event("click"));
|
||||
setShowMenu(!showMenu);
|
||||
|
@ -56,6 +58,6 @@ export default function ({ source, sources, onSourceChange }: { source: { name:
|
|||
</button>;
|
||||
})}
|
||||
</nav> : null}
|
||||
<button className="colorwaysPillButton" onClick={rightClickContextMenu}>Source: {current.name}</button>
|
||||
<button className="colorwaysPillButton" onClick={() => rightClickContextMenu}>Source: {current.name}</button>
|
||||
</>;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue