From 01767659da879a21a92fd2aea305177b423143dc Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Fri, 5 Apr 2024 12:08:57 +0200 Subject: [PATCH] update store version (#562) * tweak online check * add ms store manifest --- assets/lang/en-US.json | 2 +- package.json | 6 ++++++ src/main.ts | 3 ++- src/splash/splash.html | 10 +++++----- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/assets/lang/en-US.json b/assets/lang/en-US.json index 1a443bb..468c1af 100644 --- a/assets/lang/en-US.json +++ b/assets/lang/en-US.json @@ -1,6 +1,6 @@ { "loading_screen_start": "Starting ArmCord…", - "loading_screen_offline": "You appear to be offline. Please connect to the Internet and try again.", + "loading_screen_offline": "You appear to be offline. Restart in ", "loading_screen_update": "A new version of ArmCord is available. Please update to the latest version.", "setup_question1": "Welcome to the ArmCord Setup", "setup_offline": "You appear to be offline. Please connect to the internet and restart ArmCord.", diff --git a/package.json b/package.json index f9eea5b..a90ccc9 100644 --- a/package.json +++ b/package.json @@ -83,6 +83,12 @@ "rpm", "AppImage" ] + }, + "appx": { + "identityName": "53758smartfrigde.ArmCord", + "publisher": "CN=EAB3A6D3-7145-4623-8176-D579F573F339", + "publisherDisplayName": "smartfrigde", + "applicationId": "smartfrigde.ArmCord" } }, "packageManager": "pnpm@8.10.2" diff --git a/src/main.ts b/src/main.ts index a0ad99f..9f2f9d0 100644 --- a/src/main.ts +++ b/src/main.ts @@ -28,7 +28,7 @@ import {createKeybindWindow} from "./keybindMaker/main"; export let iconPath: string; export let settings: any; export let customTitlebar: boolean; -checkIfConfigIsBroken(); + app.on("render-process-gone", (event, webContents, details) => { if (details.reason == "crashed") { app.relaunch(); @@ -80,6 +80,7 @@ if (!app.requestSingleInstanceLock() && getConfigSync("multiInstance") == (false ); checkForDataFolder(); checkIfConfigExists(); + checkIfConfigIsBroken(); injectElectronFlags(); app.whenReady().then(async () => { if ((await getConfig("customIcon")) !== undefined ?? null) { diff --git a/src/splash/splash.html b/src/splash/splash.html index 64b67bf..7cd2b80 100644 --- a/src/splash/splash.html +++ b/src/splash/splash.html @@ -28,11 +28,11 @@ async function loadLang() { const text = document.getElementById("text-splashscreen"); if (window.navigator.onLine === false) { - text.innerHTML = await internal.getLang("loading_screen_offline"); - document.getElementById("ignore").style.display = "block"; - document.getElementById("ignore").onclick = () => { - window.internal.splashEnd(); - }; + for (let i = 0; i < 5; i++) { + await new Promise((r) => setTimeout(r, 1000)); + text.innerHTML = (await internal.getLang("loading_screen_offline")) + (5 - i) + "s"; + } + window.internal.restart(); } else { text.innerHTML = await internal.getLang("loading_screen_start"); if (window.internal.version === "3.3.0") {