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