1
0
mirror of https://github.com/zumbiepig/MineXLauncher.git synced 2025-06-26 10:05:10 +00:00
This commit is contained in:
zumbiepig
2024-08-19 08:22:45 -07:00
parent 365d5014d1
commit 978bb9a224
4 changed files with 11 additions and 5 deletions

View File

@@ -287,6 +287,7 @@ if (window.location.pathname === '/') {
alert(`MineXLauncher has been updated to v${launcherVersion}!
Changes in v${launcherVersion}:
- MineXLauncher now works offline!
- You can now install MineXLauncher as a PWA web app`);
storage.local.set('lastVersion', launcherVersion);
}

View File

@@ -58,8 +58,12 @@ if (window.location.pathname === '/welcome.html') {
storage.local.set('theme', themeSelect.value);
storage.local.set('lastVersion', launcherVersion);
// @ts-expect-error
installPwaEvent?.prompt();
try {
// @ts-expect-error
installPwaEvent.prompt();
} catch (error) {
console.log('Failed to prompt PWA install:', error);
}
// @ts-expect-error
window.top.location.href = '/';