Good saving point. Version reset looks good now.
This commit is contained in:
@@ -5,8 +5,8 @@ import type { Writable } from 'svelte/store';
|
||||
import type { key_val } from '$lib/ae_stores';
|
||||
|
||||
// Set the version for the app data. Changing this should force a notification and ask the user to clear and reload the page.
|
||||
let ver = '2025-10-15_1345';
|
||||
let ver_idb = '2025-10-15_1345';
|
||||
let ver = '2025-10-15_1401';
|
||||
let ver_idb = '2025-10-15_1401';
|
||||
|
||||
/* *** BEGIN *** Initialize events_local_data_struct */
|
||||
// Longer-term app data. This should be stored to *local* storage.
|
||||
|
||||
@@ -102,8 +102,10 @@ function clear_local() {
|
||||
$ae_loc.authenticated_access = false;
|
||||
$ae_loc.edit_mode = false;
|
||||
|
||||
$ae_loc.ver = '';
|
||||
|
||||
localStorage.clear();
|
||||
window.localStorage.clear();
|
||||
// window.localStorage.clear();
|
||||
}
|
||||
|
||||
function clear_sess() {
|
||||
@@ -134,11 +136,13 @@ function clear_sess() {
|
||||
|
||||
> -->
|
||||
{#if ($events_loc?.ver !== $events_sess?.ver)}
|
||||
<div class="fixed inset-0 bg-pink-100/80 z-40">
|
||||
<button
|
||||
class="
|
||||
fixed top-16 left-0 right-0 z-50 p-4 m-8 sm:mx-16 md:mx-32
|
||||
btn btn-lg
|
||||
preset-tonal-warning preset-outlined-warning-400-600 hover:preset-filled-success-200-800
|
||||
btn btn-lg rounded-2xl
|
||||
preset-tonal-warning hover:preset-filled-success-200-800
|
||||
border-4 border-warning-300 dark:border-warning-700
|
||||
transition-all
|
||||
"
|
||||
onclick={() => {
|
||||
@@ -149,9 +153,12 @@ function clear_sess() {
|
||||
clear_local();
|
||||
// clear_sess();
|
||||
|
||||
alert('The page will now reload. You may need to sign in again.');
|
||||
// Clear local storage and reload the page to get the latest version.
|
||||
// window.localStorage.clear();
|
||||
location.reload();
|
||||
}}
|
||||
title="A new version of the launcher is available. Click to reload the page and get the latest version."
|
||||
title="A new version of One Sky IT's Aether Events module is available. Click to reload the page and use the latest version."
|
||||
>
|
||||
<span class="fas fa-sync-alt fa-spin m-1"></span>
|
||||
<span class="m-4 sm:mx-8 text-wrap">
|
||||
@@ -160,8 +167,14 @@ function clear_sess() {
|
||||
<div class="italic text-base">You may need to sign in again.</div>
|
||||
</span>
|
||||
<span class="fas fa-sync-alt fa-spin m-1"></span>
|
||||
|
||||
<!-- <span class="text-xs">
|
||||
$events_loc.ver=${$events_loc?.ver}<br>
|
||||
$events_sess.ver=${$events_sess?.ver}
|
||||
</span> -->
|
||||
</button>
|
||||
$events_loc.ver=${$events_loc?.ver} $events_sess.ver=${$events_sess?.ver}
|
||||
|
||||
</div>
|
||||
{/if}
|
||||
<!-- </Modal> -->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user