From f2384f27143fa59ced5932069798ee41c9fd5a3a Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Tue, 29 Apr 2025 13:31:52 -0400 Subject: [PATCH] Hopefully improved bug fix for IDAA members. --- src/routes/+layout.svelte | 56 ++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index a5f93fb1..7f9227e5 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -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);