Hopefully improved bug fix for IDAA members.

This commit is contained in:
Scott Idem
2025-04-29 13:31:52 -04:00
parent be9c67e667
commit f2384f2714

View File

@@ -7,6 +7,9 @@ let log_lvl: number = 0;
// *** Import Svelte specific // *** Import Svelte specific
import { tick } from 'svelte'; import { tick } from 'svelte';
import { goto } from '$app/navigation'; import { goto } from '$app/navigation';
import '../app.postcss'; import '../app.postcss';
// *** Import other supporting libraries // *** Import other supporting libraries
@@ -75,30 +78,29 @@ if (log_lvl > 1) {
console.log(`ae_root +layout.svelte data:`, data); console.log(`ae_root +layout.svelte data:`, data);
} }
// Get the current datetime // goto('/', {replaceState: true, invalidateAll: true});
let early_check_current_datetime = new Date(); // Date.now() // try {
// goto(data.route.id, {replaceState: true, invalidateAll: true});
// Check if the iframe parameter is set to true // } catch (e) {
// let early_check_iframe = data.url.searchParams.get('iframe'); // console.log('Error going to root page:', e);
// goto('/', {replaceState: true, invalidateAll: true});
// if (
// browser
// && early_check_iframe == 'true'
// && (
// !$ae_loc?.last_cache_refresh
// || (
// $ae_loc?.last_cache_refresh
// && (Date.now() - $ae_loc?.last_cache_refresh) > 1 * 60 * 1000
// )
// )
// ) {
// console.log(`TEST: Use iframe layout! last_cache_refresh:`, $ae_loc?.last_cache_refresh);
// // localStorage.clear();
// window.location.reload();
// } // }
if (browser && data.route.id !== '/') {
// try {
// goto(data.route.id, {replaceState: true, invalidateAll: true});
// } catch (e) {
// console.log('Error going to root page:', e);
// goto('/', {replaceState: true, invalidateAll: true});
// }
// goto('/', {replaceState: true, invalidateAll: true});
// $ae_loc = {};
// $ae_loc.app_cfg = {};
}
let trigger_clear_access: null|boolean = $state(null); let trigger_clear_access: null|boolean = $state(null);
// let account_id = localStorage.getItem('ae_account_id'); // let account_id = localStorage.getItem('ae_account_id');
@@ -136,11 +138,11 @@ if (log_lvl > 1) {
} }
// if (!$ae_loc?.app_cfg) { if (!$ae_loc?.app_cfg) {
// $ae_loc.app_cfg = {}; $ae_loc.app_cfg = {};
// $ae_loc.app_cfg.show_element__menu_btn = true; $ae_loc.app_cfg.show_element__menu_btn = true;
// $ae_loc.app_cfg.show_element__menu = false; $ae_loc.app_cfg.show_element__menu = false;
// } }
// if (!$ae_loc?.ver_testing) { // if (!$ae_loc?.ver_testing) {
// console.log(`TEST: AE Stores - ver_testing missing:`, $ae_loc); // console.log(`TEST: AE Stores - ver_testing missing:`, $ae_loc);