Making a better version check and refresh/reload

This commit is contained in:
Scott Idem
2025-04-18 13:38:47 -04:00
parent 35b4079b90
commit fb937290eb
4 changed files with 221 additions and 55 deletions

View File

@@ -47,14 +47,14 @@ export let ae_snip = string_snippets;
// };
// 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 = '2024-08-21_1736';
let ver_idb = '2024-10-16_1540';
let ver = '2025-04-18_1335';
let ver_idb = '2025-04-18_1100'; // Not used
// *** BEGIN *** Longer-term app data. This should be stored to local storage.
export let ae_app_local_data_struct: key_val = {
last_idb_reload: null,
ver: '2024-10-16_1540',
ver_idb: '2024-10-16_1540', // Clear if date IndexedDB version
ver: ver, // '2025-04-18_1100',
ver_idb: ver_idb, // '2025-04-18_1100',
name: 'Aether - App Hub (SvelteKit 2.x Svelte 4.x)',
theme: 'light',
theme_mode: 'light',
@@ -116,6 +116,8 @@ export let ae_app_local_data_struct: key_val = {
// affiliations: null,
primary_email: null, // The primary email of the logged-in person/user
user_id: null, // The user ID of the logged-in user
show_content__person_page_help: false,
},
// Added 2025-04-04
@@ -239,10 +241,6 @@ export let ae_app_local_data_struct: key_val = {
'testing': {},
},
'person': {
show_content__person_page_help: false,
},
test: true,
}
// console.log(`AE Stores - App Local Storage Data:`, ae_app_local_data_struct);
@@ -257,8 +255,8 @@ export let ae_loc: Writable<key_val> = localStorageStore('ae_loc', ae_app_local_
// *** BEGIN *** Temporary app data. This should be stored to session storage.
export let ae_app_session_data_struct: key_val = {
'ver': '2024-10-16_1540',
// ver_idb: ver_idb,
ver: ver, // '2025-04-18_1100',
ver_idb: ver_idb,
log_lvl: 0,
// 'name': 'Aether App Template',

View File

@@ -276,7 +276,7 @@ async function handle_change_password() {
Hide Sign-In Options
{:else}
<User class="mx-1 inline-block text-gray-500" />
{$ae_loc?.person.full_name ?? '-- not set --'}
{$ae_loc?.person?.full_name ?? '-- not set --'}
{/if}
{:else}
@@ -308,7 +308,7 @@ async function handle_change_password() {
$ae_sess.show__sign_in_out__fields = !$ae_sess.show__sign_in_out__fields; // Toggle the visibility of the sign-in form
}}
> -->
{$ae_loc?.person.full_name ?? '-- not set --'}
{$ae_loc?.person?.full_name ?? '-- not set --'}
<!-- <span class="text-sm text-gray-500">
{$ae_loc?.user.username ?? '-- not set --'}
</span> -->
@@ -607,7 +607,7 @@ async function handle_change_password() {
<div class="flex flex-col gap-1 items-end justify-center">
<span class="text-sm text-gray-500">
{$ae_loc?.user.username ?? '-- not set --'}
{$ae_loc?.user?.username ?? '-- not set --'}
</span>
<!-- Display change password option if the user is signed in and in Edit Mode -->