mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-21 09:23:00 +00:00
pwa adjustments
This commit is contained in:
@@ -8,8 +8,6 @@
|
|||||||
<button title="Update ready" class="icon" on:click={() => updateServiceWorker(true)}>update</button>
|
<button title="Update ready" class="icon" on:click={() => updateServiceWorker(true)}>update</button>
|
||||||
{:else if $offlineReady}
|
{:else if $offlineReady}
|
||||||
<div title="App can now be used offline" class="icon">offline_pin</div>
|
<div title="App can now be used offline" class="icon">offline_pin</div>
|
||||||
{:else}
|
|
||||||
<div title="Waiting to be offline ready..." class="icon working">offline_bolt</div>
|
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@@ -19,18 +17,4 @@
|
|||||||
background: transparent;
|
background: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes working {
|
|
||||||
from {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
to {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.working {
|
|
||||||
animation: working 1s ease alternate-reverse infinite;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -22,9 +22,6 @@
|
|||||||
/** @type {import('vite-plugin-pwa/types').RegisterSWOptions} */
|
/** @type {import('vite-plugin-pwa/types').RegisterSWOptions} */
|
||||||
const swOptions = {
|
const swOptions = {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
onRegisteredSW(url, registration) {
|
|
||||||
console.log("Service Worker Registered", url, registration)
|
|
||||||
},
|
|
||||||
onRegisterError(error) {
|
onRegisterError(error) {
|
||||||
console.log("ServiceWorker Registration Error", error)
|
console.log("ServiceWorker Registration Error", error)
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user