Skip to content

Commit

Permalink
Merge branch 'main' into macos-titlebarstyle-inset
Browse files Browse the repository at this point in the history
  • Loading branch information
Vendicated authored Jul 13, 2023
2 parents ac28450 + 210ddba commit 63fd14c
Show file tree
Hide file tree
Showing 55 changed files with 128 additions and 121 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
},
"cSpell.words": ["Vesktop"]
}
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Vencord Desktop
# Vesktop

Vencord Desktop is a cross platform desktop app aiming to give you a snappier Discord experience with Vencord pre-installed
Vesktop is a cross platform desktop app aiming to give you a snappier Discord experience with Vencord pre-installed

**Not yet supported**:
- Global Keybinds
Expand All @@ -13,11 +13,11 @@ Bug reports, feature requests & contributions are highly appreciated!!

### Windows

Download and run Vencord-Desktop-Setup-VERSION.exe from [releases](https://github.com/Vencord/Desktop/releases/latest)
Download and run Vesktop-Setup-VERSION.exe from [releases](https://github.com/Vencord/Vesktop/releases/latest)

### Mac

Download and run Vencord-Desktop-VERSION.dmg from [releases](https://github.com/Vencord/Desktop/releases/latest)
Download and run Vesktop-VERSION.dmg from [releases](https://github.com/Vencord/Vesktop/releases/latest)

### Linux

Expand All @@ -27,15 +27,15 @@ Install [vencord-desktop-git](https://aur.archlinux.org/packages/vencord-desktop

#### Ubuntu/Debian based

Download Vencord-Desktop-VERSION.deb from [releases](https://github.com/Vencord/Desktop/releases/latest)
Download Vesktop-VERSION.deb from [releases](https://github.com/Vencord/Vesktop/releases/latest)

#### Fedora/RHEL based

Download Vencord-Desktop-VERSION.rpm from [releases](https://github.com/Vencord/Desktop/releases/latest)
Download Vesktop-VERSION.rpm from [releases](https://github.com/Vencord/Vesktop/releases/latest)

#### Other

Either download Vencord-Desktop-VERSION.AppImage and just run it directly or grab Vencord-Desktop-VERSION.tar.gz, extract it somewhere and run `vencorddesktop`.
Either download Vesktop-VERSION.AppImage and just run it directly or grab Vesktop-VERSION.tar.gz, extract it somewhere and run `vencorddesktop`.

A flatpak is planned, if you want packages for other repos, feel free to create them and they can be linked as unofficial here

Expand All @@ -44,8 +44,8 @@ A flatpak is planned, if you want packages for other repos, feel free to create
Packaging will create builds in the dist/ folder. You can then install them like mentioned above or distribute them

```sh
git clone https://github.com/Vencord/Desktop
cd Desktop
git clone https://github.com/Vencord/Vesktop
cd Vesktop

# Install Dependencies
pnpm i
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
},
"build": {
"appId": "dev.vencord.desktop",
"productName": "Vencord Desktop",
"productName": "Vesktop",
"files": [
"!*",
"dist/js",
Expand All @@ -67,15 +67,15 @@
],
"linux": {
"category": "Network",
"maintainer": "vendicated+vencord-desktop@riseup.net",
"maintainer": "vendicated+vesktop@riseup.net",
"target": [
"deb",
"tar.gz",
"rpm",
"AppImage"
],
"desktop": {
"Name": "Vencord Desktop",
"Name": "Vesktop",
"GenericName": "Internet Messenger",
"Type": "Application",
"Categories": "Network;InstantMessaging;Chat;",
Expand Down
10 changes: 7 additions & 3 deletions scripts/build/build.mts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

Expand Down Expand Up @@ -54,7 +54,7 @@ await Promise.all([
}),
createContext({
...CommonOpts,
globalName: "VencordDesktop",
globalName: "Vesktop",
entryPoints: ["src/renderer/index.ts"],
outfile: "dist/js/renderer.js",
format: "iife",
Expand All @@ -65,7 +65,11 @@ await Promise.all([
tsconfig: "./scripts/build/tsconfig.esbuild.json",
external: ["@vencord/types/*"],
plugins: [vencordDep],
footer: { js: "//# sourceURL=VCDRenderer" }
// TODO: remove legacy name once main Vencord codebase has migrated and some time has passed.
// this 0 is very important. we run this script via webFrame.executeJavaScript and the last
// expression will be the return value. Without the 0, the return value would be Vesktop which
// leads to "An object could not be cloned"
footer: { js: ";window.VencordDesktop=Vesktop;0 \n//# sourceURL=VCDRenderer" }
})
]);

Expand Down
2 changes: 1 addition & 1 deletion scripts/build/injectReact.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

Expand Down
2 changes: 1 addition & 1 deletion scripts/build/vencordDep.mts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

Expand Down
2 changes: 1 addition & 1 deletion scripts/header.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
2 changes: 1 addition & 1 deletion scripts/start.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

Expand Down
2 changes: 1 addition & 1 deletion scripts/startWatch.mts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

Expand Down
2 changes: 1 addition & 1 deletion scripts/utils/dotenv.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

Expand Down
2 changes: 1 addition & 1 deletion scripts/utils/spawn.mts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

Expand Down
6 changes: 3 additions & 3 deletions src/globals.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

declare global {
export var VencordDesktopNative: typeof import("preload/VencordDesktopNative").VencordDesktopNative;
export var VencordDesktop: typeof import("renderer/index");
export var VesktopNative: typeof import("preload/VesktopNative").VesktopNative;
export var Vesktop: typeof import("renderer/index");
export var VCDP: any;

export var IS_DEV: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/main/about.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

Expand Down
2 changes: 1 addition & 1 deletion src/main/appBadge.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

Expand Down
4 changes: 2 additions & 2 deletions src/main/arrpc.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

Expand Down Expand Up @@ -29,7 +29,7 @@ export async function initArRPC() {
mainWin.webContents
// Safety: Result of JSON.stringify should always be safe to equal
// Also, just to be super super safe, invite is regex validated above
.executeJavaScript(`VencordDesktop.openInviteModal(${JSON.stringify(invite)})`)
.executeJavaScript(`Vesktop.openInviteModal(${JSON.stringify(invite)})`)
.then(callback);
});
} catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/autoStart.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

Expand Down
4 changes: 2 additions & 2 deletions src/main/constants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

Expand All @@ -17,7 +17,7 @@ export const VENCORD_SETTINGS_FILE = join(VENCORD_SETTINGS_DIR, "settings.json")
export const VENCORD_FILES_DIR =
(require("./settings") as typeof import("./settings")).Settings.store.vencordDir || join(DATA_DIR, "vencordDist");

export const USER_AGENT = `VencordDesktop/${app.getVersion()} (https://github.com/Vencord/Desktop)`;
export const USER_AGENT = `Vesktop/${app.getVersion()} (https://github.com/Vencord/Vesktop)`;

// dimensions shamelessly stolen from Discord Desktop :3
export const MIN_WIDTH = 940;
Expand Down
2 changes: 1 addition & 1 deletion src/main/firstLaunch.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

Expand Down
6 changes: 3 additions & 3 deletions src/main/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

Expand Down Expand Up @@ -61,10 +61,10 @@ function init() {

if (!app.requestSingleInstanceLock({ IS_DEV })) {
if (IS_DEV) {
console.log("Vencord Desktop is already running. Quitting previous instance...");
console.log("Vesktop is already running. Quitting previous instance...");
init();
} else {
console.log("Vencord Desktop is already running. Quitting...");
console.log("Vesktop is already running. Quitting...");
app.quit();
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/main/ipc.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

Expand Down
26 changes: 13 additions & 13 deletions src/main/mainWindow.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

Expand Down Expand Up @@ -82,7 +82,7 @@ function initTray(win: BrowserWindow) {
}
},
{
label: "Quit Vencord Desktop",
label: "Quit Vesktop",
click() {
isQuitting = true;
app.quit();
Expand All @@ -91,7 +91,7 @@ function initTray(win: BrowserWindow) {
]);

tray = new Tray(ICON_PATH);
tray.setToolTip("Vencord Desktop");
tray.setToolTip("Vesktop");
tray.setContextMenu(trayMenu);
tray.on("click", () => win.show());

Expand All @@ -111,7 +111,7 @@ function initMenuBar(win: BrowserWindow) {

const subMenu = [
{
label: "About Vencord Desktop",
label: "About Vesktop",
click: createAboutWindow
},
{
Expand All @@ -121,7 +121,7 @@ function initMenuBar(win: BrowserWindow) {
app.relaunch();
app.quit();
},
toolTip: "Vencord Desktop will automatically restart after this operation"
toolTip: "Vesktop will automatically restart after this operation"
},
{
label: "Relaunch",
Expand Down Expand Up @@ -168,7 +168,7 @@ function initMenuBar(win: BrowserWindow) {

const menu = Menu.buildFromTemplate([
{
label: "Vencord Desktop",
label: "Vesktop",
role: "appMenu",
submenu: subMenu.filter(isTruthy)
},
Expand Down Expand Up @@ -262,6 +262,8 @@ function createMainWindow() {
removeSettingsListeners();
removeVencordSettingsListeners();

const { staticTitle, transparencyOption } = Settings.store;
const { frameless, macosTranslucency } = VencordSettings.store;
const win = (mainWin = new BrowserWindow({
show: false,
webPreferences: {
Expand All @@ -273,18 +275,16 @@ function createMainWindow() {
spellcheck: true
},
icon: ICON_PATH,
frame: VencordSettings.store.frameless !== true,
...(Settings.store.transparencyOption !== "none"
frame: frameless !== true,
...(transparencyOption && transparencyOption !== "none"
? {
backgroundColor: "#00000000",
backgroundMaterial: Settings.store.transparencyOption,
transparent: true
}
: {
transparent: false
}),
...(Settings.store.staticTitle ? { title: "Vencord" } : {}),
...(VencordSettings.store.macosTranslucency
: {}),
...(staticTitle ? { title: "Vencord" } : {}),
...(macosTranslucency
? {
vibrancy: "sidebar",
backgroundColor: "#ffffff00"
Expand Down
4 changes: 2 additions & 2 deletions src/main/screenShare.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

Expand Down Expand Up @@ -36,7 +36,7 @@ export function registerScreenShareHandler() {
}));

const choice = await request.frame
.executeJavaScript(`VencordDesktop.Components.ScreenShare.openScreenSharePicker(${JSON.stringify(data)})`)
.executeJavaScript(`Vesktop.Components.ScreenShare.openScreenSharePicker(${JSON.stringify(data)})`)
.then(e => e as StreamPick)
.catch(() => null);

Expand Down
Loading

0 comments on commit 63fd14c

Please sign in to comment.