mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-11 23:53:03 -04:00
loadlazychunks without dev
This commit is contained in:
parent
cdba643226
commit
1905ea04fb
3 changed files with 25 additions and 27 deletions
|
@ -25,16 +25,16 @@ export interface ButtonAction {
|
|||
}
|
||||
|
||||
export const actions: ButtonAction[] = [
|
||||
{ id: "openSuncordSettings", label: "Open Suncord tab", callback: async () => await SettingsRouter.open("SuncordSettings"), registrar: "Suncord" },
|
||||
{ id: "openPluginSettings", label: "Open Plugin tab", callback: () => SettingsRouter.open("SuncordPlugins"), registrar: "Suncord" },
|
||||
{ id: "openThemesSettings", label: "Open Themes tab", callback: () => SettingsRouter.open("SuncordThemes"), registrar: "Suncord" },
|
||||
{ id: "openUpdaterSettings", label: "Open Updater tab", callback: () => SettingsRouter.open("SuncordUpdater"), registrar: "Suncord" },
|
||||
{ id: "openSuncordCloudSettings", label: "Open Cloud tab", callback: () => SettingsRouter.open("SuncordCloud"), registrar: "Suncord" },
|
||||
{ id: "openBackupSettings", label: "Open Backup & Restore tab", callback: () => SettingsRouter.open("SuncordSettingsSync"), registrar: "Suncord" },
|
||||
{ id: "restartClient", label: "Restart Client", callback: () => relaunch(), registrar: "Suncord" },
|
||||
{ id: "openQuickCSSFile", label: "Open Quick CSS File", callback: () => VencordNative.quickCss.openEditor(), registrar: "Suncord" },
|
||||
{ id: "openSettingsFolder", label: "Open Settings Folder", callback: async () => showItemInFolder(await VencordNative.settings.getSettingsDir()), registrar: "Suncord" },
|
||||
{ id: "openInGithub", label: "Open in Github", callback: async () => VencordNative.native.openExternal(await getRepo()), registrar: "Suncord" },
|
||||
{ id: "openEquicordSettings", label: "Open Equicord tab", callback: async () => await SettingsRouter.open("EquicordSettings"), registrar: "Equicord" },
|
||||
{ id: "openPluginSettings", label: "Open Plugin tab", callback: () => SettingsRouter.open("EquicordPlugins"), registrar: "Equicord" },
|
||||
{ id: "openThemesSettings", label: "Open Themes tab", callback: () => SettingsRouter.open("EquicordThemes"), registrar: "Equicord" },
|
||||
{ id: "openUpdaterSettings", label: "Open Updater tab", callback: () => SettingsRouter.open("EquicordUpdater"), registrar: "Equicord" },
|
||||
{ id: "openEquicordCloudSettings", label: "Open Cloud tab", callback: () => SettingsRouter.open("EquicordCloud"), registrar: "Equicord" },
|
||||
{ id: "openBackupSettings", label: "Open Backup & Restore tab", callback: () => SettingsRouter.open("EquicordSettingsSync"), registrar: "Equicord" },
|
||||
{ id: "restartClient", label: "Restart Client", callback: () => relaunch(), registrar: "Equicord" },
|
||||
{ id: "openQuickCSSFile", label: "Open Quick CSS File", callback: () => VencordNative.quickCss.openEditor(), registrar: "Equicord" },
|
||||
{ id: "openSettingsFolder", label: "Open Settings Folder", callback: async () => showItemInFolder(await VencordNative.settings.getSettingsDir()), registrar: "Equicord" },
|
||||
{ id: "openInGithub", label: "Open in Github", callback: async () => VencordNative.native.openExternal(await getRepo()), registrar: "Equicord" },
|
||||
|
||||
{
|
||||
id: "openInBrowser", label: "Open in Browser", callback: async () => {
|
||||
|
@ -54,7 +54,7 @@ export const actions: ButtonAction[] = [
|
|||
}
|
||||
});
|
||||
}
|
||||
}, registrar: "Suncord"
|
||||
}, registrar: "Equicord"
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -79,7 +79,7 @@ export const actions: ButtonAction[] = [
|
|||
if (choice && enabled) {
|
||||
return togglePlugin(choice, enabled.id === "enable");
|
||||
}
|
||||
}, registrar: "Suncord"
|
||||
}, registrar: "Equicord"
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -110,7 +110,7 @@ export const actions: ButtonAction[] = [
|
|||
}
|
||||
});
|
||||
}
|
||||
}, registrar: "Suncord"
|
||||
}, registrar: "Equicord"
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -125,7 +125,7 @@ export const actions: ButtonAction[] = [
|
|||
position: Toasts.Position.BOTTOM
|
||||
}
|
||||
});
|
||||
}, registrar: "Suncord"
|
||||
}, registrar: "Equicord"
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -134,12 +134,12 @@ export const actions: ButtonAction[] = [
|
|||
|
||||
if (isOutdated) {
|
||||
setTimeout(() => showNotification({
|
||||
title: "A Suncord update is available!",
|
||||
title: "A Equicord update is available!",
|
||||
body: "Click here to view the update",
|
||||
permanent: true,
|
||||
noPersist: true,
|
||||
onClick() {
|
||||
SettingsRouter.open("SuncordUpdater");
|
||||
SettingsRouter.open("EquicordUpdater");
|
||||
}
|
||||
}), 10_000);
|
||||
} else {
|
||||
|
@ -152,7 +152,7 @@ export const actions: ButtonAction[] = [
|
|||
}
|
||||
});
|
||||
}
|
||||
}, registrar: "Suncord"
|
||||
}, registrar: "Equicord"
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -172,7 +172,7 @@ export const actions: ButtonAction[] = [
|
|||
if (choice) {
|
||||
NavigationRouter.transitionToGuild(choice.id);
|
||||
}
|
||||
}, registrar: "Suncord"
|
||||
}, registrar: "Equicord"
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
@ -94,14 +94,12 @@ export default definePlugin({
|
|||
start() {
|
||||
document.addEventListener("keydown", this.event);
|
||||
|
||||
if (IS_DEV) {
|
||||
registerAction({
|
||||
id: "openDevSettings",
|
||||
label: "Open Dev tab",
|
||||
callback: () => SettingsRouter.open("SuncordPatchHelper"),
|
||||
registrar: "Suncord"
|
||||
});
|
||||
}
|
||||
registerAction({
|
||||
id: "openDevSettings",
|
||||
label: "Open Dev tab",
|
||||
callback: () => SettingsRouter.open("EquicordPatchHelper"),
|
||||
registrar: "Equicord"
|
||||
});
|
||||
},
|
||||
|
||||
stop() {
|
||||
|
|
|
@ -83,7 +83,7 @@ function makeShortcuts() {
|
|||
wpsearch: search,
|
||||
wpex: extract,
|
||||
wpexs: (code: string) => extract(findModuleId(code)!),
|
||||
loadLazyChunks: IS_DEV ? loadLazyChunks : () => { throw new Error("loadLazyChunks is dev only."); },
|
||||
loadLazyChunks: loadLazyChunks,
|
||||
find,
|
||||
findAll: findAll,
|
||||
findByProps,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue