I guess this is better than it was...
This commit is contained in:
@@ -67,11 +67,28 @@ import Element_data_store from '$lib/element_data_store.svelte';
|
||||
// Quickly save the data passed from the parent(s) to the Svelte stores, localStorage, and other. This should catch anything that is a child of this layout.svelte file.
|
||||
$slct.account_id = data.account_id;
|
||||
console.log(`$slct.account_id = `, $slct.account_id);
|
||||
let ae_acct = data.ae_acct[$slct.account_id];
|
||||
let ae_acct = data[$slct.account_id];
|
||||
console.log(`ae_acct = `, ae_acct);
|
||||
// let ae_acct = data.ae_acct;
|
||||
// $ae_loc = ae_acct.loc;
|
||||
// $ae_api = ae_acct.api;
|
||||
// $ae_loc = ae_acct.loc;
|
||||
|
||||
$ae_api = {
|
||||
...$ae_api,
|
||||
...ae_acct.api,
|
||||
}
|
||||
console.log(`$ae_api = `, $ae_api);
|
||||
|
||||
$ae_loc = {
|
||||
...$ae_loc,
|
||||
...ae_acct.loc,
|
||||
}
|
||||
console.log(`$ae_loc = `, $ae_loc);
|
||||
|
||||
$slct = {
|
||||
...$slct,
|
||||
...ae_acct.slct,
|
||||
}
|
||||
|
||||
if ($ae_loc.site_cfg_json.slct__event_id) {
|
||||
$events_slct.event_id = $ae_loc.site_cfg_json.slct__event_id;
|
||||
@@ -86,6 +103,14 @@ if ($ae_loc.site_cfg_json.slct__event_id) {
|
||||
console.log(`No Event ID set.`);
|
||||
}
|
||||
|
||||
if ($ae_loc.site_cfg_json.slct__sponsorship_cfg_id) {
|
||||
$slct.sponsorship_cfg_id = $ae_loc.site_cfg_json.slct__sponsorship_cfg_id;
|
||||
} else if ($ae_loc.default__sponsorship_cfg_id) {
|
||||
$slct.sponsorship_cfg_id = $ae_loc.default__sponsorship_cfg_id;
|
||||
} else {
|
||||
console.log(`No Sponsorship Config ID set.`);
|
||||
}
|
||||
|
||||
if (browser) {
|
||||
// Waiting until the browser exists.
|
||||
// save_ds_to_local(ae_acct.ds);
|
||||
@@ -162,6 +187,10 @@ onMount(() => {
|
||||
$events_slct.event_id = data.url.searchParams.get('event_id');
|
||||
$events_loc.event_id = data.url.searchParams.get('event_id');
|
||||
}
|
||||
|
||||
if (data.url.searchParams.get('sponsorship_cfg_id')) {
|
||||
$slct.sponsorship_cfg_id = data.url.searchParams.get('sponsorship_cfg_id');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -178,7 +207,7 @@ onMount(() => {
|
||||
|
||||
|
||||
<svelte:head>
|
||||
<title>{ae_acct.loc.title ?? 'loading...'}</title>
|
||||
<title>{$ae_loc.title ?? 'Æ loading...'}</title>
|
||||
<link rel="stylesheet" href="{ae_acct.loc.site_style_href}">
|
||||
<!-- <link rel="manifest" href="/manifest.json"> -->
|
||||
</svelte:head>
|
||||
@@ -232,7 +261,7 @@ onMount(() => {
|
||||
|
||||
</svelte:fragment>
|
||||
<!-- OSIT's Aether App -->
|
||||
<!-- {@html (browser ? JSON.parse(localStorage.getItem('ae_ds__hub__site__appshell_header')) : 'not found')} -->
|
||||
<!-- {@html (browser ? JSON.parse(localStorage.getItem('ae_ds__hub__site__appshell_header')).html : '-- not found --')} -->
|
||||
<!-- {@html $ae_sess.site_appshell_header} -->
|
||||
<Element_data_store
|
||||
ds_code="hub__site__appshell_header"
|
||||
|
||||
Reference in New Issue
Block a user