General code clean up. Removing old stuff.
This commit is contained in:
@@ -11,13 +11,13 @@
|
||||
import '../app.css';
|
||||
|
||||
// *** Import other supporting libraries
|
||||
import {
|
||||
ArrowBigRight,
|
||||
CircleX,
|
||||
RefreshCw,
|
||||
RefreshCcw,
|
||||
RefreshCcwDot
|
||||
} from '@lucide/svelte';
|
||||
// import {
|
||||
// ArrowBigRight,
|
||||
// CircleX,
|
||||
// RefreshCw,
|
||||
// RefreshCcw,
|
||||
// RefreshCcwDot
|
||||
// } from '@lucide/svelte';
|
||||
|
||||
// Highlight JS
|
||||
import hljs from 'highlight.js/lib/core';
|
||||
@@ -36,11 +36,11 @@
|
||||
hljs.registerLanguage('typescript', typescript);
|
||||
|
||||
// *** Import Aether specific variables and functions
|
||||
import Analytics from '$lib/app_components/analytics.svelte';
|
||||
// import Analytics from '$lib/app_components/analytics.svelte';
|
||||
import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/stores/ae_stores';
|
||||
import { events_loc, events_slct } from '$lib/stores/ae_events_stores';
|
||||
// import { events_loc, events_slct } from '$lib/stores/ae_events_stores';
|
||||
|
||||
import MyClipboard from '$lib/app_components/e_app_clipboard.svelte';
|
||||
// import MyClipboard from '$lib/app_components/e_app_clipboard.svelte';
|
||||
import E_app_debug_menu from '$lib/app_components/e_app_debug_menu.svelte';
|
||||
import E_app_sys_menu from '$lib/app_components/e_app_sys_menu.svelte';
|
||||
|
||||
@@ -50,18 +50,18 @@
|
||||
}
|
||||
|
||||
let { data, children }: Props = $props();
|
||||
|
||||
|
||||
// STABLE DERIVATION: Using prop data directly to avoid store loops
|
||||
let ae_acct = $derived(data[data.account_id]);
|
||||
|
||||
let flag_clear_idb: boolean = $state(false);
|
||||
let flag_clear_local: boolean = $state(false);
|
||||
let flag_clear_sess: boolean = $state(false);
|
||||
let flag_reload: boolean = $state(false);
|
||||
let flag_reload: boolean = $state(false);
|
||||
|
||||
let flag_new_ver: boolean = $state(false);
|
||||
let flag_expired: boolean = $state(false);
|
||||
let flag_denied: boolean = $state(false);
|
||||
let flag_new_ver: boolean = $state(false);
|
||||
let flag_expired: boolean = $state(false);
|
||||
let flag_denied: boolean = $state(false);
|
||||
|
||||
// Connection Status
|
||||
let is_offline = $derived(browser && online.current === false);
|
||||
@@ -92,7 +92,7 @@
|
||||
// Restore structural integrity if clobbered
|
||||
if (!new_loc.sys_menu) new_loc.sys_menu = { hide: false, hide_access_type: false, expand_access_type: false, hide_edit_mode: false, expand_edit_mode: false, hide_user: false, expand_user: false, hide_theme: false, expand_theme: false, hide_cfg: false, expand_cfg: false };
|
||||
if (!new_loc.debug_menu) new_loc.debug_menu = { hide: false, expand: false };
|
||||
|
||||
|
||||
if (JSON.stringify(current_loc) !== JSON.stringify(new_loc)) {
|
||||
$ae_loc = new_loc;
|
||||
}
|
||||
@@ -149,7 +149,7 @@
|
||||
|
||||
if (flag_clear_local) clear_local();
|
||||
if (flag_clear_sess) clear_sess();
|
||||
|
||||
|
||||
console.log("ROOT: Executing throttled reload");
|
||||
invalidateAll();
|
||||
});
|
||||
@@ -160,10 +160,10 @@
|
||||
let is_hydrating = $state(true);
|
||||
$effect(() => {
|
||||
if (!browser) return;
|
||||
|
||||
|
||||
// Theme DOM update
|
||||
document.documentElement.setAttribute('data-theme', $ae_loc?.theme_name ?? 'nouveau');
|
||||
|
||||
|
||||
// Hydration overlay timer
|
||||
if ($ae_loc?.account_id) {
|
||||
const timer = setTimeout(() => is_hydrating = false, 500);
|
||||
@@ -229,7 +229,7 @@
|
||||
</svelte:head>
|
||||
|
||||
{#if browser && (is_offline || api_unreachable)}
|
||||
<div class="fixed top-0 left-0 right-0 z-[100] p-4 bg-orange-600/90 text-white text-center shadow-2xl flex items-center justify-center gap-4">
|
||||
<div class="fixed top-0 left-0 right-0 z-100 p-4 bg-orange-600/90 text-white text-center shadow-2xl flex items-center justify-center gap-4">
|
||||
<span class="text-xl font-bold">{is_offline ? 'Offline' : api_error_msg}</span>
|
||||
<button class="btn btn-sm variant-filled-white text-orange-600" onclick={() => window.location.reload()}>Retry</button>
|
||||
</div>
|
||||
@@ -237,9 +237,9 @@
|
||||
|
||||
{#if browser && $ae_loc?.allow_access}
|
||||
{@render children?.()}
|
||||
|
||||
|
||||
{#if is_hydrating}
|
||||
<div class="fixed inset-0 z-[99] flex flex-col items-center justify-center bg-surface-50/80 dark:bg-surface-900/80 backdrop-blur-sm transition-opacity duration-500">
|
||||
<div class="fixed inset-0 z-99 flex flex-col items-center justify-center bg-surface-50/80 dark:bg-surface-900/80 backdrop-blur-sm transition-opacity duration-500">
|
||||
<div class="preset-filled-surface-100-900 p-8 rounded-2xl shadow-2xl flex flex-col items-center gap-4">
|
||||
<span class="fas fa-cog fa-spin text-5xl text-primary-500"></span>
|
||||
<div class="text-center font-bold text-xl">Hydrating Aether...</div>
|
||||
|
||||
Reference in New Issue
Block a user