From 007eb4ec9fa0a951e7622d0dbd216fc7e2aaccdc Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Tue, 29 Apr 2025 14:33:17 -0400 Subject: [PATCH] Bug fix for attaching files to a BB Post. --- src/routes/+layout.svelte | 2020 ++++++++--------- .../bb/ae_idaa_comp__post_obj_id_edit.svelte | 2 +- 2 files changed, 1011 insertions(+), 1011 deletions(-) diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 7f9227e5..06497016 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,92 +1,84 @@ - document.getElementsByTagName('html')[0].classList.add('iframe'); - // document.getElementsByTagName('html')[0].classList.remove('dark'); - // document.getElementsByTagName('html')[0].classList.remove('light'); - - $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; - - document.getElementsByTagName('html')[0].classList.remove('iframe'); - // document.getElementsByTagName('html')[0].classList.add('dark'); - // document.getElementsByTagName('html')[0].classList.add('light'); - } - - if (!$ae_loc.iframe && $ae_loc.trusted_access) { - $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.app_cfg.show_element__access_type = true; - $ae_loc.app_cfg.show_element__cfg = true; - } else { - $ae_loc.app_cfg.show_element__access_type = true; - $ae_loc.app_cfg.show_element__cfg = false; - } - - - // This is mainly for Precon CHOW - if (data.url.searchParams.get('event_id')) { - $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'); - $ae_loc.mod.sponsorships.cfg_id = data.url.searchParams.get('sponsorship_cfg_id'); - } - -} - -// We want to loop through all of the data store (ds) key value pairs and set them to localStorage -// $: if (ae_acct.ds) { -// console.log(`ae_ds__ data:`, ae_acct.ds) -// for (let [key, value] of Object.entries(ae_acct.ds)) { -// console.log(`ae_ds__ key: ${key}, value:`, value); -// localStorageStore(`ae_ds__${key}`, value); -// } -// } - -// Check if in the array of: super > manager > administrator > trusted > public > authenticated > anonymous -const access_type_li = ['super', 'manager', 'administrator', 'trusted', 'public', 'authenticated', 'anonymous']; -$effect(() => { - if (browser && $ae_loc.access_type && access_type_li.includes($ae_loc.access_type)) { - document.getElementsByTagName('html')[0].classList.remove('super_access', 'manager_access', 'administrator_access', 'trusted_access', 'public_access', 'authenticated_access', 'anonymous_access'); - document.getElementsByTagName('html')[0].classList.add(`${$ae_loc.access_type}_access`); - } else if (browser) { - document.getElementsByTagName('html')[0].classList.remove('super_access', 'manager_access', 'administrator_access', 'trusted_access', 'public_access', 'authenticated_access', 'anonymous_access'); - } -}); - - - -{#if $ae_loc?.site_google_tracking_id && $ae_loc?.site_google_tracking_id.length > 0} - -{/if} - - - - - - - - - - -{#if (browser && $ae_loc && $ae_sess && ($ae_loc.ver != $ae_sess.ver))} -
-

New Version Available

-

A new version of the site is available. Please reload the page.

- -
- -{:else if $ae_loc?.allow_access} - - - - {@render children?.()} - -{:else if browser} - -
-

Access Denied

-

You do not have access to this site. You may need a passcode, sign in link, and or URL site key.

- - - - -
-

If you have tried the "Reload and Clear Cache" button, you may need to manually reload the page using your browser's reload button or by pressing Ctrl + R or Cmd + R.

-

This sometimes happens with new versions of the app or when in an iframe.

-
-
- -{/if} - - - - -
- - - - {#if $ae_loc.edit_mode} - - {:else if $ae_loc.authenticated_access} - + {#if $ae_loc?.site_google_tracking_id && $ae_loc?.site_google_tracking_id.length > 0} + {/if} -
- {#if $ae_loc.access_type && $ae_loc.access_type != 'anonymous'} - - + + + + + - {#if $ae_loc.access_type == 'super'} - - - {:else if $ae_loc.access_type == 'manager'} - - - {:else if $ae_loc.access_type == 'administrator'} - - - {:else if $ae_loc.access_type == 'trusted'} - - - {:else if $ae_loc.access_type == 'public'} - Public - - {:else if $ae_loc.access_type == 'authenticated'} - Authenticated - - {:else if $ae_loc.access_type == 'anonymous'} - Anonymous Access - {:else} - Unknown Access - {/if} - + + {#if (browser && $ae_loc && $ae_sess && ($ae_loc.ver != $ae_sess.ver))} +
+

New Version Available

+

A new version of the site is available. Please reload the page.

- {:else} +
+ + {:else if $ae_loc?.allow_access} + + + + {@render children?.()} + + {:else if browser} + +
+

Access Denied

+

You do not have access to this site. You may need a passcode, sign in link, and or URL site key.

+ + + +
+

If you have tried the "Reload and Clear Cache" button, you may need to manually reload the page using your browser's reload button or by pressing Ctrl + R or Cmd + R.

+

This sometimes happens with new versions of the app or when in an iframe.

+
+
+ + {/if} + + + + +
+ + + + {#if $ae_loc.edit_mode} + + {:else if $ae_loc.authenticated_access} + + {/if} + +
+ {#if $ae_loc.access_type && $ae_loc.access_type != 'anonymous'} + + + + + {#if $ae_loc.access_type == 'super'} + + + {:else if $ae_loc.access_type == 'manager'} + + + {:else if $ae_loc.access_type == 'administrator'} + + + {:else if $ae_loc.access_type == 'trusted'} + + + {:else if $ae_loc.access_type == 'public'} + Public + + {:else if $ae_loc.access_type == 'authenticated'} + Authenticated + + {:else if $ae_loc.access_type == 'anonymous'} + Anonymous Access + {:else} + Unknown Access + {/if} + + + - {/if} -
+ Lock? + + {:else} + + {/if} +
- - - -
- - -
- - - - - - - - {#if $ae_loc.app_cfg?.show_element__sign_in_out} -
+ + +
- {#if $ae_loc?.app_cfg?.show_element__menu} - - - Hide Menu - - {:else} - - - Menu - + + + + + + + + {#if $ae_loc.app_cfg?.show_element__sign_in_out} +
+ {#if $ae_loc.app_cfg?.show_element__access_type} +