mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-08 22:23:02 -04:00
Improvements for VencordDesktop (#847)
This commit is contained in:
parent
bfa20f2634
commit
08822dd190
13 changed files with 85 additions and 147 deletions
|
@ -71,66 +71,63 @@ export default definePlugin({
|
|||
makeSettingsCategories({ ID }: { ID: Record<string, unknown>; }) {
|
||||
const makeOnClick = (tab: string) => () => SettingsRouter.open(tab);
|
||||
|
||||
const cats = [
|
||||
return [
|
||||
{
|
||||
section: ID.HEADER,
|
||||
label: "Vencord"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
section: "VencordSettings",
|
||||
label: "Vencord",
|
||||
element: () => <SettingsComponent tab="VencordSettings" />,
|
||||
onClick: makeOnClick("VencordSettings")
|
||||
}, {
|
||||
},
|
||||
{
|
||||
section: "VencordPlugins",
|
||||
label: "Plugins",
|
||||
element: () => <SettingsComponent tab="VencordPlugins" />,
|
||||
onClick: makeOnClick("VencordPlugins")
|
||||
}, {
|
||||
},
|
||||
{
|
||||
section: "VencordThemes",
|
||||
label: "Themes",
|
||||
element: () => <SettingsComponent tab="VencordThemes" />,
|
||||
onClick: makeOnClick("VencordThemes")
|
||||
}
|
||||
] as Array<{
|
||||
section: unknown,
|
||||
label?: string;
|
||||
element?: React.ComponentType;
|
||||
onClick?(): void;
|
||||
}>;
|
||||
|
||||
if (!IS_WEB)
|
||||
cats.push({
|
||||
},
|
||||
!IS_WEB && {
|
||||
section: "VencordUpdater",
|
||||
label: "Updater",
|
||||
element: () => <SettingsComponent tab="VencordUpdater" />,
|
||||
onClick: makeOnClick("VencordUpdater")
|
||||
});
|
||||
|
||||
cats.push({
|
||||
section: "VencordCloud",
|
||||
label: "Cloud",
|
||||
element: () => <SettingsComponent tab="VencordCloud" />,
|
||||
onClick: makeOnClick("VencordCloud")
|
||||
});
|
||||
|
||||
cats.push({
|
||||
section: "VencordSettingsSync",
|
||||
label: "Backup & Restore",
|
||||
element: () => <SettingsComponent tab="VencordSettingsSync" />,
|
||||
onClick: makeOnClick("VencordSettingsSync")
|
||||
});
|
||||
|
||||
if (IS_DEV)
|
||||
cats.push({
|
||||
},
|
||||
{
|
||||
section: "VencordCloud",
|
||||
label: "Cloud",
|
||||
element: () => <SettingsComponent tab="VencordCloud" />,
|
||||
onClick: makeOnClick("VencordCloud")
|
||||
},
|
||||
{
|
||||
section: "VencordSettingsSync",
|
||||
label: "Backup & Restore",
|
||||
element: () => <SettingsComponent tab="VencordSettingsSync" />,
|
||||
onClick: makeOnClick("VencordSettingsSync")
|
||||
},
|
||||
IS_DEV && {
|
||||
section: "VencordPatchHelper",
|
||||
label: "Patch Helper",
|
||||
element: PatchHelper!,
|
||||
onClick: makeOnClick("VencordPatchHelper")
|
||||
});
|
||||
|
||||
cats.push({ section: ID.DIVIDER });
|
||||
|
||||
return cats;
|
||||
},
|
||||
IS_VENCORD_DESKTOP && {
|
||||
section: "VencordDesktop",
|
||||
label: "Desktop Settings",
|
||||
element: VencordDesktop.Components.Settings,
|
||||
onClick: makeOnClick("VencordDesktop")
|
||||
},
|
||||
{
|
||||
section: ID.DIVIDER
|
||||
}
|
||||
].filter(Boolean);
|
||||
},
|
||||
|
||||
options: {
|
||||
|
@ -149,14 +146,6 @@ export default definePlugin({
|
|||
},
|
||||
},
|
||||
|
||||
tabs: {
|
||||
vencord: () => <SettingsComponent tab="VencordSettings" />,
|
||||
plugins: () => <SettingsComponent tab="VencordPlugins" />,
|
||||
themes: () => <SettingsComponent tab="VencordThemes" />,
|
||||
updater: () => <SettingsComponent tab="VencordUpdater" />,
|
||||
sync: () => <SettingsComponent tab="VencordSettingsSync" />
|
||||
},
|
||||
|
||||
get electronVersion() {
|
||||
return VencordNative.getVersions().electron || window.armcord?.electron || null;
|
||||
},
|
||||
|
@ -175,7 +164,7 @@ export default definePlugin({
|
|||
get additionalInfo() {
|
||||
if (IS_DEV) return " (Dev)";
|
||||
if (IS_WEB) return " (Web)";
|
||||
if (IS_VENCORD_DESKTOP) return " (Vencord Desktop)";
|
||||
if (IS_VENCORD_DESKTOP) return ` (VencordDesktop v${VencordDesktopNative.app.getVersion()})`;
|
||||
if (IS_STANDALONE) return " (Standalone)";
|
||||
return "";
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue