style(idaa): unify Admin Options toggle style across all IDAA edit forms

Replace the old float-right Show/Hide toggle button + separate collapsible
div with an inline caret-button heading inside a consistent section card
(bg-surface-100-900, border-error-400) — matching the recovery meetings v2
form style. All four forms updated: Post, Post Comment, Archive, Archive
Content. Existing class:hidden behaviour preserved so FormData is unaffected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-03-09 18:29:39 -04:00
parent 3a1ec9a861
commit 2c21117a3f
4 changed files with 57 additions and 129 deletions

View File

@@ -917,42 +917,21 @@
</div>
{#if $ae_loc.trusted_access}
<button
type="button"
class="
novi_btn
btn btn-sm float-right
"
class:preset-filled-success-200-800={$idaa_loc.archives
.show__admin_options}
class:preset-filled-tertiary-200-800={!$idaa_loc.archives
.show__admin_options}
onclick={() => {
$idaa_loc.archives.show__admin_options =
!$idaa_loc.archives.show__admin_options;
}}
>
{#if $idaa_loc.archives.show__admin_options}
<span class="fas fa-eye-slash m-1"></span>
{:else}
<span class="fas fa-eye m-1"></span>
{/if}
{$idaa_loc.archives.show__admin_options ? 'Hide' : 'Show'} Admin
</button>
<!-- BEGIN: section archive_content__admin_options -->
<div
class="
ae_section archive_content__admin_options
space-y-1 p-2
rounded
preset-filled-surface-100-900 preset-outlined-error-400-600
transition
"
class:hidden={!$idaa_loc.archives.show__admin_options}
>
<h3 class="h3">Admin Options</h3>
<div class="p-3 space-y-3 rounded-md bg-surface-100-900 border border-error-400">
<button
type="button"
class="flex flex-row items-center gap-2 text-left w-full"
onclick={() => { $idaa_loc.archives.show__admin_options = !$idaa_loc.archives.show__admin_options; }}
>
<span class="fas fa-{$idaa_loc.archives.show__admin_options ? 'caret-down' : 'caret-right'} text-xs opacity-60"></span>
<h3 class="text-lg font-semibold text-surface-600-400 flex items-center gap-2 w-full">
<span class="fas fa-cogs"></span>
Admin Options
</h3>
</button>
<div class="space-y-3" class:hidden={!$idaa_loc.archives.show__admin_options}>
<span
class="flex flex-col md:flex-row flex-wrap gap-2 items-center justify-center md:justify-stretch w-full"
>
@@ -1130,6 +1109,7 @@
? `SLCT Updated on: ${$idaa_slct.archive_content_obj?.updated_on}`
: ''}
</div>
</div>
</div>
<!-- END: section archive_content__admin_options -->
{/if}

View File

@@ -546,42 +546,21 @@
{/if}
{#if $ae_loc.trusted_access}
<button
type="button"
class="
novi_btn
btn btn-sm float-right
"
class:preset-filled-success-200-800={$idaa_loc.archives
.show__admin_options}
class:preset-filled-tertiary-200-800={!$idaa_loc.archives
.show__admin_options}
onclick={() => {
$idaa_loc.archives.show__admin_options =
!$idaa_loc.archives.show__admin_options;
}}
>
{#if $idaa_loc.archives.show__admin_options}
<span class="fas fa-eye-slash m-1"></span>
{:else}
<span class="fas fa-eye m-1"></span>
{/if}
{$idaa_loc.archives.show__admin_options ? 'Hide' : 'Show'} Admin
</button>
<!-- BEGIN: section archive__admin_options -->
<div
class="
ae_section archive__admin_options
space-y-1 p-2
rounded
preset-filled-surface-100-900 preset-outlined-error-400-600
transition
"
class:hidden={!$idaa_loc.archives.show__admin_options}
>
<h3 class="h3">Admin Options</h3>
<div class="p-3 space-y-3 rounded-md bg-surface-100-900 border border-error-400">
<button
type="button"
class="flex flex-row items-center gap-2 text-left w-full"
onclick={() => { $idaa_loc.archives.show__admin_options = !$idaa_loc.archives.show__admin_options; }}
>
<span class="fas fa-{$idaa_loc.archives.show__admin_options ? 'caret-down' : 'caret-right'} text-xs opacity-60"></span>
<h3 class="text-lg font-semibold text-surface-600-400 flex items-center gap-2 w-full">
<span class="fas fa-cogs"></span>
Admin Options
</h3>
</button>
<div class="space-y-3" class:hidden={!$idaa_loc.archives.show__admin_options}>
<span
class="flex flex-col md:flex-row flex-wrap gap-2 items-center justify-center md:justify-stretch w-full"
>
@@ -748,6 +727,7 @@
? `SLCT Updated on: ${$idaa_slct.archive_obj?.updated_on}`
: ''}
</div>
</div>
</div>
<!-- END: section archive__admin_options -->
{/if}

View File

@@ -620,38 +620,21 @@ Copy and paste link: <a href="${link_base_url}?post_id=${$idaa_slct.post_id}">${
<!-- END: section post__general_information -->
{#if $ae_loc.trusted_access}
<button type="button"
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 -->
<div
class="
ae_section post_comment__admin_options
space-y-1 p-2
rounded
preset-filled-surface-100-900 preset-outlined-error-400-600
transition
"
class:hidden={!$idaa_loc.bb.show__admin_options}
>
<h3 class="h3">Admin Options</h3>
<!-- BEGIN: section post_comment__admin_options -->
<div class="p-3 space-y-3 rounded-md bg-surface-100-900 border border-error-400">
<button
type="button"
class="flex flex-row items-center gap-2 text-left w-full"
onclick={() => { $idaa_loc.bb.show__admin_options = !$idaa_loc.bb.show__admin_options; }}
>
<span class="fas fa-{$idaa_loc.bb.show__admin_options ? 'caret-down' : 'caret-right'} text-xs opacity-60"></span>
<h3 class="text-lg font-semibold text-surface-600-400 flex items-center gap-2 w-full">
<span class="fas fa-cogs"></span>
Admin Options
</h3>
</button>
<div class="space-y-3" class:hidden={!$idaa_loc.bb.show__admin_options}>
<span
class="flex flex-col md:flex-row flex-wrap gap-2 items-center justify-center md:justify-stretch w-full"
>
@@ -778,6 +761,7 @@ Copy and paste link: <a href="${link_base_url}?post_id=${$idaa_slct.post_id}">${
</span>
{/if}
</span>
</div>
</div>
<!-- END: section post_comment__admin_options -->
{/if}

View File

@@ -897,38 +897,21 @@ Copy and paste link: <a href="${link_base_url}?post_id=${post_do.post_id}">${lin
<!-- END: section post__general_information -->
{#if $ae_loc.trusted_access}
<button type="button"
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 -->
<div
class="
ae_section post__admin_options
space-y-1 p-2
rounded
preset-filled-surface-100-900 preset-outlined-error-400-600
transition
"
class:hidden={!$idaa_loc.bb.show__admin_options}
>
<h3 class="h3">Admin Options</h3>
<div class="p-3 space-y-3 rounded-md bg-surface-100-900 border border-error-400">
<button
type="button"
class="flex flex-row items-center gap-2 text-left w-full"
onclick={() => { $idaa_loc.bb.show__admin_options = !$idaa_loc.bb.show__admin_options; }}
>
<span class="fas fa-{$idaa_loc.bb.show__admin_options ? 'caret-down' : 'caret-right'} text-xs opacity-60"></span>
<h3 class="text-lg font-semibold text-surface-600-400 flex items-center gap-2 w-full">
<span class="fas fa-cogs"></span>
Admin Options
</h3>
</button>
<div class="space-y-3" class:hidden={!$idaa_loc.bb.show__admin_options}>
<span
class="flex flex-col md:flex-row flex-wrap gap-2 items-center justify-center md:justify-stretch w-full"
>
@@ -1070,6 +1053,7 @@ Copy and paste link: <a href="${link_base_url}?post_id=${post_do.post_id}">${lin
/>
</label>
{/if}
</div>
</div>
<!-- END: section post__admin_options -->
{/if}