diff --git a/src/lib/ae_posts/ae_posts__post.ts b/src/lib/ae_posts/ae_posts__post.ts index 83a38927..4e1ade2f 100644 --- a/src/lib/ae_posts/ae_posts__post.ts +++ b/src/lib/ae_posts/ae_posts__post.ts @@ -617,7 +617,7 @@ export function db_save_ae_obj_li__post( updated_on: obj.updated_on, // From SQL view - // post_comment_count: obj.post_comment_count, + post_comment_count: obj.post_comment_count, // A key value list of the comments // post_comment_kv: obj.post_comment_kv, diff --git a/src/lib/db_posts.ts b/src/lib/db_posts.ts index a55280e0..0ad37bca 100644 --- a/src/lib/db_posts.ts +++ b/src/lib/db_posts.ts @@ -102,14 +102,14 @@ export class MySubClassedDexie extends Dexie { title, full_name, email, archive, archive_on, - enable, hide, priority, sort, group, notes, created_on, updated_on`, + enable, hide, priority, sort, group, notes, created_on, updated_on, [updated_on+created_on], [created_on+updated_on]`, comment: ` id, post_comment_id, post_id, title, full_name, email, - enable, hide, priority, sort, group, notes, created_on, updated_on`, + enable, hide, priority, sort, group, notes, created_on, updated_on, [updated_on+created_on]`, }); } } diff --git a/src/routes/idaa/(idaa)/archives/0_archives__main.svelte b/src/routes/idaa/(idaa)/archives/0_archives__main.svelte index bb569254..78e6df35 100644 --- a/src/routes/idaa/(idaa)/archives/0_archives__main.svelte +++ b/src/routes/idaa/(idaa)/archives/0_archives__main.svelte @@ -24,60 +24,60 @@ import View_archive_obj from './10_view__archive_obj.svelte'; // *** Export/Exposed variables and functions for component // export let account_id: string = $page['page_for']['account_id']; export let account_id: string = $ae_app.account_id; -export let archive_id: string = $ae_app.archives.archive_id; +export let archive_id: string = $idaa_loc.archives.archive_id; -export let novi_uuid: string = $ae_app.novi_uuid; -export let novi_email: string = $ae_app.novi_email; -export let novi_full_name: string = $ae_app.novi_full_name; -export let novi_admin_li: string = $ae_app.novi_admin_li; -export let novi_trusted_li: string = $ae_app.novi_trusted_li; +export let novi_uuid: string = $idaa_loc.novi_uuid; +export let novi_email: string = $idaa_loc.novi_email; +export let novi_full_name: string = $idaa_loc.novi_full_name; +export let novi_admin_li: string = $idaa_loc.novi_admin_li; +export let novi_trusted_li: string = $idaa_loc.novi_trusted_li; // *** Set initial variables -$ae_app.novi_uuid = novi_uuid; -$ae_app.novi_email = decodeURIComponent(novi_email); -$ae_app.novi_full_name = decodeURIComponent(novi_full_name); -$ae_app.novi_admin_li = novi_admin_li; -$ae_app.novi_trusted_li = novi_trusted_li; +$idaa_loc.novi_uuid = novi_uuid; +$idaa_loc.novi_email = decodeURIComponent(novi_email); +$idaa_loc.novi_full_name = decodeURIComponent(novi_full_name); +$idaa_loc.novi_admin_li = novi_admin_li; +$idaa_loc.novi_trusted_li = novi_trusted_li; $ae_app.current_timezone = Intl.DateTimeFormat().resolvedOptions().timeZone; if (!$ae_app.lu_timezone_list) { $ae_app.lu_timezone_list = []; } -$ae_app.archives.show_main__options = true; // Section for: buttons for creating new archives, show/hide archives, and search archives -// $ae_app.archives.show_list__archive_obj_li = true; -// $ae_app.archives.show_view__archive_obj = $ae_app.archives.show_view__archive_obj; -$ae_app.archives.fulltext_search_qry_str = ''; -$ae_app.archives.qry_type = false +$idaa_loc.archives.show_main__options = true; // Section for: buttons for creating new archives, show/hide archives, and search archives +// $idaa_loc.archives.show_list__archive_obj_li = true; +// $idaa_loc.archives.show_view__archive_obj = $idaa_loc.archives.show_view__archive_obj; +$idaa_loc.archives.fulltext_search_qry_str = ''; +$idaa_loc.archives.qry_type = false // NOTE: Check if the novi_uuid is in the novi_admin_li list -if ($ae_app.novi_uuid && $ae_app.novi_admin_li) { - if ($ae_app.novi_admin_li.includes($ae_app.novi_uuid)) { - $ae_app.access_type = 'administrator'; - $ae_app.administrator_access = true; - $ae_app.trusted_access = true; +if ($idaa_loc.novi_uuid && $idaa_loc.novi_admin_li) { + if ($idaa_loc.novi_admin_li.includes($idaa_loc.novi_uuid)) { + $ae_loc.access_type = 'administrator'; + $ae_loc.administrator_access = true; + $ae_loc.trusted_access = true; } } // NOTE: Check if the novi_uuid is in the novi_trusted_li list -if ($ae_app.novi_uuid && $ae_app.novi_trusted_li) { - if ($ae_app.novi_trusted_li.includes($ae_app.novi_uuid)) { - $ae_app.access_type = 'trusted'; - $ae_app.trusted_access = true; +if ($idaa_loc.novi_uuid && $idaa_loc.novi_trusted_li) { + if ($idaa_loc.novi_trusted_li.includes($idaa_loc.novi_uuid)) { + $ae_loc.access_type = 'trusted'; + $ae_loc.trusted_access = true; } } -if ($ae_app.administrator_access) { - $ae_app.archives.enabled = 'enabled'; - $ae_app.archives.hidden = 'not_hidden'; - $ae_app.archives.limit = 150; -} else if ($ae_app.trusted_access) { - $ae_app.archives.enabled = 'enabled'; - $ae_app.archives.hidden = 'not_hidden'; - $ae_app.archives.limit = 75; +if ($ae_loc.administrator_access) { + $idaa_loc.archives.enabled = 'enabled'; + $idaa_loc.archives.hidden = 'not_hidden'; + $idaa_loc.archives.limit = 150; +} else if ($ae_loc.trusted_access) { + $idaa_loc.archives.enabled = 'enabled'; + $idaa_loc.archives.hidden = 'not_hidden'; + $idaa_loc.archives.limit = 75; } else { - $ae_app.archives.enabled = 'enabled'; - $ae_app.archives.hidden = 'not_hidden'; - $ae_app.archives.limit = 75; + $idaa_loc.archives.enabled = 'enabled'; + $idaa_loc.archives.hidden = 'not_hidden'; + $idaa_loc.archives.limit = 75; } let idaa_archive_obj_li_get_promise; @@ -93,15 +93,15 @@ if (archive_id) { $slct.archive_id = archive_id; $slct_trigger = 'load__archive_obj'; - // $ae_app.archives.show_main__options = true; - $ae_app.archives.show_list__archive_obj_li = false; - $ae_app.archives.show_view__archive_obj = true; - $ae_app.archives.show_edit__archive_obj = false; + // $idaa_loc.archives.show_main__options = true; + $idaa_loc.archives.show_list__archive_obj_li = false; + $idaa_loc.archives.show_view__archive_obj = true; + $idaa_loc.archives.show_edit__archive_obj = false; } else { - // $ae_app.archives.show_main__options = true; - $ae_app.archives.show_list__archive_obj_li = true; - $ae_app.archives.show_view__archive_obj = false; - $ae_app.archives.show_edit__archive_obj = false; + // $idaa_loc.archives.show_main__options = true; + $idaa_loc.archives.show_list__archive_obj_li = true; + $idaa_loc.archives.show_view__archive_obj = false; + $idaa_loc.archives.show_edit__archive_obj = false; } if (!$ae_app.client_content) { @@ -161,10 +161,10 @@ $: if ($slct_trigger == 'load__archive_obj' && $slct.archive_id) { let message = {'archive_id': $slct.archive_id}; window.parent.postMessage(message, "*"); - // $ae_app.archives.show_main__options = false; - // $ae_app.archives.show_list__archive_obj_li = false; - // $ae_app.archives.show_view__archive_obj = true; - // $ae_app.archives.show_edit__archive_obj = false; + // $idaa_loc.archives.show_main__options = false; + // $idaa_loc.archives.show_list__archive_obj_li = false; + // $idaa_loc.archives.show_view__archive_obj = true; + // $idaa_loc.archives.show_edit__archive_obj = false; } $: if ($slct_trigger == 'load__archive_obj_li' && $slct.account_id) { @@ -176,27 +176,27 @@ $: if ($slct_trigger == 'load__archive_obj_li' && $slct.account_id) { async function handle_load_archive_obj_li({account_id, try_cache=true}) { console.log('*** handle_load_archive_obj_li() ***'); - console.log($ae_app.archives); + console.log($idaa_loc.archives); - let enabled = $ae_app.archives.enabled; - let hidden = $ae_app.archives.hidden; - let limit = $ae_app.archives.limit; - let offset = $ae_app.archives.offset; + let enabled = $idaa_loc.archives.enabled; + let hidden = $idaa_loc.archives.hidden; + let limit = $idaa_loc.archives.limit; + let offset = $idaa_loc.archives.offset; let params = {}; let params_json: key_val = {}; - if ($ae_app.archives.fulltext_search_qry_str && $ae_app.archives.fulltext_search_qry_str.length > 2) { + if ($idaa_loc.archives.fulltext_search_qry_str && $idaa_loc.archives.fulltext_search_qry_str.length > 2) { params_json['ft_qry'] = { - 'default_qry_str': $ae_app.archives.fulltext_search_qry_str, + 'default_qry_str': $idaa_loc.archives.fulltext_search_qry_str, }; } - if ($ae_app.archives.qry_audio || $ae_app.archives.qry_video || $ae_app.archives.qry_other) { + if ($idaa_loc.archives.qry_audio || $idaa_loc.archives.qry_video || $idaa_loc.archives.qry_other) { params_json['and_qry'] = {}; - if ($ae_app.archives.qry_audio) params_json['and_qry']['audio'] = true; - if ($ae_app.archives.qry_video) params_json['and_qry']['video'] = true; - if ($ae_app.archives.qry_other) params_json['and_qry']['other'] = $ae_app.archives.qry_other; + if ($idaa_loc.archives.qry_audio) params_json['and_qry']['audio'] = true; + if ($idaa_loc.archives.qry_video) params_json['and_qry']['video'] = true; + if ($idaa_loc.archives.qry_other) params_json['and_qry']['other'] = $idaa_loc.archives.qry_other; } console.log('params_json:', params_json); @@ -237,10 +237,10 @@ async function handle_load_archive_obj_li({account_id, try_cache=true}) { async function handle_load_archive_obj({archive_id, try_cache=false}) { console.log('*** handle_load_archive_obj() ***'); - // let enabled = $ae_app.archives.enabled; - // let hidden = $ae_app.archives.hidden; - // let limit = $ae_app.archives.limit; - // let offset = $ae_app.archives.offset; + // let enabled = $idaa_loc.archives.enabled; + // let hidden = $idaa_loc.archives.hidden; + // let limit = $idaa_loc.archives.limit; + // let offset = $idaa_loc.archives.offset; let params = {}; @@ -257,7 +257,7 @@ async function handle_load_archive_obj({archive_id, try_cache=false}) { if (archive_obj_get_result) { $slct.archive_obj = archive_obj_get_result; // console.log($slct.archive_obj.cfg_json.content_group_sort); - $ae_app.archives.content_group_sort = $slct.archive_obj.cfg_json.content_group_sort; + $idaa_loc.archives.content_group_sort = $slct.archive_obj.cfg_json.content_group_sort; console.log(`Archive object:`, $slct.archive_obj); } }) @@ -284,10 +284,10 @@ function handle_created_archive_obj(event) { // $slct_trigger = 'load__archive_obj'; $slct_trigger = 'load__archive_obj_li'; - // $ae_app.archives.show_main__options = false; - $ae_app.archives.show_list__archive_obj_li = false; - $ae_app.archives.show_view__archive_obj = true; - $ae_app.archives.show_edit__archive_obj = false; + // $idaa_loc.archives.show_main__options = false; + $idaa_loc.archives.show_list__archive_obj_li = false; + $idaa_loc.archives.show_view__archive_obj = true; + $idaa_loc.archives.show_edit__archive_obj = false; } function handle_updated_archive_obj(event) { @@ -298,10 +298,10 @@ function handle_updated_archive_obj(event) { // NOTE: If the next trigger is set too quickly it will cause the one above to be missed. // $slct_trigger = 'load__archive_obj_li'; - // $ae_app.archives.show_main__options = false; - $ae_app.archives.show_list__archive_obj_li = false; - $ae_app.archives.show_view__archive_obj = true; - $ae_app.archives.show_edit__archive_obj = false; + // $idaa_loc.archives.show_main__options = false; + $idaa_loc.archives.show_list__archive_obj_li = false; + $idaa_loc.archives.show_view__archive_obj = true; + $idaa_loc.archives.show_edit__archive_obj = false; } function handle_deleted_archive_obj(event) { @@ -317,10 +317,10 @@ function handle_deleted_archive_obj(event) { $slct_trigger = 'load__archive_obj_li'; - $ae_app.archives.show_main__options = true; - $ae_app.archives.show_list__archive_obj_li = true; - $ae_app.archives.show_view__archive_obj = false; - $ae_app.archives.show_edit__archive_obj = false; + $idaa_loc.archives.show_main__options = true; + $idaa_loc.archives.show_list__archive_obj_li = true; + $idaa_loc.archives.show_view__archive_obj = false; + $idaa_loc.archives.show_edit__archive_obj = false; } @@ -332,23 +332,23 @@ function handle_deleted_archive_obj(event) {

- Novi: {$ae_app.novi_full_name} + Novi: {$idaa_loc.novi_full_name} ( - {$ae_app.novi_email} - {#if $ae_app.administrator_access} + {$idaa_loc.novi_email} + {#if $ae_loc.administrator_access} Administrator - {:else if $ae_app.trusted_access} + {:else if $ae_loc.trusted_access} Trusted {/if} - UUID: {$ae_app.novi_uuid} + UUID: {$idaa_loc.novi_uuid} )

-{#if $ae_app.archives.show_main__options} +{#if $idaa_loc.archives.show_main__options}
@@ -357,12 +357,12 @@ function handle_deleted_archive_obj(event) { - {#if $ae_app.trusted_access} - {#if $ae_app.archives.hidden == 'not_hidden'} + {#if $ae_loc.trusted_access} + {#if $idaa_loc.archives.hidden == 'not_hidden'} {/if} - {#if $ae_app.archives.enabled == 'enabled'} + {#if $idaa_loc.archives.enabled == 'enabled'} {/if} - {#if $ae_app.trusted_access} + {#if $ae_loc.trusted_access}
-{#if $ae_app.archives.show_edit__archive_obj} +{#if $idaa_loc.archives.show_edit__archive_obj} { - $ae_app.archives.show_main__options = true; - $ae_app.archives.show_list__archive_obj_li = true; - $ae_app.archives.show_edit__archive_obj = false; - $ae_app.archives.show_view__archive_obj = false; + $idaa_loc.archives.show_main__options = true; + $idaa_loc.archives.show_list__archive_obj_li = true; + $idaa_loc.archives.show_edit__archive_obj = false; + $idaa_loc.archives.show_view__archive_obj = false; const url = new URL(location); url.searchParams.delete('archive_id'); @@ -571,7 +571,7 @@ function handle_deleted_archive_obj(event) { {/if} - + {/if} @@ -624,7 +624,7 @@ function tinymce_remove() { - {#if $ae_app.trusted_access} + {#if $ae_loc.trusted_access}

@@ -657,7 +657,7 @@ function tinymce_remove() { - {#if $ae_app.administrator_access} + {#if $ae_loc.administrator_access}

+ + + \ No newline at end of file diff --git a/src/routes/idaa/(idaa)/bb/0_posts__main.svelte b/src/routes/idaa/(idaa)/bb/0_posts__main.svelte index e50f60c1..a90c0974 100644 --- a/src/routes/idaa/(idaa)/bb/0_posts__main.svelte +++ b/src/routes/idaa/(idaa)/bb/0_posts__main.svelte @@ -6,9 +6,8 @@ type key_val = { import { onMount } from 'svelte'; // *** Import Aether core variables and functions -import { ae, api, Element_modal_v3 } from 'aether_npm_lib'; - -import { slct, slct_trigger, ae_app } from './stores'; +import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores'; +import { idaa_loc, idaa_sess, idaa_slct } from '$lib/ae_idaa_stores'; // *** Import Aether core components @@ -19,53 +18,53 @@ import Edit_post_obj from './10_edit__post_obj.svelte'; import View_post_obj from './ae_idaa_comp__post_obj_id_view.svelte'; // *** Export/Exposed variables and functions for component -export let account_id: string = $ae_app.account_id; -export let post_id: string = $ae_app.posts.post_id; +export let account_id: string = $ae_loc.account_id; +export let post_id: string = $idaa_loc.bb.post_id; -export let novi_uuid: string = $ae_app.novi_uuid; -export let novi_email: string = $ae_app.novi_email; -export let novi_full_name: string = $ae_app.novi_full_name; -export let novi_admin_li: string = $ae_app.novi_admin_li; -export let novi_trusted_li: string = $ae_app.novi_trusted_li; +export let novi_uuid: string = $idaa_loc.novi_uuid; +export let novi_email: string = $idaa_loc.novi_email; +export let novi_full_name: string = $idaa_loc.novi_full_name; +export let novi_admin_li: string = $idaa_loc.novi_admin_li; +export let novi_trusted_li: string = $idaa_loc.novi_trusted_li; // *** Set initial variables -$ae_app.novi_uuid = novi_uuid; -$ae_app.novi_email = decodeURIComponent(novi_email); -$ae_app.novi_full_name = decodeURIComponent(novi_full_name); -$ae_app.novi_admin_li = novi_admin_li; -$ae_app.novi_trusted_li = novi_trusted_li; +$idaa_loc.novi_uuid = novi_uuid; +$idaa_loc.novi_email = decodeURIComponent(novi_email); +$idaa_loc.novi_full_name = decodeURIComponent(novi_full_name); +$idaa_loc.novi_admin_li = novi_admin_li; +$idaa_loc.novi_trusted_li = novi_trusted_li; -$ae_app.posts.show_main__options = true; -$ae_app.posts.show_list__post_obj_li = true; +$idaa_loc.bb.show_main__options = true; +$idaa_loc.bb.show_list__post_obj_li = true; // NOTE: Check if the novi_uuid is in the novi_admin_li list -if ($ae_app.novi_uuid && $ae_app.novi_admin_li) { - if ($ae_app.novi_admin_li.includes($ae_app.novi_uuid)) { - $ae_app.access_type = 'administrator'; - $ae_app.administrator_access = true; - $ae_app.trusted_access = true; +if ($idaa_loc.novi_uuid && $idaa_loc.novi_admin_li) { + if ($idaa_loc.novi_admin_li.includes($idaa_loc.novi_uuid)) { + $ae_loc.access_type = 'administrator'; + $ae_loc.administrator_access = true; + $ae_loc.trusted_access = true; } } // NOTE: Check if the novi_uuid is in the novi_trusted_li list -if ($ae_app.novi_uuid && $ae_app.novi_trusted_li) { - if ($ae_app.novi_trusted_li.includes($ae_app.novi_uuid)) { - $ae_app.access_type = 'trusted'; - $ae_app.trusted_access = true; +if ($idaa_loc.novi_uuid && $idaa_loc.novi_trusted_li) { + if ($idaa_loc.novi_trusted_li.includes($idaa_loc.novi_uuid)) { + $ae_loc.access_type = 'trusted'; + $ae_loc.trusted_access = true; } } -if ($ae_app.administrator_access) { - $ae_app.posts.enabled = 'enabled'; - $ae_app.posts.hidden = 'not_hidden'; - $ae_app.events.limit = 150; -} else if ($ae_app.trusted_access) { - $ae_app.posts.enabled = 'enabled'; - $ae_app.posts.hidden = 'not_hidden'; - $ae_app.events.limit = 75; +if ($ae_loc.administrator_access) { + $idaa_loc.bb.enabled = 'enabled'; + $idaa_loc.bb.hidden = 'not_hidden'; + $idaa_loc.bb.limit = 150; +} else if ($ae_loc.trusted_access) { + $idaa_loc.bb.enabled = 'enabled'; + $idaa_loc.bb.hidden = 'not_hidden'; + $idaa_loc.bb.limit = 75; } else { - $ae_app.posts.enabled = 'enabled'; - $ae_app.posts.hidden = 'not_hidden'; - $ae_app.events.limit = 50; + $idaa_loc.bb.enabled = 'enabled'; + $idaa_loc.bb.hidden = 'not_hidden'; + $idaa_loc.bb.limit = 50; } let idaa_post_obj_li_get_promise; @@ -93,10 +92,10 @@ if (post_id) { // url.searchParams.set('post_id', $slct.post_id); // history.pushState({}, '', url); - $ae_app.events.show_main__options = true; - $ae_app.posts.show_list__post_obj_li = true; - $ae_app.posts.show_edit__post_id = false; - $ae_app.posts.show_view__post_id = true; + $idaa_loc.bb.show_main__options = true; + $idaa_loc.bb.show_list__post_obj_li = true; + $idaa_loc.bb.show_edit__post_id = false; + $idaa_loc.bb.show_view__post_id = true; } if (!$ae_app.client_content) { @@ -149,10 +148,10 @@ $: if ($slct_trigger == 'load__post_obj_li' && $slct.account_id) { async function handle_load_idaa_post_obj_li({account_id, try_cache=false}) { console.log('*** handle_load_idaa_post_obj_li() ***'); - let enabled = $ae_app.posts.enabled; - let hidden = $ae_app.posts.hidden; - let limit = $ae_app.posts.limit; - let offset = $ae_app.posts.offset; + let enabled = $idaa_loc.bb.enabled; + let hidden = $idaa_loc.bb.hidden; + let limit = $idaa_loc.bb.limit; + let offset = $idaa_loc.bb.offset; let params = {}; @@ -200,19 +199,19 @@ $: if ($slct_trigger == 'load__post_obj' && $slct.post_id) { // let message = {'post_id': $slct.post_id}; // window.parent.postMessage(message, "*"); - // $ae_app.posts.show_main__options = false; - // $ae_app.posts.show_list__post_li = false; - // $ae_app.posts.show_view__post_id = true; - // $ae_app.posts.show_edit__post_id = false; + // $idaa_loc.bb.show_main__options = false; + // $idaa_loc.bb.show_list__post_li = false; + // $idaa_loc.bb.show_view__post_id = true; + // $idaa_loc.bb.show_edit__post_id = false; } async function handle_load_post_id_obj({post_id, try_cache=false}) { console.log('*** handle_load_post_id_obj() ***'); - // let enabled = $ae_app.posts.enabled; - // let hidden = $ae_app.posts.hidden; - // let limit = $ae_app.posts.limit; - // let offset = $ae_app.posts.offset; + // let enabled = $idaa_loc.bb.enabled; + // let hidden = $idaa_loc.bb.hidden; + // let limit = $idaa_loc.bb.limit; + // let offset = $idaa_loc.bb.offset; let params = {}; @@ -255,10 +254,10 @@ $: if ($slct_trigger == 'load__post_comment_obj_li' && $slct.post_id) { async function handle_load_post_comment_obj_li({post_id, try_cache=false}) { console.log('*** handle_load_post_comment_obj_li() ***'); - let enabled = $ae_app.posts.enabled; - let hidden = $ae_app.posts.hidden; - let limit = $ae_app.posts.limit; - let offset = $ae_app.posts.offset; + let enabled = $idaa_loc.bb.enabled; + let hidden = $idaa_loc.bb.hidden; + let limit = $idaa_loc.bb.limit; + let offset = $idaa_loc.bb.offset; let params = {}; @@ -300,9 +299,9 @@ function handle_post_obj_created(event) { $slct_trigger = 'load__post_obj_li'; - $ae_app.posts.show_list__post_obj_li = true; - $ae_app.posts.show_edit__post_id = false; - $ae_app.posts.show_view__post_id = false; + $idaa_loc.bb.show_list__post_obj_li = true; + $idaa_loc.bb.show_edit__post_id = false; + $idaa_loc.bb.show_view__post_id = false; } function handle_post_obj_updated(event) { @@ -314,9 +313,9 @@ function handle_post_obj_updated(event) { $slct_trigger = 'load__post_obj_li'; - $ae_app.posts.show_list__post_obj_li = true; - $ae_app.posts.show_edit__post_id = false; - $ae_app.posts.show_view__post_id = false; + $idaa_loc.bb.show_list__post_obj_li = true; + $idaa_loc.bb.show_edit__post_id = false; + $idaa_loc.bb.show_view__post_id = false; } function handle_post_obj_deleted(event) { @@ -328,9 +327,9 @@ function handle_post_obj_deleted(event) { $slct_trigger = 'load__post_obj_li'; - $ae_app.posts.show_list__post_obj_li = true; - $ae_app.posts.show_edit__post_id = false; - $ae_app.posts.show_view__post_id = false; + $idaa_loc.bb.show_list__post_obj_li = true; + $idaa_loc.bb.show_edit__post_id = false; + $idaa_loc.bb.show_view__post_id = false; } @@ -342,39 +341,39 @@ function handle_post_obj_deleted(event) {

- Novi: {$ae_app.novi_full_name} + Novi: {$idaa_loc.novi_full_name} ( - {$ae_app.novi_email} - {#if $ae_app.administrator_access} + {$idaa_loc.novi_email} + {#if $ae_loc.administrator_access} Administrator - {:else if $ae_app.trusted_access} + {:else if $ae_loc.trusted_access} Trusted {/if} - UUID: {$ae_app.novi_uuid} + UUID: {$idaa_loc.novi_uuid} )

-{#if $ae_app.posts.show_main__options} +{#if $idaa_loc.bb.show_main__options}
- {#if $ae_app.trusted_access && $ae_app.posts.hidden == 'not_hidden'} + {#if $ae_loc.trusted_access && $idaa_loc.bb.hidden == 'not_hidden'} - {:else if $ae_app.trusted_access && $ae_app.posts.hidden == 'all'} + {:else if $ae_loc.trusted_access && $idaa_loc.bb.hidden == 'all'} {/if} - {#if $ae_app.administrator_access} - {#if $ae_app.posts.enabled == 'enabled'} + {#if $ae_loc.administrator_access} + {#if $idaa_loc.bb.enabled == 'enabled'}
{/if} -{#if $ae_app.posts.show_list__post_obj_li} +{#if $idaa_loc.bb.show_list__post_obj_li}
{#if $slct.post_obj_li} @@ -468,10 +467,10 @@ function handle_post_obj_deleted(event) { let message = {'post_id': idaa_post_obj.post_id_random}; window.parent.postMessage(message, "*"); - $ae_app.posts.show_main__options = true; - $ae_app.posts.show_list__post_obj_li = true; - // $ae_app.posts.show_edit__post_id = false; - $ae_app.posts.show_view__post_id = true; + $idaa_loc.bb.show_main__options = true; + $idaa_loc.bb.show_list__post_obj_li = true; + // $idaa_loc.bb.show_edit__post_id = false; + $idaa_loc.bb.show_view__post_id = true; }} class="btn btn-primary" title={`View: ${idaa_post_obj.title}`} @@ -485,17 +484,17 @@ function handle_post_obj_deleted(event) { {/if} - {#if $ae_app.trusted_access || idaa_post_obj.external_person_id === $ae_app.novi_uuid || idaa_post_obj.email === $ae_app.novi_email} + {#if $ae_loc.trusted_access || idaa_post_obj.external_person_id === $idaa_loc.novi_uuid || idaa_post_obj.email === $idaa_loc.novi_email} {#if $slct.post_id} - {#if $ae_app.administrator_access} + {#if $ae_loc.administrator_access} - {:else if $ae_app.trusted_access} + {:else if $ae_loc.trusted_access} @@ -153,7 +162,7 @@ function handle_post_comment_obj_deleted(event) { -{#if $idaa_loc.posts.show_edit__post_comment} +{#if $idaa_sess.bb.show_edit__post_comment}
Comment on: {($idaa_slct.post_obj.title ? $idaa_slct.post_obj.title : '')} @@ -180,13 +189,15 @@ function handle_post_comment_obj_deleted(event) {
{/if} -{#if $idaa_slct.post_comment_obj_li.length} -{#each $idaa_slct.post_comment_obj_li as idaa_post_comment_obj, index} +{#if $lq__post_comment_obj_li?.length} +{#each $lq__post_comment_obj_li as idaa_post_comment_obj, index}
-
{@html idaa_post_comment_obj.content}
+
+
{@html idaa_post_comment_obj.content}
+
-
+
Comment by: @@ -210,17 +221,18 @@ function handle_post_comment_obj_deleted(event) {
- {#if $ae_loc.trusted_access || idaa_post_comment_obj.external_person_id === $ae_app.novi_uuid} + {#if $ae_loc.trusted_access || idaa_post_comment_obj.external_person_id === $idaa_loc.novi_uuid}
diff --git a/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_li.svelte b/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_li.svelte index cb98f339..9d4be07f 100644 --- a/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_li.svelte +++ b/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_li.svelte @@ -10,102 +10,86 @@ import { idaa_loc, idaa_sess, idaa_slct } from '$lib/ae_idaa_stores'; export let lq__post_obj_li: any; -export let container_class_li = []; - onMount(() => { console.log('** Component Mounted: ** List - Bulletin Board (Post) Obj'); }); -
-{#if $lq__post_obj_li} - +{#if $lq__post_obj_li && $lq__post_obj_li.length} + {#each $lq__post_obj_li as idaa_post_obj, index}
-
-

- {@html idaa_post_obj.title} - {#if idaa_post_obj.topic_id} {idaa_post_obj.topic_name}{/if} + +
+

+ {@html idaa_post_obj.title} + {#if idaa_post_obj.topic_name} {idaa_post_obj.topic_name}{/if}

- {#if idaa_post_obj.content}
{@html idaa_post_obj.content}
{/if} + {#if idaa_post_obj.content}
{@html idaa_post_obj.content}
{/if} -
+
- {#if $ae_loc.trusted_access || idaa_post_obj.external_person_id === $idaa_loc.novi_uuid || idaa_post_obj.email === $idaa_loc.novi_email} - + // $idaa_sess.bb.show_main__options = true; + // $idaa_sess.bb.show_list__post_obj_li = true; + // $idaa_sess.bb.show_edit__post_id = true; + $idaa_sess.bb.show__modal_edit = true; + $idaa_sess.bb.show__modal_view = false; + }} + class="btn btn-sm variant-ghost-warning hover:variant-filled-warning transition" + title={`Edit post: ${idaa_post_obj.title}`} + > + Edit Post + {/if} - - -
-