diff --git a/src/equicordplugins/betterActivities/index.tsx b/src/equicordplugins/betterActivities/index.tsx index 847061d1..4aaa5a65 100644 --- a/src/equicordplugins/betterActivities/index.tsx +++ b/src/equicordplugins/betterActivities/index.tsx @@ -39,7 +39,7 @@ import { const cl = classNameFactory("vc-bactivities-"); -const ActivityView = findComponentByCodeLazy("onOpenGameProfile:", "USER_POPOUT_V2"); +const ActivityView = findComponentByCodeLazy(",onOpenGameProfileModal:"); // if discord one day decides to change their icon this needs to be updated const DefaultActivityIcon = findComponentByCodeLazy("M6,7 L2,7 L2,6 L6,6 L6,7 Z M8,5 L2,5 L2,4 L8,4 L8,5 Z M8,3 L2,3 L2,2 L8,2 L8,3 Z M8.88888889,0 L1.11111111,0 C0.494444444,0 0,0.494444444 0,1.11111111 L0,8.88888889 C0,9.50253861 0.497461389,10 1.11111111,10 L8.88888889,10 C9.50253861,10 10,9.50253861 10,8.88888889 L10,1.11111111 C10,0.494444444 9.5,0 8.88888889,0 Z"); diff --git a/src/equicordplugins/discordColorways/index.tsx b/src/equicordplugins/discordColorways/index.tsx index 16ca2d04..ea243e9f 100644 --- a/src/equicordplugins/discordColorways/index.tsx +++ b/src/equicordplugins/discordColorways/index.tsx @@ -12,18 +12,14 @@ import { Flex } from "@components/Flex"; import { Devs, EquicordDevs } from "@utils/constants"; import { ModalProps, openModal } from "@utils/modal"; import definePlugin from "@utils/types"; -import { findByProps } from "@webpack"; import { Button, Clipboard, Forms, - Heading, i18n, SettingsRouter, Toasts } from "@webpack/common"; -import { CSSProperties } from "react"; -import { Plugins } from "Vencord"; import AutoColorwaySelector from "./components/AutoColorwaySelector"; import ColorPickerModal from "./components/ColorPicker"; @@ -185,20 +181,6 @@ export default definePlugin({ match: /function (\i).{0,200}colorPickerFooter:/, replace: "$self.ColorPicker=$1;$&", }, - }, - { - find: "Messages.ACTIVITY_SETTINGS", - replacement: { - match: /(?<=section:(.{0,50})\.DIVIDER\}\))([,;])(?=.{0,200}(\i)\.push.{0,100}label:(\i)\.header)/, - replace: (_, sectionTypes, commaOrSemi, elements, element) => `${commaOrSemi} $self.addSettings(${elements}, ${element}, ${sectionTypes}) ${commaOrSemi}` - } - }, - { - find: "Messages.USER_SETTINGS_ACTIONS_MENU_LABEL", - replacement: { - match: /(?<=function\((\i).*?\{)(?=let \i=Object.values\(\i.\i\).*?(\i\.\i)\.open\()/, - replace: "$2.open($1);return;" - } } ], @@ -226,87 +208,48 @@ export default definePlugin({ patchedSettings: new WeakSet(), - addSettings(elements: any[], element: { header?: string; settings: string[]; }, sectionTypes: Record) { - if (this.patchedSettings.has(elements) || !this.isRightSpot(element)) return; - - this.patchedSettings.add(elements); - - elements.push(...this.makeSettingsCategories(sectionTypes)); - }, - - makeSettingsCategories(SectionTypes: Record) { - const { headerText, header } = findByProps("headerText", "header", "separator"); - return [ - { - section: SectionTypes.CUSTOM, - label: "Discord Colorways", - className: "vc-settings-header", - element: () =>
- - Discord Colorways - - - v{(Plugins.plugins.DiscordColorways as any).pluginVersion} - -
- }, - { - section: "ColorwaysSelector", - label: "Colorways", - element: () => new Promise(() => true), transitionState: 1 }} />, - className: "dc-colorway-selector" - }, - { - section: "ColorwaysSettings", - label: "Settings", - element: SettingsPage, - className: "dc-colorway-settings" - }, - { - section: "ColorwaysSourceManager", - label: "Sources", - element: SourceManager, - className: "dc-colorway-sources-manager" - }, - { - section: "ColorwaysOnDemand", - label: "On-Demand", - element: OnDemandWaysPage, - className: "dc-colorway-ondemand" - }, - { - section: "ColorwaysStore", - label: "Store", - element: Store, - className: "dc-colorway-store" - }, - { - section: SectionTypes.DIVIDER - } - ].filter(Boolean); - }, - ColorwaysButton: () => , async start() { + const customSettingsSections = ( + Vencord.Plugins.plugins.Settings as any as { + customSections: ((ID: Record) => any)[]; + } + ).customSections; + + const ColorwaysSelector = () => ({ + section: "ColorwaysSelector", + label: "Colorways Selector", + element: () => new Promise(() => true), transitionState: 1 }} />, + className: "dc-colorway-selector" + }); + const ColorwaysSettings = () => ({ + section: "ColorwaysSettings", + label: "Colorways Settings", + element: SettingsPage, + className: "dc-colorway-settings" + }); + const ColorwaysSourceManager = () => ({ + section: "ColorwaysSourceManager", + label: "Colorways Sources", + element: SourceManager, + className: "dc-colorway-sources-manager" + }); + const ColorwaysOnDemand = () => ({ + section: "ColorwaysOnDemand", + label: "Colorways On-Demand", + element: OnDemandWaysPage, + className: "dc-colorway-ondemand" + }); + const ColorwaysStore = () => ({ + section: "ColorwaysStore", + label: "Colorways Store", + element: Store, + className: "dc-colorway-store" + }); + + customSettingsSections.push(ColorwaysSelector, ColorwaysSettings, ColorwaysSourceManager, ColorwaysOnDemand, ColorwaysStore); + addServerListElement(ServerListRenderPosition.In, this.ColorwaysButton); enableStyle(style); @@ -412,5 +355,16 @@ export default definePlugin({ disableStyle(style); ColorwayCSS.remove(); removeAccessory("colorways-btn"); + const customSettingsSections = ( + Vencord.Plugins.plugins.Settings as any as { + customSections: ((ID: Record) => any)[]; + } + ).customSections; + + const i = customSettingsSections.findIndex( + section => section({}).id === ("ColorwaysSelector" || "ColorwaysSettings" || "ColorwaysSourceManager" || "ColorwaysOnDemand" || "ColorwaysStore") + ); + + if (i !== -1) customSettingsSections.splice(i, 1); }, }); diff --git a/src/equicordplugins/messageLoggerEnhanced/index.tsx b/src/equicordplugins/messageLoggerEnhanced/index.tsx index f95049e1..a35db3c4 100644 --- a/src/equicordplugins/messageLoggerEnhanced/index.tsx +++ b/src/equicordplugins/messageLoggerEnhanced/index.tsx @@ -595,8 +595,8 @@ export default definePlugin({ { find: "THREAD_STARTER_MESSAGE?null===", replacement: { - match: /(?<=null!=\i\.edited_timestamp\)return )\i\(\i,.{0,100}\}\)/, - replace: "Object.assign($&,{ deleted:$self.getDeleted(...arguments), editHistory:$self.getEdited(...arguments) })" + match: /interactionData:null!=.{0,50}.interaction_data/, + replace: "deleted:$self.getDeleted(...arguments), editHistory:$self.getEdited(...arguments)" } },