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

This commit is contained in:
V 2023-08-16 01:55:56 +02:00
parent ffdf63563b
commit ede507e80c
No known key found for this signature in database
GPG Key ID: A1DC0CFB5615D905
9 changed files with 19 additions and 26 deletions

View File

@ -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 => {

View File

@ -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(),
}

6
src/globals.d.ts vendored
View File

@ -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: {

View File

@ -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

View File

@ -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 "";
},

View File

@ -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

View File

@ -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,

View File

@ -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";

View File

@ -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);
}