migrate executeJavaScript calls to new command system

This commit is contained in:
Vendicated
2025-05-16 21:00:32 +02:00
parent bb3cec0d13
commit 3295a7d344
5 changed files with 51 additions and 23 deletions

View File

@@ -7,6 +7,7 @@
import { app } from "electron";
import { existsSync, mkdirSync, renameSync, rmSync, writeFileSync } from "fs";
import { join } from "path";
import { stripIndent } from "shared/utils/text";
interface AutoStart {
isEnabled(): boolean;
@@ -31,15 +32,15 @@ function makeAutoStartLinux(): AutoStart {
return {
isEnabled: () => existsSync(file),
enable() {
const desktopFile = `
[Desktop Entry]
Type=Application
Name=Vesktop
Comment=Vesktop autostart script
Exec=${commandLine}
StartupNotify=false
Terminal=false
`.trim();
const desktopFile = stripIndent`
[Desktop Entry]
Type=Application
Name=Vesktop
Comment=Vesktop autostart script
Exec=${commandLine}
StartupNotify=false
Terminal=false
`;
mkdirSync(dir, { recursive: true });
writeFileSync(file, desktopFile);