diff options
author | V <vendicated@riseup.net> | 2023-08-16 01:55:56 +0200 |
---|---|---|
committer | V <vendicated@riseup.net> | 2023-08-16 01:55:56 +0200 |
commit | ede507e80c4824981898bbaef7b7c5ad487cb2b7 (patch) | |
tree | 9b7c14f18c4d05412ba6dc559233741f79d6bde0 | |
parent | ffdf63563bab53a65b2a1a318f0f05e7917de002 (diff) | |
download | Vencord-ede507e80c4824981898bbaef7b7c5ad487cb2b7.tar.gz Vencord-ede507e80c4824981898bbaef7b7c5ad487cb2b7.tar.bz2 Vencord-ede507e80c4824981898bbaef7b7c5ad487cb2b7.zip |
chore: update for 'Vencord Desktop' -> 'Vesktop' rebrand
-rwxr-xr-x | scripts/build/build.mjs | 12 | ||||
-rw-r--r-- | scripts/build/buildWeb.mjs | 2 | ||||
-rw-r--r-- | src/globals.d.ts | 6 | ||||
-rw-r--r-- | src/main/index.ts | 2 | ||||
-rw-r--r-- | src/plugins/_core/settings.tsx | 9 | ||||
-rw-r--r-- | src/plugins/supportHelper.tsx | 2 | ||||
-rw-r--r-- | src/plugins/webContextMenus.web.ts | 6 | ||||
-rw-r--r-- | src/preload.ts | 2 | ||||
-rw-r--r-- | src/utils/native.ts | 4 |
9 files changed, 19 insertions, 26 deletions
diff --git a/scripts/build/build.mjs b/scripts/build/build.mjs index 59056b1..e044378 100755 --- a/scripts/build/build.mjs +++ b/scripts/build/build.mjs @@ -58,7 +58,7 @@ await Promise.all([ define: { ...defines, IS_DISCORD_DESKTOP: true, - IS_VENCORD_DESKTOP: false + IS_VESKTOP: false } }), esbuild.build({ @@ -78,7 +78,7 @@ await Promise.all([ ...defines, IS_WEB: false, IS_DISCORD_DESKTOP: true, - IS_VENCORD_DESKTOP: false + IS_VESKTOP: false } }), esbuild.build({ @@ -90,7 +90,7 @@ await Promise.all([ define: { ...defines, IS_DISCORD_DESKTOP: true, - IS_VENCORD_DESKTOP: false + IS_VESKTOP: false } }), @@ -104,7 +104,7 @@ await Promise.all([ define: { ...defines, IS_DISCORD_DESKTOP: false, - IS_VENCORD_DESKTOP: true + IS_VESKTOP: true } }), esbuild.build({ @@ -124,7 +124,7 @@ await Promise.all([ ...defines, IS_WEB: false, IS_DISCORD_DESKTOP: false, - IS_VENCORD_DESKTOP: true + IS_VESKTOP: true } }), esbuild.build({ @@ -136,7 +136,7 @@ await Promise.all([ define: { ...defines, IS_DISCORD_DESKTOP: false, - IS_VENCORD_DESKTOP: true + IS_VESKTOP: true } }), ]).catch(err => { diff --git a/scripts/build/buildWeb.mjs b/scripts/build/buildWeb.mjs index 5c1cc78..434d176 100644 --- a/scripts/build/buildWeb.mjs +++ b/scripts/build/buildWeb.mjs @@ -45,7 +45,7 @@ const commonOptions = { IS_STANDALONE: "true", IS_DEV: JSON.stringify(watch), IS_DISCORD_DESKTOP: "false", - IS_VENCORD_DESKTOP: "false", + IS_VESKTOP: "false", VERSION: JSON.stringify(VERSION), BUILD_TIMESTAMP: Date.now(), } diff --git a/src/globals.d.ts b/src/globals.d.ts index a1f6efc..720cd5e 100644 --- a/src/globals.d.ts +++ b/src/globals.d.ts @@ -36,7 +36,7 @@ declare global { export var IS_DEV: boolean; export var IS_STANDALONE: boolean; export var IS_DISCORD_DESKTOP: boolean; - export var IS_VENCORD_DESKTOP: boolean; + export var IS_VESKTOP: boolean; export var VERSION: string; export var BUILD_TIMESTAMP: number; @@ -58,8 +58,8 @@ declare global { * If you really must use it, mark your plugin as Desktop App only by naming it Foo.desktop.ts(x) */ export var DiscordNative: any; - export var VencordDesktop: any; - export var VencordDesktopNative: any; + export var Vesktop: any; + export var VesktopNative: any; interface Window { webpackChunkdiscord_app: { diff --git a/src/main/index.ts b/src/main/index.ts index 2e1a10e..d1b7c5d 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -23,7 +23,7 @@ import { ensureSafePath, getSettings } from "./ipcMain"; import { IS_VANILLA, THEMES_DIR } from "./utils/constants"; import { installExt } from "./utils/extensions"; -if (IS_VENCORD_DESKTOP || !IS_VANILLA) { +if (IS_VESKTOP || !IS_VANILLA) { app.whenReady().then(() => { // Source Maps! Maybe there's a better way but since the renderer is executed // from a string I don't think any other form of sourcemaps would work diff --git a/src/plugins/_core/settings.tsx b/src/plugins/_core/settings.tsx index ce970fd..e5f710c 100644 --- a/src/plugins/_core/settings.tsx +++ b/src/plugins/_core/settings.tsx @@ -127,13 +127,6 @@ export default definePlugin({ element: require("@components/VencordSettings/PatchHelperTab").default, className: "vc-patch-helper" }, - // TODO: make this use customSections - IS_VENCORD_DESKTOP && { - section: "VencordDesktop", - label: "Desktop Settings", - element: VencordDesktop.Components.Settings, - className: "vc-desktop-settings" - }, ...this.customSections.map(func => func(ID)), { section: ID.DIVIDER @@ -175,7 +168,7 @@ export default definePlugin({ get additionalInfo() { if (IS_DEV) return " (Dev)"; if (IS_WEB) return " (Web)"; - if (IS_VENCORD_DESKTOP) return ` (VencordDesktop v${VencordDesktopNative.app.getVersion()})`; + if (IS_VESKTOP) return ` (Vesktop v${VesktopNative.app.getVersion()})`; if (IS_STANDALONE) return " (Standalone)"; return ""; }, diff --git a/src/plugins/supportHelper.tsx b/src/plugins/supportHelper.tsx index a90c13c..4691c0e 100644 --- a/src/plugins/supportHelper.tsx +++ b/src/plugins/supportHelper.tsx @@ -53,7 +53,7 @@ export default definePlugin({ const client = (() => { if (IS_DISCORD_DESKTOP) return `Discord Desktop v${DiscordNative.app.getVersion()}`; - if (IS_VENCORD_DESKTOP) return `Vencord Desktop v${VencordDesktopNative.app.getVersion()}`; + if (IS_VESKTOP) return `Vesktop v${VesktopNative.app.getVersion()}`; if ("armcord" in window) return `ArmCord v${window.armcord.version}`; // @ts-expect-error diff --git a/src/plugins/webContextMenus.web.ts b/src/plugins/webContextMenus.web.ts index ca29540..4cdbcd9 100644 --- a/src/plugins/webContextMenus.web.ts +++ b/src/plugins/webContextMenus.web.ts @@ -39,8 +39,8 @@ const settings = definePluginSettings({ type: OptionType.BOOLEAN, description: "Add back the Discord context menus for images, links and the chat input bar", // Web slate menu has proper spellcheck suggestions and image context menu is also pretty good, - // so disable this by default. Vencord Desktop just doesn't, so enable by default - default: IS_VENCORD_DESKTOP, + // so disable this by default. Vesktop just doesn't, so enable by default + default: IS_VESKTOP, restartNeeded: true } }); @@ -50,7 +50,7 @@ export default definePlugin({ description: "Re-adds context menus missing in the web version of Discord: Links & Images (Copy/Open Link/Image), Text Area (Copy, Cut, Paste, SpellCheck)", authors: [Devs.Ven], enabledByDefault: true, - required: IS_VENCORD_DESKTOP, + required: IS_VESKTOP, settings, diff --git a/src/preload.ts b/src/preload.ts index 2beaf39..0824300 100644 --- a/src/preload.ts +++ b/src/preload.ts @@ -28,7 +28,7 @@ contextBridge.exposeInMainWorld("VencordNative", VencordNative); // Discord if (location.protocol !== "data:") { // #region cssInsert - const rendererCss = join(__dirname, IS_VENCORD_DESKTOP ? "vencordDesktopRenderer.css" : "renderer.css"); + const rendererCss = join(__dirname, IS_VESKTOP ? "vencordDesktopRenderer.css" : "renderer.css"); const style = document.createElement("style"); style.id = "vencord-css-core"; diff --git a/src/utils/native.ts b/src/utils/native.ts index 1d29d40..d84ed16 100644 --- a/src/utils/native.ts +++ b/src/utils/native.ts @@ -20,12 +20,12 @@ export function relaunch() { if (IS_DISCORD_DESKTOP) window.DiscordNative.app.relaunch(); else - window.VencordDesktopNative.app.relaunch(); + window.VesktopNative.app.relaunch(); } export function showItemInFolder(path: string) { if (IS_DISCORD_DESKTOP) window.DiscordNative.fileManager.showItemInFolder(path); else - window.VencordDesktopNative.fileManager.showItemInFolder(path); + window.VesktopNative.fileManager.showItemInFolder(path); } |