From fde447bc1d6e3f213531acc6ac961a6eb0e0cbc0 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Sun, 6 Jul 2025 18:57:57 +0200 Subject: [PATCH] improve about window --- src/main/about.ts | 20 ++++++++---- static/views/about.html | 56 ++++++++++++++++++++++++++-------- static/views/first-launch.html | 2 ++ static/views/style.css | 7 +++++ 4 files changed, 67 insertions(+), 18 deletions(-) diff --git a/src/main/about.ts b/src/main/about.ts index 88c3d65..bed2f34 100644 --- a/src/main/about.ts +++ b/src/main/about.ts @@ -4,25 +4,33 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ -import { BrowserWindow } from "electron"; +import { app, BrowserWindow } from "electron"; import { join } from "path"; import { ICON_PATH, VIEW_DIR } from "shared/paths"; import { makeLinksOpenExternally } from "./utils/makeLinksOpenExternally"; -export function createAboutWindow() { +export async function createAboutWindow() { + const height = 750; + const width = height * (4 / 3); + const about = new BrowserWindow({ center: true, autoHideMenuBar: true, icon: ICON_PATH, - webPreferences: { - preload: join(__dirname, "updaterPreload.js") - } + height, + width }); makeLinksOpenExternally(about); - about.loadFile(join(VIEW_DIR, "about.html")); + const data = new URLSearchParams({ + APP_VERSION: app.getVersion() + }); + + about.loadFile(join(VIEW_DIR, "about.html"), { + search: data.toString() + }); return about; } diff --git a/static/views/about.html b/static/views/about.html index 6e66b2f..38ea463 100644 --- a/static/views/about.html +++ b/static/views/about.html @@ -1,4 +1,6 @@ + About Vesktop + -

Vesktop

-

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

+

Vesktop v{{APP_VERSION}}

+

Vesktop is a cross platform Discord Desktop client, aiming to give you a better Discord experience

Links

+
+

License

+

+ Vesktop is licensed under the + GNU General Public License v3.0. +
+ This is free software, and you are welcome to redistribute it under certain conditions; see the license for + details. +

+
+

Acknowledgements

These awesome libraries empower Vesktop

@@ -53,23 +72,36 @@
  • rohrkabel - - A C++ RAII Pipewire-API Wrapper + - A C++ RAII Pipewire-API Wrapper
  • And many more awesome open source librariesmore open source libraries
  • - diff --git a/static/views/first-launch.html b/static/views/first-launch.html index 0372167..769dc77 100644 --- a/static/views/first-launch.html +++ b/static/views/first-launch.html @@ -1,4 +1,6 @@ + Vesktop Setup +