mirror of
https://github.com/zumbiepig/MineXLauncher.git
synced 2025-06-08 09:24:48 +00:00
.
This commit is contained in:
parent
fda6d95655
commit
1de5918911
@ -1,5 +1,5 @@
|
||||
const cacheVersion = 'v1.5';
|
||||
const cacheName = `minexlauncher-${cacheVersion}`;
|
||||
const cacheVersion = '1.5';
|
||||
const cacheName = `minexlauncher-v${cacheVersion}`;
|
||||
|
||||
self.addEventListener('install', (event) => {
|
||||
event.waitUntil(
|
||||
|
@ -51,7 +51,8 @@
|
||||
<div class="news-item">
|
||||
<!-- Don't forget to update launcherVersion and the changelog in main.js as well -->
|
||||
<strong>MineXLauncher 1.5</strong>
|
||||
<li>hello there</li>
|
||||
<li>MineXLauncher now works offline!</li>
|
||||
<li>You can now install MineXLauncher as a PWA web app</li>
|
||||
<br />
|
||||
<strong>MineXLauncher 1.4</strong>
|
||||
<li>Added welcome and setup screen</li>
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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 = '/';
|
||||
|
Loading…
x
Reference in New Issue
Block a user