Lots of little fixes. Can now save archives.

This commit is contained in:
Scott Idem
2024-11-08 15:43:47 -05:00
parent e6a9a5ceab
commit f4538720b2
10 changed files with 377 additions and 157 deletions

View File

@@ -20,6 +20,7 @@ import { posts_func } from '$lib/ae_posts/ae_posts_functions';
import Comp__post_obj_li from './ae_idaa_comp__post_obj_li.svelte';
import Comp__post_obj_id_view from './ae_idaa_comp__post_obj_id_view.svelte';
import Comp__post_options from './ae_idaa_comp__post_options.svelte';
$: lq__post_obj_li = liveQuery(async () => {
@@ -39,7 +40,7 @@ $: lq__post_obj_li = liveQuery(async () => {
$: lq__post_obj = liveQuery(async () => {
let results = await db_posts.post
.get($idaa_slct.post_id);
.get($idaa_slct.post_id ?? ''); // null or undefined does not reset things like '' does
return results;
});
@@ -47,7 +48,7 @@ $: lq__post_obj = liveQuery(async () => {
$: lq__post_comment_obj_li = liveQuery(async () => {
let results = await db_posts.comment
.where('post_id')
.equals($idaa_slct.post_id)
.equals($idaa_slct.post_id ?? '') // null or undefined does not reset things like '' does
.reverse()
.sortBy('updated_on');
// .sortBy('title');
@@ -57,7 +58,7 @@ $: lq__post_comment_obj_li = liveQuery(async () => {
$: lq__post_comment_obj = liveQuery(async () => {
let results = await db_posts.comment
.get($idaa_slct.post_comment_id);
.get($idaa_slct.post_comment_id ?? ''); // null or undefined does not reset things like '' does
return results;
});
@@ -77,6 +78,10 @@ $: lq__post_comment_obj = liveQuery(async () => {
"
>
<Comp__post_options
/>
<!-- <h1>Bulletin Board {$lq__post_obj_li?.length}</h1> -->
{#if $lq__post_obj_li && $lq__post_obj_li?.length }
@@ -93,8 +98,8 @@ $: lq__post_comment_obj = liveQuery(async () => {
<!-- Modal: Post (Bulletin Board) view ID -->
<Modal
title="{$lq__post_obj?.title} - {$lq__post_obj?.id}"
bind:open={$idaa_sess.bb.show__modal_view}
title="{$lq__post_obj?.title ?? 'New Post'} - {$lq__post_obj?.id ?? 'Not Saved Yet'}"
bind:open={$idaa_sess.bb.show__modal_view__post_id}
autoclose={false}
outsideclose={true}
placement="top-center"
@@ -130,7 +135,7 @@ $: lq__post_comment_obj = liveQuery(async () => {
{/if}
</button>
{/if}
{$lq__post_obj?.title}
{$lq__post_obj?.title ?? 'New Post'}
</h3>
</div>
</svelte:fragment>