Fix Some Patches
This commit is contained in:
parent
47a2ae3e6f
commit
e20ea1725f
10 changed files with 60 additions and 25 deletions
|
|
@ -16,7 +16,7 @@ export default definePlugin({
|
|||
{
|
||||
find: '?"BACK_FORWARD_NAVIGATION":',
|
||||
replacement: {
|
||||
match: /(?<=\i\.Fragment,\{children:\[.{1,500}className:\i\}\))(?=\])/,
|
||||
match: /(?<="HELP".{0,150}className:\i\}\))(?=\])/,
|
||||
replace: ",...Vencord.Api.HeaderBar._addHeaderBarButtons()"
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -94,8 +94,8 @@ export default definePlugin({
|
|||
// Channel list server boost progress bar
|
||||
find: "useGuildActionRow",
|
||||
replacement: {
|
||||
match: /\i\.premiumProgressBarEnabled&&[^,]+/,
|
||||
replace: "null"
|
||||
match: /(GUILD_NEW_MEMBER_ACTIONS_PROGRESS_BAR\)):\i/,
|
||||
replace: "$1:null"
|
||||
},
|
||||
predicate: () => settings.store.serverBoost,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import "./styles.css";
|
||||
|
||||
import SettingsPlugin from "@plugins/_core/settings";
|
||||
import SettingsPlugin, { settingsSectionMap } from "@plugins/_core/settings";
|
||||
import { EquicordDevs } from "@utils/constants";
|
||||
import definePlugin, { StartAt } from "@utils/types";
|
||||
import { openUserSettingsPanel } from "@webpack/common";
|
||||
|
|
@ -65,12 +65,16 @@ export default definePlugin({
|
|||
className: "vc-discord-components",
|
||||
id: "Components"
|
||||
}));
|
||||
|
||||
settingsSectionMap.push(["EquicordDiscordComponents", "equicord_components"]);
|
||||
},
|
||||
stop() {
|
||||
const { customEntries, customSections } = SettingsPlugin;
|
||||
const entryIdx = customEntries.findIndex(e => e.key === "equicord_components");
|
||||
const sectionIdx = customSections.findIndex(s => s({} as any).id === "Components");
|
||||
if (entryIdx !== -1) customEntries.splice(entryIdx, 1);
|
||||
const sectionIdx = customSections.findIndex(s => s({} as any).id === "Components");
|
||||
if (sectionIdx !== -1) customSections.splice(sectionIdx, 1);
|
||||
const map = settingsSectionMap.findIndex(entry => entry[1] === "equicord_components");
|
||||
if (map !== -1) settingsSectionMap.splice(map, 1);
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ export default definePlugin({
|
|||
section: "EquicordIRememberYou",
|
||||
label: "IRememberYou",
|
||||
element: () => <DataUI plugin={this} usersCollection={data.usersCollection} />,
|
||||
id: "IRememberYou"
|
||||
id: "EquicordIRememberYou"
|
||||
}));
|
||||
|
||||
settingsSectionMap.push(["EquicordIRememberYou", "equicord_i_remember_you"]);
|
||||
|
|
@ -57,9 +57,11 @@ export default definePlugin({
|
|||
const dataManager = this.dataManager as Data;
|
||||
const { customEntries, customSections } = SettingsPlugin;
|
||||
const entry = customEntries.findIndex(entry => entry.key === "equicord_i_remember_you");
|
||||
const section = customSections.findIndex(section => section({} as any).id === "IRememberYou");
|
||||
if (entry !== -1) customEntries.splice(entry, 1);
|
||||
const section = customSections.findIndex(section => section({} as any).id === "EquicordIRememberYou");
|
||||
if (section !== -1) customSections.splice(section, 1);
|
||||
const map = settingsSectionMap.findIndex(entry => entry[1] === "equicord_i_remember_you");
|
||||
if (map !== -1) settingsSectionMap.splice(map, 1);
|
||||
|
||||
removeMessagePreSendListener(dataManager._onMessagePreSend_preSend);
|
||||
clearInterval(dataManager._storageAutoSaveProtocol_interval);
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export default definePlugin({
|
|||
label: "Icon Finder",
|
||||
element: IconsTab,
|
||||
className: "vc-discord-icons",
|
||||
id: "IconViewer"
|
||||
id: "EquicordIconViewer"
|
||||
}));
|
||||
|
||||
settingsSectionMap.push(["EquicordDiscordIcons", "equicord_icon_viewer"]);
|
||||
|
|
@ -50,8 +50,10 @@ export default definePlugin({
|
|||
stop() {
|
||||
const { customEntries, customSections } = SettingsPlugin;
|
||||
const entryIdx = customEntries.findIndex(e => e.key === "equicord_icon_viewer");
|
||||
const sectionIdx = customSections.findIndex(s => s({} as any).id === "IconViewer");
|
||||
if (entryIdx !== -1) customEntries.splice(entryIdx, 1);
|
||||
const sectionIdx = customSections.findIndex(s => s({} as any).id === "EquicordIconViewer");
|
||||
if (sectionIdx !== -1) customSections.splice(sectionIdx, 1);
|
||||
const map = settingsSectionMap.findIndex(entry => entry[1] === "equicord_icon_viewer");
|
||||
if (map !== -1) settingsSectionMap.splice(map, 1);
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -82,6 +82,14 @@ export default definePlugin({
|
|||
},
|
||||
|
||||
stop() {
|
||||
const { customEntries, customSections } = SettingsPlugin;
|
||||
const entry = customEntries.findIndex(entry => entry.key === "equicord_login_with_qr");
|
||||
if (entry !== -1) customEntries.splice(entry, 1);
|
||||
const section = customSections.findIndex(section => section({} as any).id === "EquicordLoginWithQR");
|
||||
if (section !== -1) customSections.splice(section, 1);
|
||||
const map = settingsSectionMap.findIndex(entry => entry[1] === "equicord_login_with_qr");
|
||||
if (map !== -1) settingsSectionMap.splice(map, 1);
|
||||
|
||||
unload();
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -47,8 +47,10 @@ export default definePlugin({
|
|||
stop() {
|
||||
const { customEntries, customSections } = SettingsPlugin;
|
||||
const entry = customEntries.findIndex(entry => entry.key === "equicord_theme_library");
|
||||
const section = customSections.findIndex(section => section({} as any).id === "ThemeLibrary");
|
||||
if (entry !== -1) customEntries.splice(entry, 1);
|
||||
const section = customSections.findIndex(section => section({} as any).id === "ThemeLibrary");
|
||||
if (section !== -1) customSections.splice(section, 1);
|
||||
const map = settingsSectionMap.findIndex(entry => entry[1] === "equicord_theme_library");
|
||||
if (map !== -1) settingsSectionMap.splice(map, 1);
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import { React } from "@webpack/common";
|
|||
import hideBugReport from "./hideBugReport.css?managed";
|
||||
|
||||
const KbdStyles = findByPropsLazy("key", "combo");
|
||||
const BugReporterExperiment = findLazy(m => m?.definition?.id === "2024-09_bug_reporter");
|
||||
const BugReporterExperiment = findLazy(m => m?.definition?.name === "2026-01-bug-reporter");
|
||||
|
||||
const modKey = IS_MAC ? "cmd" : "ctrl";
|
||||
const altKey = IS_MAC ? "opt" : "alt";
|
||||
|
|
|
|||
|
|
@ -261,8 +261,8 @@ export default definePlugin({
|
|||
},
|
||||
{
|
||||
// Fix sizes for mobile indicators which aren't online
|
||||
match: /(?<=\(\i\.status,)(\i)(?=,(\i),\i\))/,
|
||||
replace: (_, userStatus, isMobile) => `${isMobile}?"online":${userStatus}`
|
||||
match: /(?<=\(\i\.status,)(\i)(?=,\{.{0,15}isMobile:(\i))/,
|
||||
replace: '$2?"online":$1'
|
||||
},
|
||||
{
|
||||
// Make isMobile true no matter the status
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { ClockIcon } from "@equicordplugins/themeLibrary/utils/Icons";
|
||||
import SettingsPlugin, { settingsSectionMap } from "@plugins/_core/settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
|
|
@ -25,18 +27,33 @@ export default definePlugin({
|
|||
name: "StartupTimings",
|
||||
description: "Adds Startup Timings to the Settings menu",
|
||||
authors: [Devs.Megu],
|
||||
start() {
|
||||
const { customEntries, customSections } = SettingsPlugin;
|
||||
|
||||
patches: [{
|
||||
find: ".SEARCH_NO_RESULTS&&0===",
|
||||
replacement: [
|
||||
{
|
||||
match: /(?<=}\)([,;])(\i\.settings)\.forEach.+?(\i)\.push.+\)\)\}\))(?=\)\})/,
|
||||
replace: (_, commaOrSemi, settings, elements) => "" +
|
||||
`${commaOrSemi}${settings}?.[0]==="EXPERIMENTS"` +
|
||||
`&&${elements}.push({section:"StartupTimings",label:"Startup Timings",element:$self.StartupTimingPage})`,
|
||||
},
|
||||
]
|
||||
}],
|
||||
customEntries.push({
|
||||
key: "equicord_startup_timings",
|
||||
title: "Components",
|
||||
Component: StartupTimingPage,
|
||||
Icon: ClockIcon
|
||||
});
|
||||
|
||||
StartupTimingPage
|
||||
customSections.push(() => ({
|
||||
section: "EquicordStartupTimings",
|
||||
label: "Startup Timings",
|
||||
searchableTitles: ["Startup Timings"],
|
||||
element: StartupTimingPage,
|
||||
id: "StartupTimings",
|
||||
}));
|
||||
|
||||
settingsSectionMap.push(["EquicordStartupTimings", "equicord_startup_timings"]);
|
||||
},
|
||||
stop() {
|
||||
const { customEntries, customSections } = SettingsPlugin;
|
||||
const entryIdx = customEntries.findIndex(e => e.key === "equicord_startup_timings");
|
||||
if (entryIdx !== -1) customEntries.splice(entryIdx, 1);
|
||||
const section = customSections.findIndex(section => section({} as any).id === "EquicordStartupTimings");
|
||||
if (section !== -1) customSections.splice(section, 1);
|
||||
const map = settingsSectionMap.findIndex(entry => entry[1] === "equicord_startup_timings");
|
||||
if (map !== -1) customEntries.splice(map, 1);
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue