Working on update a lot of pages using the ae_loc hub section.

This commit is contained in:
Scott Idem
2025-03-28 14:33:26 -04:00
parent 1059cf5683
commit 8539ccc2f4
21 changed files with 171 additions and 59 deletions

View File

@@ -317,8 +317,8 @@ if (browser) {
// document.getElementsByTagName('html')[0].classList.remove('dark');
// document.getElementsByTagName('html')[0].classList.remove('light');
$ae_loc.hub.show_element__access_type = false;
$ae_loc.hub.show_element__cfg = false;
$ae_loc.app_cfg.show_element__access_type = false;
$ae_loc.app_cfg.show_element__cfg = false;
} else if (iframe == 'false') {
$ae_loc.iframe = false;
@@ -328,14 +328,14 @@ if (browser) {
}
if (!$ae_loc.iframe && $ae_loc.trusted_access) {
$ae_loc.hub.show_element__access_type = true;
$ae_loc.hub.show_element__cfg = true;
$ae_loc.app_cfg.show_element__access_type = true;
$ae_loc.app_cfg.show_element__cfg = true;
} else if ($ae_loc.iframe && $ae_loc.manager_access) {
$ae_loc.hub.show_element__access_type = true;
$ae_loc.hub.show_element__cfg = true;
$ae_loc.app_cfg.show_element__access_type = true;
$ae_loc.app_cfg.show_element__cfg = true;
} else {
$ae_loc.hub.show_element__access_type = true;
$ae_loc.hub.show_element__cfg = false;
$ae_loc.app_cfg.show_element__access_type = true;
$ae_loc.app_cfg.show_element__cfg = false;
}
@@ -422,20 +422,23 @@ $effect(() => {
{#if $ae_loc.hub?.show_element__access_type}
{#if $ae_loc.app_cfg?.show_element__access_type}
<Element_access_type
hidden={$ae_loc.iframe && !$ae_loc.trusted_access}
/>
{/if}
<!-- {#if $ae_loc?.app_cfg?.show_element__cfg} -->
<span
class:hidden={!$ae_loc?.hub?.show_element__cfg}
class:hidden={!$ae_loc?.app_cfg?.show_element__cfg}
>
<!-- {#if $ae_loc?.hub?.show_element__cfg} -->
<Element_app_cfg set_theme_mode={true} set_theme_name={true} />
<!-- {/if} -->
<Element_app_cfg
set_theme_mode={true}
set_theme_name={true}
/>
</span>
<!-- {/if} -->
<div

View File

@@ -139,7 +139,7 @@ onMount(() => {
as_list={true}
/>
{/if}
<!-- {#if $ae_loc.admin.show_element__cfg_detail} -->
<!-- {#if $ae_loc.app_cfg.show_element__cfg_detail} -->

View File

@@ -106,7 +106,7 @@ async function handle_load_ae_obj_id__event_badge({event_badge_id, try_cache=fal
let params = {};
// $ae_loc.hub.event_badge_id_status_qry__search = 'loading';
// $ae_sess.hub.event_badge_id_status_qry__search = 'loading';
ae_event_badge_get_promise = api.get_ae_obj_id_crud({
api_cfg: $ae_api,
obj_type: 'event_badge',

View File

@@ -113,7 +113,7 @@ async function handle_load_ae_obj_id__event_badge({event_badge_id, try_cache=fal
let params = {};
// $ae_loc.hub.event_badge_id_status_qry__search = 'loading';
// $ae_sess.hub.event_badge_id_status_qry__search = 'loading';
ae_event_badge_get_promise = api.get_ae_obj_id_crud({
api_cfg: $ae_api,
obj_type: 'event_badge',

View File

@@ -282,7 +282,7 @@ async function handle_load_ae_obj_id__event_presenter({event_presenter_id, try_c
let params = {};
// $ae_loc.hub.event_presenter_id_qry_status = 'loading';
// $ae_sess.hub.event_presenter_id_qry_status = 'loading';
ae_event_presenter_obj_get_promise = api.get_ae_obj_id_crud({
api_cfg: $ae_api,
obj_type: 'event_presenter',

View File

@@ -179,7 +179,7 @@ async function handle_load_ae_obj_id__event_presenter({event_presenter_id, try_c
let params = {};
// $ae_loc.hub.event_presenter_id_qry_status = 'loading';
// $ae_sess.hub.event_presenter_id_qry_status = 'loading';
ae_event_presenter_get_promise = api.get_ae_obj_id_crud({
api_cfg: $ae_api,
obj_type: 'event_presenter',

View File

@@ -102,8 +102,8 @@ if (browser && iframe == 'true') {
// document.getElementsByTagName('html')[0].classList.remove('dark');
// document.getElementsByTagName('html')[0].classList.remove('light');
// $ae_loc.hub.show_element__access_type = false;
// $ae_loc.hub.show_element__cfg = false;
// $ae_loc.app_cfg.show_element__access_type = false;
// $ae_loc.app_cfg.show_element__cfg = false;
} else if (browser && iframe == 'false') {
// data_struct['iframe'] = false;
$ae_loc.iframe = false;

View File

@@ -1,11 +1,15 @@
<script lang="ts">
/** @type {import('./$types').LayoutProps} */
let { data, children } = $props();
// Imports
// *** Import Svelte specific
import { browser } from '$app/environment';
import { goto } from '$app/navigation';
// *** Import other supporting libraries
// import * as icons from '@lucide/svelte';
import { House } from '@lucide/svelte';
// *** Import Aether specific variables and functions
import type { key_val } from '$lib/ae_stores';
// import { ae_util } from '$lib/ae_utils/ae_utils';
// import { api } from '$lib/api';
@@ -15,6 +19,13 @@ import { journals_loc, journals_slct, journals_trig } from '$lib/ae_journals/ae_
// import Element_data_store from '$lib/element_data_store_v2.svelte';
// *** Setup Svelte properties
interface Props {
data: any;
children: any;
}
let { data, children }: Props = $props();
$journals_loc.qry__enabled = 'enabled';
$journals_loc.qry__hidden = 'not_hidden';
$journals_loc.qry__limit = 15;
@@ -57,8 +68,14 @@ if (browser) {
<!-- These are needed: h-full overflow-auto -->
<div class="ae_journals">
<nav class="submenu flex flex-row items-centr justify-center gap-1">
<a href="/" class="btn btn-sm variant-ghost-success hover:variant-filled-success">Home</a>
<nav class="submenu flex flex-row items-center justify-center gap-1">
<a
href="/"
class="btn btn-sm variant-ghost-success hover:variant-filled-success"
>
<House />
Home
</a>
<!-- <a href="/about" class="btn btn-sm">About</a> -->
<!-- <a href="/settings" class="btn btn-sm">Settings</a> -->
<button

View File

@@ -92,7 +92,8 @@ async function handle_update_journal() {
class="
ae_journals__journal
container h-full mx-auto
flex flex-col gap-1
flex flex-col
gap-1
py-1 px-2 pb-16
items-center
min-w-full
@@ -101,7 +102,16 @@ async function handle_update_journal() {
>
<div class="flex flex-row items-center justify-between w-full border-gray-200 border-y-2 py-2">
<div
class="
flex flex-row flex-wrap
gap-1
items-center justify-between
border-gray-200 border-y-
w-full
py-2
"
>
<a href="/journals"
class="
btn btn-sm

View File

@@ -6,10 +6,9 @@ let log_lvl: number = 0;
import { browser } from '$app/environment';
import { goto } from '$app/navigation';
// *** Import other supporting libraries
// import * as icons from '@lucide/svelte';
import { BookHeart, FilePlus } from '@lucide/svelte';
// *** Import other supporting libraries
import { Modal } from 'flowbite-svelte';
import { liveQuery } from "dexie";

View File

@@ -281,7 +281,7 @@ $effect(() => {
</header>
<div
class="flex flex-row gap-2 items-center justify-evenly w-full max-w-sm"
class="flex flex-row flex-wrap gap-1 items-center justify-evenly w-full max-w-sm"
>
<!-- Entry alert status -->
<button
@@ -591,7 +591,7 @@ $effect(() => {
{@html test_html}
</div> -->
<div class="ae_meta flex flex-row flex-wrap gap-2 items-center justify-between w-full">
<div class="ae_meta flex flex-row flex-wrap gap-1 items-center justify-between w-full">
<!-- {$lq__journal_entry_obj?.priority}
{$lq__journal_entry_obj?.sort}
{$lq__journal_entry_obj?.group}

View File

@@ -257,7 +257,7 @@ async function handle_load_ae_obj_id__sponsorship({sponsorship_id, try_cache=fal
let params = {};
// $ae_loc.hub.sponsorship_id_qry_status = 'loading';
// $ae_sess.hub.sponsorship_id_qry_status = 'loading';
ae_sponsorship_obj_get_promise = api.get_ae_obj_id_crud({
api_cfg: $ae_api,
obj_type: 'sponsorship',

View File

@@ -113,7 +113,7 @@ async function handle_load_ae_obj_id__sponsorship_cfg({sponsorship_cfg_id, try_c
let params = {};
// $ae_loc.hub.sponsorship_cfg_id_qry_status = 'loading';
// $ae_sess.hub.sponsorship_cfg_id_qry_status = 'loading';
ae_sponsorship_cfg_obj_get_promise = api.get_ae_obj_id_crud({
api_cfg: $ae_api,
obj_type: 'sponsorship_cfg',
@@ -178,7 +178,7 @@ async function handle_load_ae_obj_id__sponsorship({sponsorship_id, try_cache=fal
let params = {};
// $ae_loc.hub.sponsorship_id_qry_status = 'loading';
// $ae_sess.hub.sponsorship_id_qry_status = 'loading';
ae_sponsorship_obj_get_promise = api.get_ae_obj_id_crud({
api_cfg: $ae_api,
obj_type: 'sponsorship',

View File

@@ -35,7 +35,7 @@ async function handle_load_ae_account_obj_id({account_id, try_cache=false}) {
let params = {};
$ae_loc.hub.account_id_qry_status = 'loading';
$ae_sess.hub.account_id_qry_status = 'loading';
ae_account_obj_get_promise = api.get_ae_obj_id_crud({
api_cfg: $ae_api,
obj_type: 'account',