Sort of bug fix or improvement for showing the post data.
This commit is contained in:
@@ -30,7 +30,7 @@ let ae_promises: key_val = {};
|
||||
<div class="ae_row archive_content__group flex flex-row items-center justify-center">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-md variant-glass-secondary hover:variant-filled-secondary transition w-96"
|
||||
class="btn btn-md btn-info variant-glass-secondary hover:variant-filled-secondary transition w-96"
|
||||
on:click={() => {
|
||||
if ($idaa_sess.archives.show_list__archive_content_li_group == idaa_archive_content_obj.group) {
|
||||
$idaa_sess.archives.show_list__archive_content_li_group = null;
|
||||
@@ -102,7 +102,7 @@ let ae_promises: key_val = {};
|
||||
$idaa_sess.archives.show__modal_view__archive_content_id = $idaa_slct.archive_content_id;
|
||||
$idaa_sess.archives.show__modal_edit__archive_content_id = false;
|
||||
}}
|
||||
class="btn btn-md variant-ghost-primary hover:variant-filled-primary transition"
|
||||
class="btn btn-md btn-primary variant-ghost-primary hover:variant-filled-primary transition"
|
||||
title={`View: ${idaa_archive_content_obj?.name}`}
|
||||
>
|
||||
<span class="fas fa-play m-1"></span> Play/View
|
||||
|
||||
@@ -66,6 +66,15 @@ $: lq__post_comment_obj = liveQuery(async () => {
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<svelte:head>
|
||||
<title>
|
||||
IDAA Bulletin Board:
|
||||
- Novi - {$ae_loc?.title}
|
||||
</title>
|
||||
</svelte:head>
|
||||
|
||||
|
||||
<section
|
||||
class="
|
||||
ae_idaa__bb
|
||||
|
||||
@@ -100,21 +100,21 @@ onDestroy(() => {
|
||||
<h2 class="post__title flex flex-row gap-2 items-center">
|
||||
<span class="h3">
|
||||
<span class="fas fa-comment-alt m-1"></span>
|
||||
{@html $idaa_slct.post_obj?.title ?? 'New Post'}
|
||||
<!-- - {$idaa_slct.post_obj?.id ?? 'Not Yet Saved'} -->
|
||||
{@html $lq__post_obj?.title ?? 'New Post'}
|
||||
<!-- - {$lq__post_obj?.id ?? 'Not Yet Saved'} -->
|
||||
</span>
|
||||
{#if $idaa_slct.post_obj?.topic_id}<span class="badge badge-info variant-glass-secondary"><span class="fas fa-user-md m-1"></span> {$idaa_slct.post_obj?.topic_name}</span>{/if}
|
||||
{#if $lq__post_obj?.topic_id}<span class="badge badge-info variant-glass-secondary"><span class="fas fa-user-md m-1"></span> {$lq__post_obj?.topic_name}</span>{/if}
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div class="post__content space-y-2">
|
||||
<pre class="post__content p-2 bg-white shadow-md rounded-lg text-wrap text-sm font-normal whitespace-pre-wrap">{@html $idaa_slct.post_obj.content}</pre>
|
||||
<pre class="post__content p-2 bg-white shadow-md rounded-lg text-wrap text-sm font-normal whitespace-pre-wrap">{@html $lq__post_obj?.content}</pre>
|
||||
|
||||
{#if $idaa_slct.post_obj.linked_li_json && $idaa_slct.post_obj.linked_li_json.length}
|
||||
{#if $lq__post_obj?.linked_li_json && $lq__post_obj?.linked_li_json.length}
|
||||
<div class="ae_section flex flex-row flex-wrap gap-1 items-center justify-center">
|
||||
<span class="fas fa-paperclip"></span>
|
||||
<span class="text-sm text-gray-600 dark:text-gray-400 italic">Linked files:</span>
|
||||
{#each $idaa_slct.post_obj.linked_li_json as linked_obj, index}
|
||||
{#each $lq__post_obj.linked_li_json as linked_obj, index}
|
||||
<!-- <a
|
||||
href={linked_obj.url}
|
||||
target="_blank"
|
||||
@@ -173,42 +173,42 @@ onDestroy(() => {
|
||||
|
||||
<section class="ae_section ae_meta post__meta text-xs text-gray-500 mt-4 flex flex-row gap-2 items-center justify-between">
|
||||
<div class="ae_group flex flex-col gap-1">
|
||||
{#if ($idaa_slct.post_obj.anonymous)}
|
||||
{#if ($lq__post_obj?.anonymous)}
|
||||
<div class="post__posted_by">
|
||||
Posted by: <span class="fas fa-user-secret"></span> <span class="post__full_name">Anonymous</span>
|
||||
</div>
|
||||
{:else if ($idaa_slct.post_obj.full_name)}
|
||||
{:else if ($lq__post_obj?.full_name)}
|
||||
<div class="post__posted_by">
|
||||
Posted by: <span class="fas fa-user"></span> <span class="post__full_name">{$idaa_slct.post_obj.full_name}
|
||||
{#if $ae_loc.trusted_access && $idaa_slct.post_obj.email}
|
||||
<a href="mailto:{$idaa_slct.post_obj.email}?subject=IDAA BB Post">{$idaa_slct.post_obj.email}</a>
|
||||
Posted by: <span class="fas fa-user"></span> <span class="post__full_name">{$lq__post_obj?.full_name}
|
||||
{#if $ae_loc.trusted_access && $lq__post_obj?.email}
|
||||
<a href="mailto:{$lq__post_obj?.email}?subject=IDAA BB Post">{$lq__post_obj?.email}</a>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="post__created_on_updated_on">
|
||||
{#if !$idaa_slct.post_obj.updated_on}
|
||||
{#if !$lq__post_obj?.updated_on}
|
||||
<span class="ae_label">Created on:</span>
|
||||
<span class="ae_value post__created_on">{ae_util.iso_datetime_formatter($idaa_slct.post_obj.created_on, 'datetime_iso_12_no_seconds')}</span>
|
||||
<span class="ae_value post__created_on">{ae_util.iso_datetime_formatter($lq__post_obj?.created_on, 'datetime_iso_12_no_seconds')}</span>
|
||||
{:else}
|
||||
<span class="ae_label">Updated on:</span>
|
||||
<span class="ae_value post__updated_on">
|
||||
{ae_util.iso_datetime_formatter($idaa_slct.post_obj.updated_on, 'datetime_iso_12_no_seconds')}</span>
|
||||
{ae_util.iso_datetime_formatter($lq__post_obj?.updated_on, 'datetime_iso_12_no_seconds')}</span>
|
||||
{/if}
|
||||
<span
|
||||
class="post__archive_on"
|
||||
class:hidden={!$ae_loc.administrator_access}
|
||||
>
|
||||
<span class="ae_label">Archive on:</span>
|
||||
<span class="ae_value">{ae_util.iso_datetime_formatter($idaa_slct.post_obj.archive_on, 'datetime_iso_12_no_seconds')}</span>
|
||||
<span class="ae_value">{ae_util.iso_datetime_formatter($lq__post_obj?.archive_on, 'datetime_iso_12_no_seconds')}</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ae_options flex flex-row gap-1 items-center">
|
||||
{#if $idaa_slct.post_obj.post_comment_count}
|
||||
{#if $lq__post_obj?.post_comment_count}
|
||||
<span class="ae_badge ae_info post__post_comment_count">
|
||||
<span class="fas fa-comment"></span> {($idaa_slct.post_obj.post_comment_count == 1 ? `${$idaa_slct.post_obj.post_comment_count} comment` : `${$idaa_slct.post_obj.post_comment_count} comments` )}
|
||||
<span class="fas fa-comment"></span> {($lq__post_obj?.post_comment_count == 1 ? `${$lq__post_obj?.post_comment_count} comment` : `${$lq__post_obj?.post_comment_count} comments` )}
|
||||
</span>
|
||||
{/if}
|
||||
{#if ($ae_loc.trusted_access && $ae_loc.edit_mode) || $idaa_loc.novi_uuid}
|
||||
@@ -219,13 +219,13 @@ onDestroy(() => {
|
||||
}
|
||||
}}
|
||||
class="btn btn-md variant-ghost-secondary hover:variant-filled-secondary transition"
|
||||
title={`New comment on: ${$idaa_slct.post_obj.title}`}
|
||||
title={`New comment on: ${$lq__post_obj?.title}`}
|
||||
>
|
||||
<span class="fas fa-plus m-1"></span> New Comment
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
{#if ($ae_loc.trusted_access && $ae_loc.edit_mode) || $idaa_slct.post_obj.external_person_id === $idaa_loc.novi_uuid}
|
||||
{#if ($ae_loc.trusted_access && $ae_loc.edit_mode) || $lq__post_obj?.external_person_id === $idaa_loc.novi_uuid}
|
||||
<button
|
||||
on:click={() => {
|
||||
// $idaa_slct.post_id = $idaa_slct.post_obj.post_id_random;
|
||||
@@ -241,7 +241,7 @@ onDestroy(() => {
|
||||
$idaa_sess.bb.show__inline_edit__post_obj = true;
|
||||
}}
|
||||
class="btn btn-sm variant-ghost-warning hover:variant-filled-warning transition"
|
||||
title="Edit post for {$idaa_slct.post_obj.full_name} (ID: {$idaa_slct.post_obj.post_id}"
|
||||
title="Edit post for {$lq__post_obj?.full_name} (ID: {$lq__post_obj?.post_id}"
|
||||
>
|
||||
<span class="fas fa-edit m-1"></span> Edit Post
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user