chore: update for 'Vencord Desktop' -> 'Vesktop' rebrand

main
V 1 year ago
parent ffdf63563b
commit ede507e80c
No known key found for this signature in database
GPG Key ID: A1DC0CFB5615D905

@ -58,7 +58,7 @@ await Promise.all([
define: { define: {
...defines, ...defines,
IS_DISCORD_DESKTOP: true, IS_DISCORD_DESKTOP: true,
IS_VENCORD_DESKTOP: false IS_VESKTOP: false
} }
}), }),
esbuild.build({ esbuild.build({
@ -78,7 +78,7 @@ await Promise.all([
...defines, ...defines,
IS_WEB: false, IS_WEB: false,
IS_DISCORD_DESKTOP: true, IS_DISCORD_DESKTOP: true,
IS_VENCORD_DESKTOP: false IS_VESKTOP: false
} }
}), }),
esbuild.build({ esbuild.build({
@ -90,7 +90,7 @@ await Promise.all([
define: { define: {
...defines, ...defines,
IS_DISCORD_DESKTOP: true, IS_DISCORD_DESKTOP: true,
IS_VENCORD_DESKTOP: false IS_VESKTOP: false
} }
}), }),
@ -104,7 +104,7 @@ await Promise.all([
define: { define: {
...defines, ...defines,
IS_DISCORD_DESKTOP: false, IS_DISCORD_DESKTOP: false,
IS_VENCORD_DESKTOP: true IS_VESKTOP: true
} }
}), }),
esbuild.build({ esbuild.build({
@ -124,7 +124,7 @@ await Promise.all([
...defines, ...defines,
IS_WEB: false, IS_WEB: false,
IS_DISCORD_DESKTOP: false, IS_DISCORD_DESKTOP: false,
IS_VENCORD_DESKTOP: true IS_VESKTOP: true
} }
}), }),
esbuild.build({ esbuild.build({
@ -136,7 +136,7 @@ await Promise.all([
define: { define: {
...defines, ...defines,
IS_DISCORD_DESKTOP: false, IS_DISCORD_DESKTOP: false,
IS_VENCORD_DESKTOP: true IS_VESKTOP: true
} }
}), }),
]).catch(err => { ]).catch(err => {

@ -45,7 +45,7 @@ const commonOptions = {
IS_STANDALONE: "true", IS_STANDALONE: "true",
IS_DEV: JSON.stringify(watch), IS_DEV: JSON.stringify(watch),
IS_DISCORD_DESKTOP: "false", IS_DISCORD_DESKTOP: "false",
IS_VENCORD_DESKTOP: "false", IS_VESKTOP: "false",
VERSION: JSON.stringify(VERSION), VERSION: JSON.stringify(VERSION),
BUILD_TIMESTAMP: Date.now(), BUILD_TIMESTAMP: Date.now(),
} }

6
src/globals.d.ts vendored

@ -36,7 +36,7 @@ declare global {
export var IS_DEV: boolean; export var IS_DEV: boolean;
export var IS_STANDALONE: boolean; export var IS_STANDALONE: boolean;
export var IS_DISCORD_DESKTOP: boolean; export var IS_DISCORD_DESKTOP: boolean;
export var IS_VENCORD_DESKTOP: boolean; export var IS_VESKTOP: boolean;
export var VERSION: string; export var VERSION: string;
export var BUILD_TIMESTAMP: number; 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) * 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 DiscordNative: any;
export var VencordDesktop: any; export var Vesktop: any;
export var VencordDesktopNative: any; export var VesktopNative: any;
interface Window { interface Window {
webpackChunkdiscord_app: { webpackChunkdiscord_app: {

@ -23,7 +23,7 @@ import { ensureSafePath, getSettings } from "./ipcMain";
import { IS_VANILLA, THEMES_DIR } from "./utils/constants"; import { IS_VANILLA, THEMES_DIR } from "./utils/constants";
import { installExt } from "./utils/extensions"; import { installExt } from "./utils/extensions";
if (IS_VENCORD_DESKTOP || !IS_VANILLA) { if (IS_VESKTOP || !IS_VANILLA) {
app.whenReady().then(() => { app.whenReady().then(() => {
// Source Maps! Maybe there's a better way but since the renderer is executed // 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 // from a string I don't think any other form of sourcemaps would work

@ -127,13 +127,6 @@ export default definePlugin({
element: require("@components/VencordSettings/PatchHelperTab").default, element: require("@components/VencordSettings/PatchHelperTab").default,
className: "vc-patch-helper" 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)), ...this.customSections.map(func => func(ID)),
{ {
section: ID.DIVIDER section: ID.DIVIDER
@ -175,7 +168,7 @@ export default definePlugin({
get additionalInfo() { get additionalInfo() {
if (IS_DEV) return " (Dev)"; if (IS_DEV) return " (Dev)";
if (IS_WEB) return " (Web)"; 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)"; if (IS_STANDALONE) return " (Standalone)";
return ""; return "";
}, },

@ -53,7 +53,7 @@ export default definePlugin({
const client = (() => { const client = (() => {
if (IS_DISCORD_DESKTOP) return `Discord Desktop v${DiscordNative.app.getVersion()}`; 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}`; if ("armcord" in window) return `ArmCord v${window.armcord.version}`;
// @ts-expect-error // @ts-expect-error

@ -39,8 +39,8 @@ const settings = definePluginSettings({
type: OptionType.BOOLEAN, type: OptionType.BOOLEAN,
description: "Add back the Discord context menus for images, links and the chat input bar", 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, // 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 // so disable this by default. Vesktop just doesn't, so enable by default
default: IS_VENCORD_DESKTOP, default: IS_VESKTOP,
restartNeeded: true 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)", 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], authors: [Devs.Ven],
enabledByDefault: true, enabledByDefault: true,
required: IS_VENCORD_DESKTOP, required: IS_VESKTOP,
settings, settings,

@ -28,7 +28,7 @@ contextBridge.exposeInMainWorld("VencordNative", VencordNative);
// Discord // Discord
if (location.protocol !== "data:") { if (location.protocol !== "data:") {
// #region cssInsert // #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"); const style = document.createElement("style");
style.id = "vencord-css-core"; style.id = "vencord-css-core";

@ -20,12 +20,12 @@ export function relaunch() {
if (IS_DISCORD_DESKTOP) if (IS_DISCORD_DESKTOP)
window.DiscordNative.app.relaunch(); window.DiscordNative.app.relaunch();
else else
window.VencordDesktopNative.app.relaunch(); window.VesktopNative.app.relaunch();
} }
export function showItemInFolder(path: string) { export function showItemInFolder(path: string) {
if (IS_DISCORD_DESKTOP) if (IS_DISCORD_DESKTOP)
window.DiscordNative.fileManager.showItemInFolder(path); window.DiscordNative.fileManager.showItemInFolder(path);
else else
window.VencordDesktopNative.fileManager.showItemInFolder(path); window.VesktopNative.fileManager.showItemInFolder(path);
} }

Loading…
Cancel
Save