Just worki on things

This commit is contained in:
Scott Idem
2024-03-06 13:47:41 -05:00
parent e71cdab353
commit aa712284ce
4 changed files with 53 additions and 54 deletions

View File

@@ -141,6 +141,8 @@ export let ae_app_session_data_struct: key_val = {
'ds': { 'ds': {
'submit_status': null, 'submit_status': null,
}, },
'ds_loaded': {
},
'hub': { 'hub': {
'show_xyz': null, 'show_xyz': null,
}, },

View File

@@ -11,8 +11,8 @@ import type { key_val } from '$lib/ae_stores';
export let ds_code: string; export let ds_code: string;
export let ds_name: string; export let ds_name: string;
export let ds_type: string = 'text'; export let ds_type: string = 'text';
export let for_type: string; export let for_type: null|string;
export let for_id: string; export let for_id: null|string;
export let store: string = 'local'; export let store: string = 'local';
export let display: string = 'block'; export let display: string = 'block';
@@ -24,6 +24,8 @@ export let show_edit_btn: boolean = true;
export let show_view: boolean = true; export let show_view: boolean = true;
export let show_delete_btn: boolean = false; export let show_delete_btn: boolean = false;
export let ds_loaded: boolean = false;
export let debug: boolean = false; export let debug: boolean = false;
let ae_promises: key_val = {}; // Promise<any>; let ae_promises: key_val = {}; // Promise<any>;
@@ -117,6 +119,7 @@ async function load_data_store({
console.log('Something went wrong? No data store ID found.'); console.log('Something went wrong? No data store ID found.');
return false; return false;
} }
$ae_ds_loc.id = ds_results.data_store_id_random; $ae_ds_loc.id = ds_results.data_store_id_random;
$ae_ds_loc.account_id = ds_results.account_id_random; $ae_ds_loc.account_id = ds_results.account_id_random;
$ae_ds_loc.code = ds_results.code; // This will overwrite whatever was passed in. $ae_ds_loc.code = ds_results.code; // This will overwrite whatever was passed in.
@@ -143,7 +146,10 @@ async function load_data_store({
val_text = ds_results.text; val_text = ds_results.text;
return ds_results.text; return ds_results.text;
} }
ds_loaded = true;
} else { } else {
ds_loaded = false;
ds_loading_status = '-- not found --'; ds_loading_status = '-- not found --';
} }
}) })
@@ -662,7 +668,7 @@ async function handle_update__data_store({
</pre> --> </pre> -->
{#await ds_get_results} {#await ds_get_results}
<div class="modal-loading"> <div class="modal-loading text-xs">
<span class="fas fa-spinner fa-spin"></span> <span class="fas fa-spinner fa-spin"></span>
<span class="loading-text"> <span class="loading-text">
Loading... Loading...

View File

@@ -255,13 +255,17 @@ $: if ($slct_trigger == 'set_access_code_li' && !$ae_loc.ds['hub__page__access_c
<svelte:fragment slot="header"> <svelte:fragment slot="header">
<!-- App Bar --> <!-- App Bar -->
<AppBar gridColumns="grid-cols-3" slotDefault="place-self-center" slotTrail="place-content-end"> <AppBar
gridColumns="grid-cols-3"
slotDefault="place-self-center"
slotTrail="place-content-end"
>
<svelte:fragment slot="lead"> <svelte:fragment slot="lead">
{#if $ae_loc.ds['hub__page__appshell_header_lead']} {#if $ae_loc.ds['hub__page__appshell_header_lead']}
{@html $ae_loc.ds['hub__page__appshell_header_lead']} {@html $ae_loc.ds['hub__page__appshell_header_lead']}
{:else} {:else}
<a href="/" class="text-xl"> <a href="/" class="btn variant-gradiant-surface text-xl">
<span class="fas fa-home"></span> &AElig; Home <span class="fas fa-laptop-house mx-1"></span> &AElig; Home
</a> </a>
{/if} {/if}

View File

@@ -8,6 +8,7 @@ import { onMount } from 'svelte';
import { PUBLIC_TESTING } from '$env/static/public'; import { PUBLIC_TESTING } from '$env/static/public';
console.log(`AE Config - +page.svelte PUBLIC_TESTING:`, PUBLIC_TESTING); console.log(`AE Config - +page.svelte PUBLIC_TESTING:`, PUBLIC_TESTING);
import Element_data_store from '$lib/element_data_store.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';
@@ -25,52 +26,45 @@ onMount(() => {
<section class="ae_root md:container h-full mx-auto flex flex-col items-center p-5 space-y-16"> <section class="ae_root md:container h-full mx-auto flex flex-col items-center p-5 space-y-16">
{#if $ae_loc.ds['hub__site__root_page_content']} <Element_data_store
{@html $ae_loc.ds['hub__site__root_page_content']} ds_code="hub__site__root_page_header"
{:else} ds_type="html"
<div class="space-y-10 text-center flex flex-col items-center"> for_type={null}
<h1 class="h1">One Sky IT's new Aether App Template</h1> for_id={null}
<h2 class="h2">Development using: Svelte, SvelteKit, Tailwind, Skeleton</h2> ds_name="Default: AE Hub - Site root page header HTML"
class_li={$ae_sess.ds_loaded.hub__site__root_page_header === false ? 'hidden' : ''}
bind:ds_loaded={$ae_sess.ds_loaded.hub__site__root_page_header}
/>
<!-- page header DS: {$ae_sess.ds_loaded.hub__site__root_page_header} -->
<div class="flex justify-center space-x-2"> <Element_data_store
<a ds_code="hub__site__root_page_content"
class="btn variant-filled" ds_type="html"
href="/sponsorships" for_type={null}
> for_id={null}
Open Sponsorships ds_name="Default: AE Hub - Site root page content HTML"
</a> class_li={$ae_sess.ds_loaded.hub__site__root_page_content === false ? 'hidden' : ''}
bind:ds_loaded={$ae_sess.ds_loaded.hub__site__root_page_content}
/>
<!-- page content DS: {$ae_sess.ds_loaded.hub__site__root_page_content} -->
<Element_data_store
ds_code="hub__site__root_page_footer"
ds_type="html"
for_type={null}
for_id={null}
ds_name="Default: AE Hub - Site root page footer HTML"
display="block"
class_li={!$ae_loc.trusted_access && $ae_sess.ds_loaded.hub__site__root_page_footer === false ? 'hidden' : ''}
bind:ds_loaded={$ae_sess.ds_loaded.hub__site__root_page_footer}
/>
<!-- page footer DS: {$ae_sess.ds_loaded.hub__site__root_page_footer} -->
<a
class="btn variant-filled"
href="/events_speakers"
>
Open Speakers
</a>
</div>
</div>
{/if}
<div data-sveltekit-preload-data="false" class=""> <div data-sveltekit-preload-data="false" class="">
<!-- {#if $ae_loc.iframe}
<a
class="btn btn-sm variant-soft"
href="/?iframe=false"
>
<span class="fas fa-code mx-1"></span>
Exit iframe Mode
</a>
{:else}
<a
class="btn btn-sm variant-soft"
href="/?iframe=true"
>
<span class="fas fa-code mx-1"></span>
Use iframe Mode
</a>
{/if}
<button <button
class="btn btn-sm variant-soft" class="btn btn-sm variant-soft text-error-300 hover:text-error-800"
title="Reload and clear the page cache" title="Reload and clear the page cache"
on:click={() => { on:click={() => {
window.location.reload(true); window.location.reload(true);
@@ -80,7 +74,7 @@ onMount(() => {
Reload and Clear Cache Reload and Clear Cache
</button> </button>
<button <button
class="btn btn-sm variant-soft" class="btn btn-sm variant-soft text-error-300 hover:text-error-800"
title="Clear the browser storage for this page" title="Clear the browser storage for this page"
on:click={() => { on:click={() => {
localStorage.clear(); localStorage.clear();
@@ -91,13 +85,6 @@ onMount(() => {
<span class="fas fa-sync mx-1"></span> <span class="fas fa-sync mx-1"></span>
Clear Storage Clear Storage
</button> </button>
<a
class="btn btn-sm variant-soft"
href="/hosted_files"
>
<span class="fas fa-code mx-1"></span>
Util: Convert Videos
</a> -->
</div> </div>
</section> </section>