mirror of
https://github.com/Equicord/Equicord.git
synced 2025-02-15 00:23:40 -05:00
Merge branch 'dev'
This commit is contained in:
commit
4428c93191
5 changed files with 47 additions and 35 deletions
|
@ -4,6 +4,8 @@
|
||||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { MouseEvent } from "react";
|
||||||
|
|
||||||
import { useEffect, useState } from "..";
|
import { useEffect, useState } from "..";
|
||||||
import { SortOptions } from "../types";
|
import { SortOptions } from "../types";
|
||||||
import { SortIcon } from "./Icons";
|
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 [pos, setPos] = useState({ x: 0, y: 0 });
|
||||||
const [showMenu, setShowMenu] = useState(false);
|
const [showMenu, setShowMenu] = useState(false);
|
||||||
|
|
||||||
function rightClickContextMenu(e) {
|
function rightClickContextMenu(e: MouseEvent<HTMLButtonElement, MouseEvent>) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
window.dispatchEvent(new Event("click"));
|
window.dispatchEvent(new Event("click"));
|
||||||
setShowMenu(!showMenu);
|
setShowMenu(!showMenu);
|
||||||
|
@ -80,6 +82,6 @@ export default function ({ sort, onSortChange }: { sort: SortOptions, onSortChan
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
</nav> : null}
|
</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
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { MouseEvent } from "react";
|
||||||
|
|
||||||
import { useEffect, useRef, useState } from "..";
|
import { useEffect, useRef, useState } from "..";
|
||||||
|
|
||||||
export default function ({ onClick, onForceReload }: { onClick: () => void, onForceReload: () => void; }) {
|
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 [pos, setPos] = useState({ x: 0, y: 0 });
|
||||||
const [showMenu, setShowMenu] = useState(false);
|
const [showMenu, setShowMenu] = useState(false);
|
||||||
|
|
||||||
function rightClickContextMenu(e) {
|
function rightClickContextMenu(e: MouseEvent<HTMLButtonElement, MouseEvent>) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
window.dispatchEvent(new Event("click"));
|
window.dispatchEvent(new Event("click"));
|
||||||
setShowMenu(!showMenu);
|
setShowMenu(!showMenu);
|
||||||
|
@ -69,7 +71,7 @@ export default function ({ onClick, onForceReload }: { onClick: () => void, onFo
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
</nav> : null}
|
</nav> : null}
|
||||||
<button className="colorwaysPillButton" onContextMenu={rightClickContextMenu} onClick={onClick}>
|
<button className="colorwaysPillButton" onContextMenu={() => rightClickContextMenu} onClick={onClick}>
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
x="0px"
|
x="0px"
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { MouseEvent } from "react";
|
||||||
|
|
||||||
import { useEffect, useRef, useState } from "..";
|
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; }) {
|
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 [showMenu, setShowMenu] = useState(false);
|
||||||
const [current, setCurrent] = useState(source);
|
const [current, setCurrent] = useState(source);
|
||||||
|
|
||||||
function rightClickContextMenu(e) {
|
function rightClickContextMenu(e: MouseEvent<HTMLButtonElement, MouseEvent>) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
window.dispatchEvent(new Event("click"));
|
window.dispatchEvent(new Event("click"));
|
||||||
setShowMenu(!showMenu);
|
setShowMenu(!showMenu);
|
||||||
|
@ -56,6 +58,6 @@ export default function ({ source, sources, onSourceChange }: { source: { name:
|
||||||
</button>;
|
</button>;
|
||||||
})}
|
})}
|
||||||
</nav> : null}
|
</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 no-descending-specificity */
|
||||||
/* stylelint-disable declaration-block-no-redundant-longhand-properties */
|
/* stylelint-disable declaration-block-no-redundant-longhand-properties */
|
||||||
/* stylelint-disable selector-id-pattern */
|
/* stylelint-disable selector-id-pattern */
|
||||||
|
@ -40,16 +39,19 @@
|
||||||
height: 50%;
|
height: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.discordColorwayPreviewColorContainer:not(:has(> .discordColorwayPreviewColor:nth-child(2)))>.discordColorwayPreviewColor {
|
.discordColorwayPreviewColorContainer:not(:has(> .discordColorwayPreviewColor:nth-child(2)))
|
||||||
|
> .discordColorwayPreviewColor {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.discordColorwayPreviewColorContainer:not(:has(> .discordColorwayPreviewColor:nth-child(3)))>.discordColorwayPreviewColor {
|
.discordColorwayPreviewColorContainer:not(:has(> .discordColorwayPreviewColor:nth-child(3)))
|
||||||
|
> .discordColorwayPreviewColor {
|
||||||
height: 100%;
|
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%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,7 +179,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.colorwaysSettings-switch {
|
.colorwaysSettings-switch {
|
||||||
background-color: rgb(85, 87, 94);
|
background-color: rgb(85 87 94);
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
border-radius: 14px;
|
border-radius: 14px;
|
||||||
|
@ -1053,7 +1055,10 @@
|
||||||
flex: 0 0 min-content;
|
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;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1455,14 +1460,14 @@
|
||||||
|
|
||||||
.dc-colorway-settings::before {
|
.dc-colorway-settings::before {
|
||||||
/* stylelint-disable-next-line property-no-vendor-prefix */
|
/* stylelint-disable-next-line property-no-vendor-prefix */
|
||||||
-webkit-mask: var(--si-vencordsettings) center/contain no-repeat !important;
|
-webkit-mask: var(--si-equicordsettings) center/contain no-repeat !important;
|
||||||
mask: var(--si-vencordsettings) center/contain no-repeat !important;
|
mask: var(--si-equicordsettings) center/contain no-repeat !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dc-colorway-ondemand::before {
|
.dc-colorway-ondemand::before {
|
||||||
/* stylelint-disable-next-line property-no-vendor-prefix */
|
/* stylelint-disable-next-line property-no-vendor-prefix */
|
||||||
-webkit-mask: var(--si-vencordupdater) center/contain no-repeat !important;
|
-webkit-mask: var(--si-equicordupdater) center/contain no-repeat !important;
|
||||||
mask: var(--si-vencordupdater) center/contain no-repeat !important;
|
mask: var(--si-equicordupdater) center/contain no-repeat !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dc-colorway-sources-manager::before {
|
.dc-colorway-sources-manager::before {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* stylelint-disable color-function-notation */
|
/* stylelint-disable property-no-vendor-prefix */
|
||||||
.colorwaySelectorModal[data-theme="discord"],
|
.colorwaySelectorModal[data-theme="discord"],
|
||||||
.colorwayModal[data-theme="discord"] {
|
.colorwayModal[data-theme="discord"] {
|
||||||
border: none;
|
border: none;
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-theme="discord"] .colorwaysSettings-switch {
|
[data-theme="discord"] .colorwaysSettings-switch {
|
||||||
background-color: rgb(128, 132, 142);
|
background-color: rgb(128 132 142);
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-theme="discord"] .colorwaysSettings-switch.checked {
|
[data-theme="discord"] .colorwaysSettings-switch.checked {
|
||||||
|
@ -62,6 +62,7 @@
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
padding: 2px 16px;
|
padding: 2px 16px;
|
||||||
|
-moz-user-select: none;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,7 +135,7 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
text-indent: 0;
|
text-indent: 0;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 12px;
|
font-size: 0.625rem;
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue