Things look good for the IDAA BB. Need to test one last time from start to finish.

This commit is contained in:
Scott Idem
2025-07-07 16:27:12 -04:00
parent f0fae620ea
commit b675cad43d
5 changed files with 225 additions and 156 deletions

View File

@@ -172,8 +172,12 @@ onDestroy(() => {
{#if $idaa_sess.bb.edit__post_obj}
<button
type="button"
class="novi_btn btn btn-warning btn-sm preset-tonal-tertiary border border-tertiary-500
hover:preset-filled-tertiary-500 transition"
class="
novi_btn
btn btn-sm
preset-filled-warning-200-800 hover:preset-filled-success-200-800
transition
"
onclick={() => {
if ($idaa_sess.bb.obj_changed) {
if (confirm('You have unsaved changes. Are you sure you want to cancel?')) {
@@ -188,15 +192,20 @@ onDestroy(() => {
}}
title="View this BB Post"
>
View Post?
<!-- <span class="far fa-window-close m-1"></span> -->
<span class="fas fa-times m-1"></span>
Cancel Edit
</button>
{:else}
<!-- This checks if the currently logged in Novi user has a matching UUID or email address. -->
{#if ($ae_loc.trusted_access && $ae_loc.edit_mode) || $lq__post_obj?.external_person_id === $idaa_loc.novi_uuid || $lq__post_obj?.email === $idaa_loc.novi_email}
<button
type="button"
class="novi_btn btn btn-warning btn-sm preset-tonal-warning border border-warning-500
hover:preset-filled-warning-500 transition"
class="
novi_btn
btn btn-sm preset-tonal-warning
hover:preset-filled-warning-500 transition
"
onclick={() => {
// $idaa_slct.post_obj = {
// ...$lq__post_obj,
@@ -209,7 +218,7 @@ onDestroy(() => {
title="Edit this BB Post"
>
<span class="fas fa-edit m-1"></span>
Edit Post?
Edit Post
</button>
{/if}
{/if}

View File

@@ -318,7 +318,11 @@ function send_poster_notification_email() {
<section
class="svelte_component ae_section ae_edit post_comment_obj edit__post_comment_obj space-y-2 p-2 border border rounded bg-yellow-100"
class="
svelte_component ae_section ae_edit post_comment_obj edit__post_comment_obj
space-y-2 p-2 border rounded
preset-outlined-warning-200-800 preset-tonal-warning
"
class:ae_create={!$idaa_slct.post_id}
bind:clientHeight={$ae_loc.iframe_height_modal_body}
>
@@ -341,41 +345,48 @@ function send_poster_notification_email() {
onclick={() => {
$idaa_sess.bb.show__inline_edit__post_comment_id = false;
}}
class="novi_btn btn btn-sm preset-tonal-warning border border-warning-500 hover:preset-filled-warning-500 transition"
title="Cancel editing of post comment for {$idaa_slct.post_comment_obj?.full_name} (ID: {$idaa_slct.post_comment_obj?.post_id}"
class="
novi_btn
btn btn-sm
preset-filled-warning-200-800 hover:preset-filled-success-200-800
transition
"
title="Cancel editing of post comment for {$idaa_slct.post_comment_obj?.full_name} (ID: {$idaa_slct.post_comment_obj?.post_comment_id}"
>
<span class="fas fa-edit m-1"></span> Cancel Edit
<span class="fas fa-times m-1"></span>
Cancel Edit
</button>
</section> <!-- END: section post__options -->
<!-- <h3 class="h3">Post Comment</h3> -->
<input type="hidden" value={$idaa_slct.post_id} />
<input type="hidden" value={$idaa_slct.post_comment_id} />
<section class="ae_section post__general_information space-y-1"> <!-- BEGIN: section post__general_information -->
<div class="ae_section post__general_information border border-gray-200 rounded p-1 space-y-1"> <!-- BEGIN: section post__general_information -->
<!-- <label for="title">Title of BB Post:
<input type="text" id="title" name="title" required max="200" value={$lq__post_comment_obj?.title} placeholder="Title of Post" autocomplete="off" class="input w-96" />
</label> -->
<div>
<label for="content" class="ae_label post__content w-full">Content (comment body):
<label for="content" class="ae_label post__content w-full">
<span class="legend text-sm font-semibold text-gray-600 dark:text-gray-400">
Content (comment body):
</span>
<Tiptap_editor
default_minimal={true}
bind:html_text={$idaa_slct.post_comment_obj.content}
show_button_kv={{'heading__h1': false, 'heading__h2': false, 'heading__h3': false}}
bind:new_html={$idaa_slct.post_comment_obj.content_new_html}
classes="bg-gray-100 dark:bg-gray-800"
placeholder="Your post content here..."
/>
</label>
</div>
<h3 class="h3">Poster's Information</h3>
<fieldset class="">
<legend class="">Post as Anonymous</legend>
<h3 class="h3">Commenter's Information</h3>
<fieldset class="form-group">
<legend class="text-sm text-gray-600 dark:text-gray-400">Comment as Anonymous</legend>
<div class="flex flex-row gap-2">
<input
type="radio"
@@ -385,7 +396,7 @@ function send_poster_notification_email() {
bind:group={$idaa_slct.post_comment_obj.anonymous}
class="radio"
>
<label for="anonymous_no">No, include my name and email address</label>
<label for="anonymous_no"><strong>No</strong>, include my name and email address</label>
</div>
<div class="flex flex-row gap-2">
<input
@@ -396,11 +407,18 @@ function send_poster_notification_email() {
bind:group={$idaa_slct.post_comment_obj.anonymous}
class="radio"
>
<label for="anonymous_yes">Yes, the post will be listed as Anonymous</label>
<label for="anonymous_yes"><strong>Yes</strong>, the post will be listed as Anonymous</label>
</div>
</fieldset>
<label for="external_person_id"><span class="fas fa-link"></span> Linked with Novi ID
<div>
<label
for="external_person_id"
class="block form-group d-block w-100"
>
<span class="text-sm text-gray-600 dark:text-gray-400">
<span class="fas fa-link"></span> Linked with Novi ID
</span>
{#if !$ae_loc.trusted_access}
<span class="fas fa-lock" title="Field is locked"></span>
<input
@@ -409,7 +427,7 @@ function send_poster_notification_email() {
name="external_person_id"
value={($idaa_slct.post_comment_obj.external_person_id ? $idaa_slct.post_comment_obj.external_person_id : $idaa_loc.novi_uuid)}
readonly={true}
class="input w-96"
class="input w-96 form-control"
>
{:else}
<div class="ae_highlight text-sm bg-yellow-100 p-2">
@@ -422,29 +440,39 @@ function send_poster_notification_email() {
name="external_person_id"
value={($idaa_slct.post_comment_obj.external_person_id ? $idaa_slct.post_comment_obj.external_person_id : '')}
readonly={false}
class="input w-96"
class="input w-96 form-control"
>
{/if}
</label>
</div>
<label for="full_name">Name
{#if !$ae_loc.trusted_access}
<span class="fas fa-lock m-1" title="Field is locked"></span>
{:else}
<span class="fas fa-unlock m-1" title="Field is unlocked"></span>
{/if}
<div>
<label for="full_name" class="block form-group d-block w-75">
<span class="text-sm text-gray-600 dark:text-gray-400">
Name
{#if !$ae_loc.trusted_access}
<span class="fas fa-lock m-1" title="Field is locked"></span>
{:else}
<span class="fas fa-unlock m-1" title="Field is unlocked"></span>
{/if}
</span>
<input
type="text"
id="full_name"
name="full_name"
value={($idaa_slct.post_comment_obj.full_name ? $idaa_slct.post_comment_obj.full_name : $idaa_loc.novi_full_name)}
readonly={!$ae_loc.trusted_access}
class="input w-96"
class="input w-96 form-control"
>
</label>
</div>
{#if $ae_loc.trusted_access}
<label for="email">Email
<div>
<label for="email" class="block form-group d-block w-75">
<span class="text-sm text-gray-600 dark:text-gray-400">
Email
</span>
{#if !$ae_loc.trusted_access}
<span class="fas fa-lock m-1" title="Field is locked"></span>
{:else}
@@ -455,34 +483,51 @@ function send_poster_notification_email() {
name="email"
value={($idaa_slct.post_comment_obj.email ? $idaa_slct.post_comment_obj.email : $idaa_loc.novi_email)}
readonly={!$ae_loc.trusted_access}
class="input w-96"
class="input w-96 form-control"
>
<span class="text-xs text-gray-600 dark:text-gray-400 italic">
Secondary link using the Novi email address
</span>
</label>
</div>
{:else}
<input type="hidden" name="email" value={($idaa_slct.post_comment_obj.email ? $idaa_slct.post_comment_obj.email : $idaa_loc.novi_email)} />
{/if}
</section> <!-- END: section post__general_information -->
</div> <!-- END: section post__general_information -->
{#if $ae_loc.trusted_access}
<button
type="button"
class="novi_btn btn btn-sm preset-tonal-warning float-right"
class="
novi_btn
btn btn-sm float-right
"
class:preset-filled-success-200-800={$idaa_loc.bb.show__admin_options}
class:preset-filled-tertiary-200-800={!$idaa_loc.bb.show__admin_options}
onclick={() => {
$idaa_loc.bb.show__admin_options = !$idaa_loc.bb.show__admin_options;
}}
>
{#if $idaa_loc.bb.show__admin_options}
<span class="fas fa-eye-slash m-1"></span>
{:else}
<span class="fas fa-eye m-1"></span>
{/if}
{$idaa_loc.bb.show__admin_options ? 'Hide' : 'Show'} Admin
</button>
<!-- BEGIN: section post__admin_options -->
<section
class="ae_section post__admin_options border border-gray-200 rounded p-2 space-y-2 bg-red-100"
<div
class="
ae_section post_comment__admin_options
space-y-1 p-2
border rounded
preset-filled-warning-100-900
preset-outlined-warning-400-600
transition
"
class:hidden={!$idaa_loc.bb.show__admin_options}
>
@@ -494,10 +539,10 @@ function send_poster_notification_email() {
class="flex flex-col md:flex-row flex-wrap gap-2 items-center justify-center md:justify-stretch w-full"
>
<span
class="flex flex-row flex-wrap gap-2 items-center justify-evenly grow"
class="flex flex-row flex-wrap gap-2 items-center justify-evenly grow form-check"
>
<fieldset class="flex flex-row gap-1 items-center justify-center">
<legend class="legend text-sm font-semibold">Hide</legend>
<legend class="legend text-sm font-semibold form-check-label">Hide</legend>
<div>
<input
type="radio"
@@ -505,7 +550,7 @@ function send_poster_notification_email() {
name="hide"
value={true}
bind:group={$idaa_slct.post_comment_obj.hide}
class="radio"
class="radio form-check-input"
>
<label for="hide_yes">Yes</label>
</div>
@@ -516,14 +561,14 @@ function send_poster_notification_email() {
name="hide"
value={false}
bind:group={$idaa_slct.post_comment_obj.hide}
class="radio"
class="radio form-check-input"
>
<label for="hide_no">No</label>
</div>
</fieldset>
<fieldset class="flex flex-row gap-2">
<legend class="legend text-sm font-semibold">Priority</legend>
<fieldset class="flex flex-row gap-2 items-center justify-center form-check">
<legend class="legend text-sm font-semibold form-check-label">Priority</legend>
<div>
<input
type="radio"
@@ -531,7 +576,7 @@ function send_poster_notification_email() {
name="priority"
value={true}
bind:group={$idaa_slct.post_comment_obj.priority}
class="radio"
class="radio form-check-input"
>
<label for="priority_yes">Yes</label>
</div>
@@ -542,23 +587,29 @@ function send_poster_notification_email() {
name="priority"
value={false}
bind:group={$idaa_slct.post_comment_obj.priority}
class="radio"
class="radio form-check-input"
>
<label for="priority_no">No</label>
</div>
</fieldset>
</span>
<span class="flex flex-row flex-wrap gap-1 items-center justify-evenly grow">
<label class="legend text-sm font-semibold">Sort <input type="number" name="sort" value={$idaa_slct.post_comment_obj.sort} class="input w-24" /></label>
<span
class="
grow
flex flex-row flex-wrap gap-1 items-center justify-evenly
col-sm-1
"
>
<label class="legend text-sm font-semibold input-group">Sort <input type="number" name="sort" value={$idaa_slct.post_comment_obj.sort} class="input w-24" /></label>
<label class="legend text-sm font-semibold">Group <input type="text" name="group" value={$idaa_slct.post_comment_obj.group ?? ''} max="100" class="input w-40" /></label>
<label class="legend text-sm font-semibold input-group">Group <input type="text" name="group" value={$idaa_slct.post_comment_obj.group ?? ''} max="100" class="input w-40" /></label>
</span>
{#if $ae_loc.administrator_access}
<span class="flex flex-row flex-wrap gap-1 items-center justify-evenly grow">
<fieldset class="flex flex-row gap-2">
<legend class="legend text-sm font-semibold">Enable</legend>
<fieldset class="flex flex-row gap-2 form-check">
<legend class="legend text-sm font-semibold form-check-label">Enable</legend>
<div>
<input
type="radio"
@@ -566,7 +617,7 @@ function send_poster_notification_email() {
name="enable"
value={true}
bind:group={$idaa_slct.post_comment_obj.enable}
class="radio"
class="radio form-check-input"
>
<label for="enable_yes">Yes</label>
</div>
@@ -577,7 +628,7 @@ function send_poster_notification_email() {
name="enable"
value={false}
bind:group={$idaa_slct.post_comment_obj.enable}
class="radio"
class="radio form-check-input"
>
<label for="enable_no">No</label>
</div>
@@ -600,23 +651,33 @@ function send_poster_notification_email() {
</label>
{/if} -->
</section> <!-- END: section post__admin_options -->
</div> <!-- END: section post_comment__admin_options -->
{/if}
<section class="ae_section ae_options ae_row ae_actions post__options post__actions flex flex-row gap-1 items-center justify-between">
<div
class="
ae_section ae_options ae_row ae_actions post_comment__options post_comment__actions
flex flex-row gap-1 items-center justify-between w-full
d-flex align-items-center justify-content-between
"
>
<div>
<!-- BEGIN: section post__options -->
{#if $idaa_slct.post_id}
<!-- BEGIN: section post_comment__options -->
{#if $idaa_slct.post_comment_id}
<button
type="submit"
disabled={(disable_submit_btn)}
class="novi_btn btn_primary btn btn-primary preset-tonal-primary border border-primary-500 hover:preset-filled-primary-500 transition"
class="
novi_btn btn-warning
btn preset-tonal-success
hover:preset-filled-success-200-800 transition
"
>
{#await prom_api__post_comment_obj}
<span class="fas fa-spinner fa-spin m-1"></span> Saving
{:then}
<span class="fas fa-save m-1"></span> Save
<span class="fas fa-save m-1"></span> Save Changes
{/await}
</button>
{:else}
@@ -627,12 +688,16 @@ function send_poster_notification_email() {
if (!confirm('Are you sure you want to create this post?')) {return false;}
// handle_save_post_comment_obj({post_id: $idaa_slct.post_id, method: 'create'});
}}
class="novi_btn btn_primary btn btn-primary preset-tonal-primary border border-primary-500 hover:preset-filled-primary-500 transition"
class="
novi_btn btn-warning
btn preset-tonal-warning
hover:preset-filled-warning-200-800 transition
"
>
{#await prom_api__post_comment_obj}
<span class="fas fa-spinner fa-spin m-1"></span> Saving
{:then}
<span class="fas fa-plus m-1"></span> Save New Event
<span class="fas fa-plus m-1"></span> Save New Comment
{/await}
</button>
{/if}
@@ -645,7 +710,11 @@ function send_poster_notification_email() {
if (!confirm('Are you sure you want to delete this post comment?')) {return false;}
handle_delete_post_comment_obj({post_comment_id: $idaa_slct.post_comment_id, method: 'delete'});
}}
class="novi_btn btn btn-sm preset-tonal-warning"
class="
novi_btn
btn btn-sm
preset-filled-warning-400-600 hover:preset-filled-error-200-800
"
title="Delete record permanently"
>
<span class="fas fa-minus m-1"></span> Delete
@@ -657,7 +726,12 @@ function send_poster_notification_email() {
if (!confirm('Are you sure you want to disable this post comment?')) {return false;}
handle_delete_post_comment_obj({post_comment_id: $idaa_slct.post_comment_id, method: 'disable'});
}}
class="novi_btn btn btn-sm preset-tonal-warning"
class="
novi_btn
btn btn-sm
preset-filled-warning-200-800 hover:preset-filled-error-200-800
transition
"
title="Disable record to delete"
>
<span class="fas fa-minus m-1"></span> Delete
@@ -669,7 +743,12 @@ function send_poster_notification_email() {
if (!confirm('Are you sure you want to hide this post comment?')) {return false;}
handle_delete_post_comment_obj({post_comment_id: $idaa_slct.post_comment_id, method: 'hide'});
}}
class="novi_btn btn btn-sm preset-tonal-warning"
class="
novi_btn
btn btn-sm
preset-filled-warning-200-800 hover:preset-filled-error-200-800
transition
"
title="Hide record to delete"
>
<span class="fas fa-comment-slash m-1"></span> Delete
@@ -684,13 +763,19 @@ function send_poster_notification_email() {
onclick={() => {
$idaa_sess.bb.show__inline_edit__post_comment_id = false;
}}
class="novi_btn btn btn-sm preset-tonal-warning border border-warning-500 hover:preset-filled-warning-500 transition"
class="
novi_btn
btn btn-sm
preset-filled-warning-200-800 hover:preset-filled-success-200-800
transition
"
title="Cancel editing of post for {$idaa_slct.post_comment_obj.full_name} (ID: {$idaa_slct.post_comment_obj.post_comment_id}"
>
<span class="fas fa-edit m-1"></span> Cancel Edit
<span class="fas fa-times m-1"></span>
Cancel Edit
</button>
</div>
</section>
</div>
</form>

View File

@@ -375,7 +375,11 @@ $effect(() => {
<section
class="svelte_component ae_section ae_edit post_obj edit__post_obj space-y-2 p-2 border rounded preset-outlined-warning-200-800 preset-tonal-warning"
class="
svelte_component ae_section ae_edit post_obj edit__post_obj
space-y-2 p-2 border rounded
preset-outlined-warning-200-800 preset-tonal-warning
"
class:ae_create={!$idaa_slct.post_id}
bind:clientHeight={$ae_loc.iframe_height_modal_body}
>
@@ -412,7 +416,8 @@ $effect(() => {
"
title="Cancel editing of post for {$idaa_slct.post_obj.full_name} (ID: {$idaa_slct.post_obj.post_id}"
>
<span class="fas fa-edit m-1"></span> Cancel Edit
<span class="fas fa-times m-1"></span>
Cancel Edit
</button>
</section> <!-- END: section post__options -->
@@ -711,7 +716,10 @@ $effect(() => {
</fieldset>
<div>
<label for="external_person_id" class="block form-group d-block w-100">
<label
for="external_person_id"
class="block form-group d-block w-100"
>
<span class="text-sm text-gray-600 dark:text-gray-400">
<span class="fas fa-link"></span> Linked with Novi ID
</span>
@@ -769,12 +777,12 @@ $effect(() => {
<label for="email" class="block form-group d-block w-75">
<span class="text-sm text-gray-600 dark:text-gray-400">
Email
{#if !$ae_loc.trusted_access}
<span class="fas fa-lock m-1" title="Field is locked"></span>
{:else}
<span class="fas fa-unlock m-1" title="Field is unlocked"></span>
{/if}
</span>
{#if !$ae_loc.trusted_access}
<span class="fas fa-lock m-1" title="Field is locked"></span>
{:else}
<span class="fas fa-unlock m-1" title="Field is unlocked"></span>
{/if}
<input
type="email"
name="email"
@@ -841,12 +849,19 @@ $effect(() => {
{:else}
<span class="fas fa-eye m-1"></span>
{/if}
{$idaa_loc.bb.show__admin_options ? 'Hide' : 'Show'} Admin?
{$idaa_loc.bb.show__admin_options ? 'Hide' : 'Show'} Admin
</button>
<!-- BEGIN: section post__admin_options -->
<div
class="ae_section post__admin_options border border-gray-200 rounded p-2 space-y-2 bg-red-100"
class="
ae_section post__admin_options
space-y-1 p-2
border rounded
preset-filled-warning-100-900
preset-outlined-warning-400-600
transition
"
class:hidden={!$idaa_loc.bb.show__admin_options}
>
@@ -913,7 +928,13 @@ $effect(() => {
</fieldset>
</span>
<span class="flex flex-row flex-wrap gap-1 items-center justify-evenly grow col-sm-1">
<span
class="
grow
flex flex-row flex-wrap gap-1 items-center justify-evenly
col-sm-1
"
>
<label class="legend text-sm font-semibold input-group">Sort <input type="number" name="sort" bind:value={$idaa_slct.post_obj.sort} class="input w-24 form-control" /></label>
<label class="legend text-sm font-semibold input-group">Group <input type="text" name="group" bind:value={$idaa_slct.post_obj.group} max="100" class="input w-40 form-control" /></label>
@@ -966,6 +987,7 @@ $effect(() => {
}}
bind:new_html={notes_new_html}
bind:changed={notes_changed}
classes="bg-gray-100 dark:bg-gray-800"
placeholder="Internal notes for staff only. Not shown to the public."
/>
</label>
@@ -975,10 +997,11 @@ $effect(() => {
{/if}
<div class="
ae_section ae_options ae_row ae_actions post__options post__actions
flex flex-row gap-1 items-center justify-between w-full
d-flex align-items-center justify-content-between
<div
class="
ae_section ae_options ae_row ae_actions post__options post__actions
flex flex-row gap-1 items-center justify-between w-full
d-flex align-items-center justify-content-between
"
>
<div>
@@ -986,10 +1009,12 @@ $effect(() => {
{#if $idaa_slct.post_id}
<button
type="submit"
disabled={(disable_submit_btn || !obj_changed)}
class="novi_btn btn btn-primary
preset-tonal-success
hover:preset-filled-success-500 transition"
disabled={!(disable_submit_btn || !obj_changed)}
class="
novi_btn btn-warning
btn preset-tonal-success
hover:preset-filled-success-200-800 transition
"
>
{#await prom_api__post_obj}
<span class="fas fa-spinner fa-spin m-1"></span> Saving
@@ -1005,7 +1030,11 @@ $effect(() => {
if (!confirm('Are you sure you want to create this post?')) {return false;}
// handle_save_post_obj({post_id: $idaa_slct.post_id, method: 'create'});
}}
class="novi_btn btn_primary btn btn-primary preset-tonal-primary border border-primary-500 hover:preset-filled-primary-500 transition"
class="
novi_btn btn-warning
btn preset-tonal-warning
hover:preset-filled-warning-200-800 transition
"
>
{#await prom_api__post_obj}
<span class="fas fa-spinner fa-spin m-1"></span> Saving
@@ -1025,8 +1054,9 @@ $effect(() => {
}}
class="
novi_btn
btn btn-sm preset-filled-warning-400-600 hover:preset-filled-error-200-800
"
btn btn-sm
preset-filled-warning-400-600 hover:preset-filled-error-200-800
"
title="Delete record permanently"
>
<span class="fas fa-minus m-1"></span> Delete
@@ -1090,7 +1120,8 @@ $effect(() => {
"
title="Cancel editing of post for {$idaa_slct.post_obj.full_name} (ID: {$idaa_slct.post_obj.post_id}"
>
<span class="fas fa-edit m-1"></span> Cancel Edit
<span class="fas fa-times m-1"></span>
Cancel Edit
</button>
</div>
</div>

View File

@@ -278,7 +278,11 @@ $effect(() => {
// $idaa_sess.bb.show__inline_edit__post_obj = true;
$idaa_sess.bb.edit__post_obj = $idaa_slct.post_id;
}}
class="novi_btn btn btn-sm preset-tonal-warning border border-warning-500 hover:preset-filled-warning-500 transition"
class="
novi_btn
btn btn-sm preset-tonal-warning
hover:preset-filled-warning-500 transition
"
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
@@ -351,10 +355,14 @@ $effect(() => {
$idaa_sess.bb.show__inline_edit__post_comment_id = post_comment_obj.post_comment_id;
}}
class="novi_btn btn btn-sm preset-tonal-warning border border-warning-500 hover:preset-filled-warning-500 transition"
class="
novi_btn
btn btn-sm preset-tonal-warning
hover:preset-filled-warning-500 transition"
title="Edit comment by {post_comment_obj?.full_name} (for post ID {$lq__post_obj?.id})"
>
<span class="fas fa-edit"></span> Edit Comment
<span class="fas fa-edit m-1"></span>
Edit Comment
</button>
</div>
{/if}

View File

@@ -82,70 +82,6 @@ onMount(() => {
</span>
{/if}
</a>
{#if 1==3 && $ae_loc.edit_mode && $ae_loc.trusted_access}
<button
type="button"
disabled={!$ae_loc.administrator_access}
on:click={() => {
$idaa_slct.post_id = idaa_post_obj?.post_id;
$idaa_slct.post_obj = idaa_post_obj;
// handle_load_post_comment_obj_li({post_id: $idaa_slct.post_id, try_cache: false});
const url = new URL(location);
url.searchParams.set('post_id', idaa_post_obj?.post_id);
history.pushState({}, '', url);
let message = {'post_id': idaa_post_obj?.post_id};
window.parent.postMessage(message, "*");
// $idaa_sess.bb.show_main__options = true;
// $idaa_sess.bb.show_list__post_obj_li = true;
// $idaa_sess.bb.show_edit__post_id = false;
$idaa_sess.bb.show__modal_view__post_id = idaa_post_obj?.post_id;
$idaa_sess.bb.show__modal_edit__post_id = false;
}}
class="novi_btn btn btn-md preset-tonal-error border border-error-500 hover:preset-filled-error-500 transition"
title={`View: ${idaa_post_obj?.title}`}
>
<span class="fas fa-envelope-open m-1"></span> Open
{#if idaa_post_obj?.post_comment_count}
<span class="ae_badge ae_info post__post_comment_count">
<span class="fas fa-comments"></span> {(idaa_post_obj?.post_comment_count == 1 ? `${idaa_post_obj?.post_comment_count} comment` : `${idaa_post_obj?.post_comment_count} comments` )}
</span>
{/if}
{#if idaa_post_obj?.linked_li_json?.length}
<span class="ae_badge ae_info post__linked_li_count">
<span class="fas fa-link"></span> {idaa_post_obj?.linked_li_json?.length}
{(idaa_post_obj?.linked_li_json?.length == 1 ? ' file' : ' files')}
</span>
{/if}
</button>
{/if}
{#if (1==3 && $ae_loc.trusted_access && $ae_loc.edit_mode) || idaa_post_obj.external_person_id === $idaa_loc.novi_uuid}
<button
type="button"
disabled={!$ae_loc.administrator_access}
on:click={() => {
$idaa_slct.post_id = idaa_post_obj?.post_id;
$idaa_slct.post_obj = idaa_post_obj;
// $slct_trigger = 'load__post_obj';
// $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_view__post_id = idaa_post_obj.post_id;
$idaa_sess.bb.show__inline_edit__post_obj = true;
}}
class="novi_btn btn btn-sm preset-tonal-error border border-error-500 hover:preset-filled-error-500 transition"
title={`Edit post: ${idaa_post_obj.title}`}
>
<span class="fas fa-edit m-1"></span> Edit Post
</button>
{/if}
</div>
<div class="ae_footer ae_meta post__meta text-sm text-gray-500/80 m-1 flex flex-row gap-2 items-center justify-center">