Moving more pages to Runes mode.
This commit is contained in:
@@ -1,12 +1,13 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
/** @type {import('./$types').LayoutData} */
|
/** @type {import('./$types').LayoutData} */
|
||||||
export let data: any;
|
|
||||||
let log_lvl: number = 0;
|
let log_lvl: number = 0;
|
||||||
// console.log(`ae_ Svelte root +layout data:`, data);
|
// console.log(`ae_ Svelte root +layout data:`, data);
|
||||||
|
|
||||||
|
// *** Import Svelte specific
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
import '../app.postcss';
|
import '../app.postcss';
|
||||||
|
|
||||||
|
// *** Import other supporting libraries
|
||||||
import { AppShell, AppBar, initializeStores } from '@skeletonlabs/skeleton';
|
import { AppShell, AppBar, initializeStores } from '@skeletonlabs/skeleton';
|
||||||
// Initialize the stores for Drawer, Modal, and Toast so they work throughout the app.
|
// Initialize the stores for Drawer, Modal, and Toast so they work throughout the app.
|
||||||
initializeStores();
|
initializeStores();
|
||||||
@@ -26,7 +27,6 @@ const modalRegistry: Record<string, ModalComponent> = {
|
|||||||
// ...
|
// ...
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Highlight JS
|
// Highlight JS
|
||||||
import hljs from 'highlight.js/lib/core';
|
import hljs from 'highlight.js/lib/core';
|
||||||
import 'highlight.js/styles/github-dark.css';
|
import 'highlight.js/styles/github-dark.css';
|
||||||
@@ -52,17 +52,20 @@ import { computePosition, autoUpdate, flip, shift, offset, arrow } from '@floati
|
|||||||
import { storePopup } from '@skeletonlabs/skeleton';
|
import { storePopup } from '@skeletonlabs/skeleton';
|
||||||
storePopup.set({ computePosition, autoUpdate, flip, shift, offset, arrow });
|
storePopup.set({ computePosition, autoUpdate, flip, shift, offset, arrow });
|
||||||
|
|
||||||
|
// *** Import Aether specific variables and functions
|
||||||
import Analytics from '$lib/analytics.svelte'
|
import Analytics from '$lib/analytics.svelte'
|
||||||
// import { api } from '$lib/api';
|
// import { api } from '$lib/api';
|
||||||
import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/ae_stores';
|
import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/ae_stores';
|
||||||
import { events_loc, events_slct } from '$lib/ae_events_stores';
|
import { events_loc, events_slct } from '$lib/ae_events_stores';
|
||||||
import type { key_val } from '$lib/ae_stores';
|
// import type { key_val } from '$lib/ae_stores';
|
||||||
|
|
||||||
import Element_access_type from '$lib/element_access_type.svelte';
|
import Element_access_type from '$lib/element_access_type.svelte';
|
||||||
import Element_app_cfg from '$lib/element_app_cfg.svelte';
|
import Element_app_cfg from '$lib/element_app_cfg.svelte';
|
||||||
import Element_data_store from '$lib/element_data_store_v2.svelte';
|
import Element_data_store from '$lib/element_data_store_v2.svelte';
|
||||||
|
|
||||||
|
|
||||||
|
export let data: any;
|
||||||
|
|
||||||
// let account_id = localStorage.getItem('ae_account_id');
|
// let account_id = localStorage.getItem('ae_account_id');
|
||||||
// console.log(`account_id = `, account_id);
|
// console.log(`account_id = `, account_id);
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,29 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
/** @type {import('./$types').LayoutData} */
|
/** @type {import('./$types').LayoutData} */
|
||||||
export let data: any;
|
let log_lvl: number = 0;
|
||||||
|
|
||||||
import { goto } from '$app/navigation';
|
// *** Import Svelte specific
|
||||||
import { onMount } from 'svelte';
|
// import { goto } from '$app/navigation';
|
||||||
// import type { Writable } from 'svelte/store';
|
// import type { Writable } from 'svelte/store';
|
||||||
// import { localStorageStore } from '@skeletonlabs/skeleton';
|
// import { localStorageStore } from '@skeletonlabs/skeleton';
|
||||||
|
|
||||||
import type { key_val } from '$lib/ae_stores';
|
// *** Import Aether specific variables and functions
|
||||||
|
// import type { key_val } from '$lib/ae_stores';
|
||||||
// import { ae_util } from '$lib/ae_utils/ae_utils';
|
// import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||||
// import { api } from '$lib/api';
|
// import { api } from '$lib/api';
|
||||||
import { ae_loc, ae_sess, ae_api, slct } from '$lib/ae_stores';
|
import { ae_loc, ae_sess, ae_api, slct } from '$lib/ae_stores';
|
||||||
import { events_loc, events_slct, events_trigger, events_trig_kv } from '$lib/ae_events_stores';
|
import { events_loc, events_slct, events_trigger, events_trig_kv } from '$lib/ae_events_stores';
|
||||||
import { events_func } from '$lib/ae_events_functions';
|
|
||||||
|
|
||||||
// import Element_data_store from '$lib/element_data_store_v2.svelte';
|
// import Element_data_store from '$lib/element_data_store_v2.svelte';
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
data: any;
|
||||||
|
children?: import('svelte').Snippet;
|
||||||
|
}
|
||||||
|
|
||||||
|
let { data, children }: Props = $props();
|
||||||
|
|
||||||
|
|
||||||
$events_loc.qry__enabled = 'enabled';
|
$events_loc.qry__enabled = 'enabled';
|
||||||
$events_loc.qry__hidden = 'not_hidden';
|
$events_loc.qry__hidden = 'not_hidden';
|
||||||
$events_loc.qry__limit = 15;
|
$events_loc.qry__limit = 15;
|
||||||
@@ -23,23 +31,19 @@ $events_loc.qry__offset = 0;
|
|||||||
|
|
||||||
// Quickly save the data passed from the parent(s) to the Svelte stores, localStorage, and other.
|
// Quickly save the data passed from the parent(s) to the Svelte stores, localStorage, and other.
|
||||||
$slct.account_id = data.account_id;
|
$slct.account_id = data.account_id;
|
||||||
console.log(`$slct.account_id = `, $slct.account_id);
|
if (log_lvl) {
|
||||||
|
console.log(`$slct.account_id = `, $slct.account_id);
|
||||||
|
}
|
||||||
let ae_acct = data[$slct.account_id];
|
let ae_acct = data[$slct.account_id];
|
||||||
// console.log(`ae_acct = `, ae_acct);
|
if (log_lvl) {
|
||||||
|
console.log(`ae_acct = `, ae_acct);
|
||||||
|
}
|
||||||
|
|
||||||
$events_slct.event_id = ae_acct.slct.event_id;
|
$events_slct.event_id = ae_acct.slct.event_id;
|
||||||
$events_slct.event_obj = ae_acct.slct.event_obj;
|
$events_slct.event_obj = ae_acct.slct.event_obj;
|
||||||
$events_slct.event_obj_li = ae_acct.slct.event_obj_li;
|
$events_slct.event_obj_li = ae_acct.slct.event_obj_li;
|
||||||
|
|
||||||
let ae_promises: key_val = {};
|
// let ae_promises: key_val = {};
|
||||||
|
|
||||||
|
|
||||||
onMount(() => {
|
|
||||||
console.log('Core - Root: +layout.svelte');
|
|
||||||
|
|
||||||
console.log($events_slct.event_obj_li);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// Updated 2024-06-25
|
// Updated 2024-06-25
|
||||||
// $: if ($events_trigger == 'load__event_session_obj_id' && $events_trig_kv['event_session_id']) {
|
// $: if ($events_trigger == 'load__event_session_obj_id' && $events_trig_kv['event_session_id']) {
|
||||||
@@ -64,11 +68,11 @@ onMount(() => {
|
|||||||
|
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>Core - {$events_loc.title ?? 'Æ loading...'}</title>
|
<title>Core - {$ae_loc.title ?? 'Æ loading...'}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
|
|
||||||
{#if $ae_loc.manager_access && 1==3}
|
{#if $ae_loc?.manager_access === 'test-new-submenu'}
|
||||||
<section
|
<section
|
||||||
class="submenu flex flex-row justify-center"
|
class="submenu flex flex-row justify-center"
|
||||||
class:hidden={$ae_loc.iframe}
|
class:hidden={$ae_loc.iframe}
|
||||||
@@ -79,23 +83,20 @@ onMount(() => {
|
|||||||
<!-- <a href="/settings/{item.slug}">{item.title}</a> -->
|
<!-- <a href="/settings/{item.slug}">{item.title}</a> -->
|
||||||
<!-- class:hidden={!$ae_loc.trusted_access && item.access} -->
|
<!-- class:hidden={!$ae_loc.trusted_access && item.access} -->
|
||||||
{#if item.disable}
|
{#if item.disable}
|
||||||
<button
|
<!-- <button
|
||||||
title={item.title}
|
title={item.title}
|
||||||
class="hover:variant-ghost-secondary"
|
class="hover:variant-ghost-secondary"
|
||||||
class:hidden={(!$ae_loc.trusted_access && item.access === 'trusted') || (!$ae_loc.administrator_access && item.access === 'administrator' || item.hide)}
|
class:hidden={(!$ae_loc.trusted_access && item.access === 'trusted') || (!$ae_loc.administrator_access && item.access === 'administrator' || item.hide)}
|
||||||
disabled={item.disable}
|
disabled={item.disable}
|
||||||
|
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
// window.location(item.href);
|
// goto(item.href, { });
|
||||||
// href={item.href}
|
|
||||||
// invalidateAll
|
|
||||||
goto(item.href, { });
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{item.name}
|
{item.name}
|
||||||
</button>
|
</button> -->
|
||||||
{:else}
|
{:else}
|
||||||
<a
|
<!-- <a
|
||||||
href={item.href}
|
href={item.href}
|
||||||
title={item.title}
|
title={item.title}
|
||||||
class="hover:variant-ghost-secondary"
|
class="hover:variant-ghost-secondary"
|
||||||
@@ -103,7 +104,7 @@ onMount(() => {
|
|||||||
class:disabled={item.disable}
|
class:disabled={item.disable}
|
||||||
>
|
>
|
||||||
{item.name}
|
{item.name}
|
||||||
</a>
|
</a> -->
|
||||||
{/if}
|
{/if}
|
||||||
{/each}
|
{/each}
|
||||||
</span>
|
</span>
|
||||||
@@ -113,5 +114,5 @@ onMount(() => {
|
|||||||
|
|
||||||
|
|
||||||
<!-- <div class="container m-auto"> -->
|
<!-- <div class="container m-auto"> -->
|
||||||
<slot></slot>
|
{@render children?.()}
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
|
|||||||
Reference in New Issue
Block a user