Fix Patches
This commit is contained in:
parent
7aebbe9707
commit
f286aaa02f
5 changed files with 25 additions and 27 deletions
|
|
@ -4,8 +4,6 @@
|
|||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import "./standingButton.css";
|
||||
|
||||
import { ApplicationCommandInputType, sendBotMessage } from "@api/Commands";
|
||||
import { HeaderBarButton } from "@api/HeaderBar";
|
||||
import { addMessagePreSendListener, removeMessagePreSendListener } from "@api/MessageEvents";
|
||||
|
|
@ -44,6 +42,7 @@ const StandingConfig: Record<number, { label: string; hoverColor: string; Icon:
|
|||
function StandingButton() {
|
||||
const standing = useStateFromStores([SafetyHubStore], () => SafetyHubStore.getAccountStanding());
|
||||
const isInitialized = useStateFromStores([SafetyHubStore], () => SafetyHubStore.isInitialized());
|
||||
const [hovered, setHovered] = React.useState(false);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (!isInitialized) fetchSafetyHub().catch(() => { });
|
||||
|
|
@ -52,12 +51,14 @@ function StandingButton() {
|
|||
const config = StandingConfig[standing?.state] ?? StandingConfig[StandingState.ALL_GOOD];
|
||||
|
||||
return (
|
||||
<HeaderBarButton
|
||||
tooltip={config.label}
|
||||
position="bottom"
|
||||
icon={props => <config.Icon {...props} className="vc-eqh-standing" style={{ "--vc-eqh-standing-hover": config.hoverColor } as React.CSSProperties} />}
|
||||
onClick={() => SettingsRouter.openUserSettings("account_standing_panel")}
|
||||
/>
|
||||
<div style={{ display: "contents" }} onMouseEnter={() => setHovered(true)} onMouseLeave={() => setHovered(false)}>
|
||||
<HeaderBarButton
|
||||
tooltip={config.label}
|
||||
position="bottom"
|
||||
icon={props => <config.Icon {...props} color={hovered ? config.hoverColor : "currentColor"} />}
|
||||
onClick={() => SettingsRouter.openUserSettings("my_account_panel")}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
.vc-eqh-standing {
|
||||
color: currentcolor;
|
||||
transition: color 120ms ease;
|
||||
}
|
||||
|
||||
[role="button"] {
|
||||
--vc-eqh-standing-hover: currentcolor;
|
||||
}
|
||||
|
||||
[role="button"]:hover > .vc-eqh-standing {
|
||||
color: var(--vc-eqh-standing-hover, currentcolor);
|
||||
}
|
||||
|
|
@ -316,9 +316,7 @@ export default definePlugin({
|
|||
},
|
||||
// Allow users to use custom client themes
|
||||
{
|
||||
find: "customUserThemeSettings:{",
|
||||
// Discord has two separate modules for treatments 1 and 2
|
||||
all: true,
|
||||
find: '"custom_themes_editor_footer"',
|
||||
replacement: {
|
||||
match: /(?<=\i=)\(0,\i\.\i\)\(\i\.\i\.TIER_2\)(?=,|;)/g,
|
||||
replace: "true"
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ export default definePlugin({
|
|||
predicate: () => settings.store.showMode === ShowMode.LockIcon,
|
||||
replacement: {
|
||||
// Lock Icon
|
||||
match: /(?<=(\i)\.isNSFW\(\);)switch\(\i\.type\)/,
|
||||
match: /(?<=(\i)\.isNSFW\(\);)switch\(\i\.type\).{0,15}\.GUILD_ANNOUNCEMENT/,
|
||||
replace: (m, channel) => `if($self.isHiddenChannel(${channel}))return $self.LockIcon;${m}`
|
||||
}
|
||||
},
|
||||
|
|
@ -506,6 +506,13 @@ export default definePlugin({
|
|||
match: /(?=function (\i)\(\i\){let{channel:.{0,200}?getSortedRoles\()/,
|
||||
replace: "$self.ChannelBeginHeader=$1;"
|
||||
}
|
||||
},
|
||||
{
|
||||
find: "2026-02-private-channel-hiding",
|
||||
replacement: {
|
||||
match: /(function \i\(\i\)).{0,50}\.enableObfuscation\}/g,
|
||||
replace: "$1{return false;}"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
|
|
@ -582,7 +589,7 @@ export default definePlugin({
|
|||
aria-hidden={true}
|
||||
role="img"
|
||||
>
|
||||
<path fill="currentcolor" fillRule="evenodd" d="M17 11V7C17 4.243 14.756 2 12 2C9.242 2 7 4.243 7 7V11C5.897 11 5 11.896 5 13V20C5 21.103 5.897 22 7 22H17C18.103 22 19 21.103 19 20V13C19 11.896 18.103 11 17 11ZM12 18C11.172 18 10.5 17.328 10.5 16.5C10.5 15.672 11.172 15 12 15C12.828 15 13.5 15.672 13.5 16.5C13.5 17.328 12.828 18 12 18ZM15 11H9V7C9 5.346 10.346 4 12 4C13.654 4 15 5.346 15 7V11Z" />
|
||||
<path fillRule="evenodd" d="M17 11V7C17 4.243 14.756 2 12 2C9.242 2 7 4.243 7 7V11C5.897 11 5 11.896 5 13V20C5 21.103 5.897 22 7 22H17C18.103 22 19 21.103 19 20V13C19 11.896 18.103 11 17 11ZM12 18C11.172 18 10.5 17.328 10.5 16.5C10.5 15.672 11.172 15 12 15C12.828 15 13.5 15.672 13.5 16.5C13.5 17.328 12.828 18 12 18ZM15 11H9V7C9 5.346 10.346 4 12 4C13.654 4 15 5.346 15 7V11Z" />
|
||||
</svg>
|
||||
), { noop: true }),
|
||||
|
||||
|
|
@ -599,7 +606,7 @@ export default definePlugin({
|
|||
aria-hidden={true}
|
||||
role="img"
|
||||
>
|
||||
<path fill="currentcolor" fillRule="evenodd" d="m19.8 22.6-4.2-4.15q-.875.275-1.762.413Q12.95 19 12 19q-3.775 0-6.725-2.087Q2.325 14.825 1 11.5q.525-1.325 1.325-2.463Q3.125 7.9 4.15 7L1.4 4.2l1.4-1.4 18.4 18.4ZM12 16q.275 0 .512-.025.238-.025.513-.1l-5.4-5.4q-.075.275-.1.513-.025.237-.025.512 0 1.875 1.312 3.188Q10.125 16 12 16Zm7.3.45-3.175-3.15q.175-.425.275-.862.1-.438.1-.938 0-1.875-1.312-3.188Q13.875 7 12 7q-.5 0-.938.1-.437.1-.862.3L7.65 4.85q1.025-.425 2.1-.638Q10.825 4 12 4q3.775 0 6.725 2.087Q21.675 8.175 23 11.5q-.575 1.475-1.512 2.738Q20.55 15.5 19.3 16.45Zm-4.625-4.6-3-3q.7-.125 1.288.112.587.238 1.012.688.425.45.613 1.038.187.587.087 1.162Z" />
|
||||
<path fillRule="evenodd" d="m19.8 22.6-4.2-4.15q-.875.275-1.762.413Q12.95 19 12 19q-3.775 0-6.725-2.087Q2.325 14.825 1 11.5q.525-1.325 1.325-2.463Q3.125 7.9 4.15 7L1.4 4.2l1.4-1.4 18.4 18.4ZM12 16q.275 0 .512-.025.238-.025.513-.1l-5.4-5.4q-.075.275-.1.513-.025.237-.025.512 0 1.875 1.312 3.188Q10.125 16 12 16Zm7.3.45-3.175-3.15q.175-.425.275-.862.1-.438.1-.938 0-1.875-1.312-3.188Q13.875 7 12 7q-.5 0-.938.1-.437.1-.862.3L7.65 4.85q1.025-.425 2.1-.638Q10.825 4 12 4q3.775 0 6.725 2.087Q21.675 8.175 23 11.5q-.575 1.475-1.512 2.738Q20.55 15.5 19.3 16.45Zm-4.625-4.6-3-3q.7-.125 1.288.112.587.238 1.012.688.425.45.613 1.038.187.587.087 1.162Z" />
|
||||
</svg>
|
||||
)}
|
||||
</Tooltip>
|
||||
|
|
@ -618,7 +625,7 @@ export default definePlugin({
|
|||
aria-hidden={true}
|
||||
role="img"
|
||||
>
|
||||
<path fill="currentcolor" className="shc-evenodd-fill-current-color" d="M17 11V7C17 4.243 14.756 2 12 2C9.242 2 7 4.243 7 7V11C5.897 11 5 11.896 5 13V20C5 21.103 5.897 22 7 22H17C18.103 22 19 21.103 19 20V13C19 11.896 18.103 11 17 11ZM12 18C11.172 18 10.5 17.328 10.5 16.5C10.5 15.672 11.172 15 12 15C12.828 15 13.5 15.672 13.5 16.5C13.5 17.328 12.828 18 12 18ZM15 11H9V7C9 5.346 10.346 4 12 4C13.654 4 15 5.346 15 7V11Z" />
|
||||
<path className="shc-evenodd-fill-current-color" d="M17 11V7C17 4.243 14.756 2 12 2C9.242 2 7 4.243 7 7V11C5.897 11 5 11.896 5 13V20C5 21.103 5.897 22 7 22H17C18.103 22 19 21.103 19 20V13C19 11.896 18.103 11 17 11ZM12 18C11.172 18 10.5 17.328 10.5 16.5C10.5 15.672 11.172 15 12 15C12.828 15 13.5 15.672 13.5 16.5C13.5 17.328 12.828 18 12 18ZM15 11H9V7C9 5.346 10.346 4 12 4C13.654 4 15 5.346 15 7V11Z" />
|
||||
</svg>
|
||||
)}
|
||||
</Tooltip>
|
||||
|
|
|
|||
|
|
@ -105,3 +105,7 @@
|
|||
margin-left: 6px;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.vc-shc-channel-list-icon {
|
||||
fill: var(--channel-icon);
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue