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 { tick } from 'svelte';
import { goto } from '$app/navigation';
import '../app.postcss';
// *** Import other supporting libraries
@@ -75,30 +78,29 @@ if (log_lvl > 1) {
console.log(`ae_root +layout.svelte data:`, data);
}
// Get the current datetime
let early_check_current_datetime = new Date(); // Date.now()
// Check if the iframe parameter is set to true
// let early_check_iframe = data.url.searchParams.get('iframe');
// 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();
// goto('/', {replaceState: true, invalidateAll: true});
// try {
// goto(data.route.id, {replaceState: true, invalidateAll: true});
// } catch (e) {
// console.log('Error going to root page:', e);
// goto('/', {replaceState: true, invalidateAll: true});
// }
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 account_id = localStorage.getItem('ae_account_id');
@@ -136,11 +138,11 @@ if (log_lvl > 1) {
}
// 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;
// }
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;
}
// if (!$ae_loc?.ver_testing) {
// console.log(`TEST: AE Stores - ver_testing missing:`, $ae_loc);