Update timeline
parent
9c268ed824
commit
1880501ae4
|
@ -35,13 +35,13 @@ export const eventsData = [
|
|||
},
|
||||
{
|
||||
name: 'Reminiscent Regimen',
|
||||
pos: '0% 30%',
|
||||
pos: '0% 35%',
|
||||
image: 'reminiscent_regimen.jpg',
|
||||
start: '2022-08-04 10:00:00',
|
||||
end: '2022-08-15 03:59:59',
|
||||
color: '#82cff9',
|
||||
zoom: '100%',
|
||||
url: 'https://www.hoyolab.com/article/6197391',
|
||||
zoom: '250%',
|
||||
url: 'https://www.hoyolab.com/article/6533766',
|
||||
showOnHome: true,
|
||||
},
|
||||
],
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
<script>
|
||||
async function resetSW() {
|
||||
if ('serviceWorker' in navigator) {
|
||||
try {
|
||||
const r = await navigator.serviceWorker.getRegistration('/');
|
||||
const val = await r.unregister();
|
||||
alert(`unregister sw: ${val}`);
|
||||
} catch (err) {
|
||||
alert(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function resetCache() {
|
||||
if ('caches' in window) {
|
||||
try {
|
||||
const keys = await caches.keys();
|
||||
for (const key of keys) {
|
||||
await caches.delete(key);
|
||||
}
|
||||
alert('static assets deleted');
|
||||
} catch (err) {
|
||||
alert(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function both() {
|
||||
await resetSW();
|
||||
await resetCache();
|
||||
window.location.reload();
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="lg:ml-64 pt-20 px-4 md:px-8 lg:pt-8 flex flex-col gap-4 max-w-screen-sm">
|
||||
<h1 class="text-white text-xl font-bold">Debug Options</h1>
|
||||
<button class="ring-2 hover:ring-4 ring-primary text-white rounded-md px-4 py-2" on:click={both}>
|
||||
Reset Service Worker & Assets Cache
|
||||
</button>
|
||||
<button class="ring-2 hover:ring-4 ring-primary text-white rounded-md px-4 py-2" on:click={resetSW}>
|
||||
Reset Service Worker Only
|
||||
</button>
|
||||
<button class="ring-2 hover:ring-4 ring-primary text-white rounded-md px-4 py-2" on:click={resetCache}>
|
||||
Reset Assets Cache Only
|
||||
</button>
|
||||
</div>
|
|
@ -2,12 +2,13 @@ import { version } from '$service-worker';
|
|||
|
||||
const CACHE = `cache${version}`;
|
||||
|
||||
const IMAGE_CACHE_VER = '1658928624';
|
||||
const IMAGE_CACHE_VER = '1659457045';
|
||||
const IMAGE_CACHE = `cacheimg${IMAGE_CACHE_VER}`;
|
||||
|
||||
const IMAGE_URL = `${self.location.origin}/images/`;
|
||||
|
||||
const changelog = [
|
||||
'Update timeline',
|
||||
'Fix missing banner image',
|
||||
'Add Yoimiya & the weapon banner',
|
||||
'Add total pull on weapon list page',
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 164 KiB |
Loading…
Reference in New Issue