More work on making the loading process better
This commit is contained in:
@@ -5,6 +5,14 @@ export let data: any;
|
||||
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
import {
|
||||
Brain,
|
||||
House,
|
||||
Library,
|
||||
RefreshCw, RefreshCcwDot,
|
||||
Satellite
|
||||
} from '@lucide/svelte';
|
||||
|
||||
// import { PUBLIC_TESTING } from '$env/static/public';
|
||||
// console.log(`AE Config - +page.svelte PUBLIC_TESTING:`, PUBLIC_TESTING);
|
||||
|
||||
@@ -67,23 +75,34 @@ onMount(() => {
|
||||
window.location.reload(true);
|
||||
}}
|
||||
class="btn btn-sm m-1 variant-glass-surface hover:variant-outline-warning text-error-300 hover:text-error-800 transition-all"
|
||||
title="Reload and clear the page cache"
|
||||
title="Reload page to clear some caches and check for updates"
|
||||
>
|
||||
<span class="fas fa-sync mx-1"></span>
|
||||
<!-- <span class="fas fa-sync mx-1"></span> -->
|
||||
<RefreshCw class="mx-1" />
|
||||
Reload
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
on:click={() => {
|
||||
// Clear Indexed DB
|
||||
indexedDB.deleteDatabase('ae_archives_db'); // Archives module
|
||||
indexedDB.deleteDatabase('ae_core_db');
|
||||
indexedDB.deleteDatabase('ae_events_db'); // Events module
|
||||
indexedDB.deleteDatabase('ae_journals_db'); // Journals module
|
||||
indexedDB.deleteDatabase('ae_posts_db'); // Posts module
|
||||
indexedDB.deleteDatabase('ae_sponsorships_db'); // Sponsorships module
|
||||
|
||||
localStorage.clear();
|
||||
sessionStorage.clear();
|
||||
|
||||
alert('Local and Session Storage cleared. The page should now refresh on its own.');
|
||||
window.location.reload(true);
|
||||
}}
|
||||
class="btn btn-sm m-1 p-1 variant-glass-surface hover:variant-outline-warning text-error-300 hover:text-error-800 transition-all"
|
||||
title="Reload and clear the page cache"
|
||||
title="Clear IDB, localStorage, and sessionStorage and then reload to clear the page cache"
|
||||
>
|
||||
<span class="fas fa-sync mx-1"></span>
|
||||
<!-- <span class="fas fa-sync mx-1"></span> -->
|
||||
<RefreshCcwDot class="mx-1" />
|
||||
Clear Storage and Reload
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user