Working on annoying version bug fixes. Also trying to make sure the show/hide lock menu works correctly.
This commit is contained in:
@@ -47,7 +47,7 @@ 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 = '2025-04-18_1335';
|
||||
let ver = '2025-04-18_1335'; // KEEP: 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.
|
||||
@@ -244,6 +244,9 @@ export let ae_app_local_data_struct: key_val = {
|
||||
test: true,
|
||||
}
|
||||
// console.log(`AE Stores - App Local Storage Data:`, ae_app_local_data_struct);
|
||||
if (!ae_app_local_data_struct.ver1) {
|
||||
console.log(`AE Stores - App Local Storage Data:`, ae_app_local_data_struct);
|
||||
}
|
||||
|
||||
// This works, but does not uses local storage:
|
||||
// export let ae_loc = writable(ae_app_local_data_struct);
|
||||
|
||||
@@ -111,6 +111,13 @@ if (log_lvl > 1) {
|
||||
console.log(`$slct = `, $slct);
|
||||
}
|
||||
|
||||
|
||||
// if (!$ae_loc?.app_cfg) {
|
||||
// $ae_loc.app_cfg = {};
|
||||
// $ae_loc.app_cfg.show_element__menu_btn = true;
|
||||
// $ae_loc.app_cfg.show_element__menu = false;
|
||||
// }
|
||||
|
||||
// // This should only be temporary. || !$ae_loc?.person || !$ae_loc?.user
|
||||
// if (!$ae_loc) {
|
||||
// console.log('No ae_loc. Reloading page...');
|
||||
@@ -255,21 +262,31 @@ if (browser) {
|
||||
// localStorage.removeItem('ae_idaa_loc');
|
||||
// localStorage.removeItem('ae_journals_loc');
|
||||
// localStorage.removeItem('ae_events_loc');
|
||||
// localStorage.clear();
|
||||
localStorage.clear();
|
||||
|
||||
// sessionStorage.removeItem('ae_sess');
|
||||
// sessionStorage.removeItem('events_sess');
|
||||
// console.log('Clearing sessionStorage...');
|
||||
// sessionStorage.clear();
|
||||
|
||||
// try {
|
||||
// goto(data.route.id, {replaceState: true, invalidateAll: true});
|
||||
// } catch (e) {
|
||||
// console.log('Error going to root page:', e);
|
||||
// }
|
||||
|
||||
// Go to root if not already there. Do this in case things have significantly changed, including routes. We need them to manually click the Reload and Clear Cache button.
|
||||
console.log('Going to root page...');
|
||||
if (data.route.id !== '/') {
|
||||
goto('/', {replaceState: true, invalidateAll: true});
|
||||
}
|
||||
// console.log('Going to root page...');
|
||||
// if (data.route.id !== '/') {
|
||||
// goto('/', {replaceState: true, invalidateAll: true});
|
||||
// }
|
||||
} else if (!$ae_loc?.app_cfg) {
|
||||
console.log('No ae_loc.app_cfg. Reloading page...?');
|
||||
|
||||
$ae_loc.app_cfg = {};
|
||||
$ae_loc.app_cfg.show_element__menu_btn = true;
|
||||
$ae_loc.app_cfg.show_element__menu = false;
|
||||
|
||||
// $ae_loc = {};
|
||||
// localStorage.removeItem('ae_loc');
|
||||
// localStorage.removeItem('ae_idaa_loc');
|
||||
@@ -285,6 +302,7 @@ if (browser) {
|
||||
// location.reload();
|
||||
// tick();
|
||||
// $ae_loc.app_cfg = {};
|
||||
// goto(data.route.id, {replaceState: true, invalidateAll: true});
|
||||
} else if ($ae_loc?.app_cfg && !$ae_loc?.app_cfg?.show_element__menu_btn) {
|
||||
console.log('No ae_loc.app_cfg.show_element__menu_btn. Forcing show.');
|
||||
$ae_loc.app_cfg.show_element__menu_btn = true;
|
||||
|
||||
Reference in New Issue
Block a user