Add about page & setting to open links with electron

This commit is contained in:
Vendicated
2023-04-05 17:55:49 +02:00
parent 17150503d2
commit 1980606e03
6 changed files with 93 additions and 32 deletions

18
src/main/about.ts Normal file
View File

@@ -0,0 +1,18 @@
import { BrowserWindow } from "electron";
import { join } from "path";
import { ICON_PATH, STATIC_DIR } from "shared/paths";
import { makeLinksOpenExternally } from "./utils/makeLinksOpenExternally";
export function createAboutWindow() {
const about = new BrowserWindow({
center: true,
autoHideMenuBar: true,
icon: ICON_PATH
});
makeLinksOpenExternally(about);
about.loadFile(join(STATIC_DIR, "about.html"));
return about;
}