Fix CallTimer FullSearchContext & BetterSettings
This commit is contained in:
parent
91fea027da
commit
329b331abe
4 changed files with 53 additions and 12 deletions
|
|
@ -1114,3 +1114,31 @@ export function EquicordIcon(props: IconProps) {
|
|||
</Icon>
|
||||
);
|
||||
}
|
||||
|
||||
export function UserIcon(props: IconProps) {
|
||||
return (
|
||||
<Icon
|
||||
{...props}
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
fill={props.fill || "currentColor"}
|
||||
d="M12 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM11.53 11A9.53 9.53 0 0 0 2 20.53c0 .81.66 1.47 1.47 1.47h.22c.24 0 .44-.17.5-.4.29-1.12.84-2.17 1.32-2.91.14-.21.43-.1.4.15l-.26 2.61c-.02.3.2.55.5.55h11.7a.5.5 0 0 0 .5-.55l-.27-2.6c-.02-.26.27-.37.41-.16.48.74 1.03 1.8 1.32 2.9.06.24.26.41.5.41h.22c.81 0 1.47-.66 1.47-1.47A9.53 9.53 0 0 0 12.47 11h-.94Z"
|
||||
/>
|
||||
</Icon>
|
||||
);
|
||||
}
|
||||
|
||||
export function PencilSparkleIcon(props: IconProps) {
|
||||
return (
|
||||
<Icon
|
||||
{...props}
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
fill={props.fill || "currentColor"}
|
||||
d="M6.3 2.55a.85.85 0 0 0-1.6 0l-.35.97a1.4 1.4 0 0 1-.83.83l-.97.35a.85.85 0 0 0 0 1.6l.97.35c.38.15.68.45.83.83l.35.97a.85.85 0 0 0 1.6 0l.35-.97c.15-.38.45-.68.83-.83l.97-.35a.85.85 0 0 0 0-1.6l-.97-.35a1.4 1.4 0 0 1-.83-.83l-.35-.97ZM13.96 5.46l4.58 4.58a1 1 0 0 0 1.42 0l1.38-1.38a2 2 0 0 0 0-2.82l-3.18-3.18a2 2 0 0 0-2.82 0l-1.38 1.38a1 1 0 0 0 0 1.42ZM2.11 20.16l.73-4.22a3 3 0 0 1 .83-1.61l7.87-7.87a1 1 0 0 1 1.42 0l4.58 4.58a1 1 0 0 1 0 1.42l-7.87 7.87a3 3 0 0 1-1.6.83l-4.23.73a1.5 1.5 0 0 1-1.73-1.73ZM18.48 15.71a1.1 1.1 0 0 1 2.04 0l.46 1.24c.19.5.57.88 1.07 1.07l1.24.46c.95.35.95 1.7 0 2.04l-1.24.46c-.5.19-.88.57-1.07 1.07l-.46 1.24a1.1 1.1 0 0 1-2.04 0l-.46-1.24a1.8 1.8 0 0 0-1.07-1.07l-1.24-.46a1.1 1.1 0 0 1 0-2.04l1.24-.46c.5-.19.88-.57 1.07-1.07l.46-1.24Z"
|
||||
/>
|
||||
</Icon>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,10 +6,11 @@
|
|||
|
||||
import { definePluginSettings } from "@api/Settings";
|
||||
import { disableStyle, enableStyle } from "@api/Styles";
|
||||
import { AppsIcon, CreditCardIcon, DeveloperIcon, EquicordIcon, GameControllerIcon, MainSettingsIcon, ShieldIcon } from "@components/Icons";
|
||||
import { AppsIcon, CreditCardIcon, DeveloperIcon, EquicordIcon, GameControllerIcon, MainSettingsIcon, PencilSparkleIcon, UserIcon } from "@components/Icons";
|
||||
import { buildPluginMenuEntries, buildThemeMenuEntries } from "@equicordplugins/equicordToolbox/menu";
|
||||
import { Devs } from "@utils/constants";
|
||||
import { classNameFactory } from "@utils/css";
|
||||
import { getIntlMessage } from "@utils/discord";
|
||||
import { Logger } from "@utils/Logger";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { Icon } from "@vencord/discord-types";
|
||||
|
|
@ -23,13 +24,14 @@ const cl = classNameFactory("");
|
|||
const Classes = findCssClassesLazy("animating", "baseLayer", "bg", "layer", "layers");
|
||||
|
||||
const SECTION_ICONS: Record<string, Icon> = {
|
||||
user_section: MainSettingsIcon,
|
||||
profile_section: PencilSparkleIcon,
|
||||
user_section: UserIcon,
|
||||
equicord_section: EquicordIcon,
|
||||
billing_section: CreditCardIcon,
|
||||
app_section: AppsIcon,
|
||||
activity_section: GameControllerIcon,
|
||||
developer_section: DeveloperIcon,
|
||||
staff_only_section: ShieldIcon,
|
||||
utility_section: MainSettingsIcon,
|
||||
};
|
||||
|
||||
const settings = definePluginSettings({
|
||||
|
|
@ -191,6 +193,11 @@ export default definePlugin({
|
|||
|
||||
transformSettingsEntries(list) {
|
||||
const items: ReactNode[] = [];
|
||||
const SECTION_NAMES: Record<string, string> = {
|
||||
profile_section: getIntlMessage("EDIT_PROFILES"),
|
||||
user_section: getIntlMessage("ACCOUNT_SETTINGS"),
|
||||
utility_section: getIntlMessage("USER_SETTINGS_KEYBINDS_MISCELLANEOUS_SECTION_TITLE")
|
||||
};
|
||||
|
||||
for (const item of list) {
|
||||
const { key, props } = item;
|
||||
|
|
@ -206,13 +213,13 @@ export default definePlugin({
|
|||
{children}
|
||||
</Menu.MenuItem>
|
||||
);
|
||||
} else if (key.endsWith("_section") && props.label) {
|
||||
} else if (key.endsWith("_section") && (props.label ?? SECTION_NAMES[key])) {
|
||||
const iconLeft = SECTION_ICONS[key];
|
||||
items.push(
|
||||
<Menu.MenuItem
|
||||
key={key}
|
||||
label={props.label}
|
||||
id={props.label}
|
||||
label={props.label ?? SECTION_NAMES[key]}
|
||||
id={props.label ?? SECTION_NAMES[key]}
|
||||
{...(iconLeft && { iconLeft })}
|
||||
>
|
||||
{this.transformSettingsEntries(props.children)}
|
||||
|
|
|
|||
|
|
@ -137,11 +137,17 @@ export default definePlugin({
|
|||
},
|
||||
{
|
||||
find: "renderConnectionStatus(){",
|
||||
replacement: {
|
||||
match: /(renderConnectionStatus\(\).{0,1000}?lineClamp:1,children:)(\i)(?=,|}\))/,
|
||||
replace: "$1[$2,$self.renderConnectionTimer({ channelId: this?.props?.channel?.id })]"
|
||||
}
|
||||
}
|
||||
replacement: [
|
||||
{
|
||||
match: /(renderConnectionStatus\(\).{0,1000}?lineClamp:1,children:)(\i)(?=,|}\))/,
|
||||
replace: "$1[$2,$self.renderConnectionTimer({ channelId: this?.props?.channel?.id })]"
|
||||
},
|
||||
{
|
||||
match: /("RTCConnectionMenu".{0,100}?lineClamp:1,children:)(\i)(?=,|}\))/,
|
||||
replace: "$1[$2,$self.renderConnectionTimer({ channelId: this?.props?.channel?.id })]"
|
||||
}
|
||||
]
|
||||
},
|
||||
],
|
||||
|
||||
flux: {
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ export default definePlugin({
|
|||
authors: [Devs.Ven, Devs.Aria],
|
||||
|
||||
patches: [{
|
||||
find: "onClick:this.handleMessageClick,",
|
||||
find: "Listbox navigator was given an unhandled action",
|
||||
replacement: {
|
||||
match: /this(?=\.handleContextMenu\(\i,\i\))/,
|
||||
replace: "$self"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue