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 18:17:16 -07:00
parent 9bc16cfb0b
commit c0425bc722
2 changed files with 6 additions and 15 deletions

View File

@@ -11,17 +11,9 @@ self.addEventListener('install', (event) => {
for (const asset of cacheAssets) {
await cache.add(asset);
cachedAssets++;
const progress = `${cachedAssets}/${totalAssets}`;
const progress = `${++cachedAssets}/${totalAssets}`;
self.clients.matchAll().then((clients) => {
clients.forEach((client) => {
client.postMessage({
title: 'sw-install-progress',
message: progress,
});
});
});
console.log(`Cached: ${asset} (${progress})`);
}
})
);