use custom protocol instead of file:// for better security

This commit is contained in:
Vendicated
2025-10-19 02:59:00 +02:00
parent 9f0af48355
commit fa23c630cb
11 changed files with 99 additions and 35 deletions
+2 -2
View File
@@ -9,13 +9,13 @@ import { BrowserWindow } from "electron/main";
import { copyFileSync, mkdirSync, readdirSync } from "fs";
import { join } from "path";
import { SplashProps } from "shared/browserWinProperties";
import { VIEW_DIR } from "shared/paths";
import { autoStart } from "./autoStart";
import { DATA_DIR } from "./constants";
import { createWindows } from "./mainWindow";
import { Settings, State } from "./settings";
import { makeLinksOpenExternally } from "./utils/makeLinksOpenExternally";
import { loadView } from "./vesktopStatic";
interface Data {
discordBranch: "stable" | "canary" | "ptb";
@@ -37,7 +37,7 @@ export function createFirstLaunchTour() {
makeLinksOpenExternally(win);
win.loadFile(join(VIEW_DIR, "first-launch.html"));
loadView(win, "first-launch.html");
win.webContents.addListener("console-message", (_e, _l, msg) => {
if (msg === "cancel") return app.exit();