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:
@@ -917,42 +917,21 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if $ae_loc.trusted_access}
|
{#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 -->
|
<!-- BEGIN: section archive_content__admin_options -->
|
||||||
<div
|
<div class="p-3 space-y-3 rounded-md bg-surface-100-900 border border-error-400">
|
||||||
class="
|
<button
|
||||||
ae_section archive_content__admin_options
|
type="button"
|
||||||
space-y-1 p-2
|
class="flex flex-row items-center gap-2 text-left w-full"
|
||||||
rounded
|
onclick={() => { $idaa_loc.archives.show__admin_options = !$idaa_loc.archives.show__admin_options; }}
|
||||||
preset-filled-surface-100-900 preset-outlined-error-400-600
|
>
|
||||||
transition
|
<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">
|
||||||
class:hidden={!$idaa_loc.archives.show__admin_options}
|
<span class="fas fa-cogs"></span>
|
||||||
>
|
Admin Options
|
||||||
<h3 class="h3">Admin Options</h3>
|
</h3>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div class="space-y-3" class:hidden={!$idaa_loc.archives.show__admin_options}>
|
||||||
<span
|
<span
|
||||||
class="flex flex-col md:flex-row flex-wrap gap-2 items-center justify-center md:justify-stretch w-full"
|
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}`
|
? `SLCT Updated on: ${$idaa_slct.archive_content_obj?.updated_on}`
|
||||||
: ''}
|
: ''}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- END: section archive_content__admin_options -->
|
<!-- END: section archive_content__admin_options -->
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -546,42 +546,21 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if $ae_loc.trusted_access}
|
{#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 -->
|
<!-- BEGIN: section archive__admin_options -->
|
||||||
<div
|
<div class="p-3 space-y-3 rounded-md bg-surface-100-900 border border-error-400">
|
||||||
class="
|
<button
|
||||||
ae_section archive__admin_options
|
type="button"
|
||||||
space-y-1 p-2
|
class="flex flex-row items-center gap-2 text-left w-full"
|
||||||
rounded
|
onclick={() => { $idaa_loc.archives.show__admin_options = !$idaa_loc.archives.show__admin_options; }}
|
||||||
preset-filled-surface-100-900 preset-outlined-error-400-600
|
>
|
||||||
transition
|
<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">
|
||||||
class:hidden={!$idaa_loc.archives.show__admin_options}
|
<span class="fas fa-cogs"></span>
|
||||||
>
|
Admin Options
|
||||||
<h3 class="h3">Admin Options</h3>
|
</h3>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div class="space-y-3" class:hidden={!$idaa_loc.archives.show__admin_options}>
|
||||||
<span
|
<span
|
||||||
class="flex flex-col md:flex-row flex-wrap gap-2 items-center justify-center md:justify-stretch w-full"
|
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}`
|
? `SLCT Updated on: ${$idaa_slct.archive_obj?.updated_on}`
|
||||||
: ''}
|
: ''}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- END: section archive__admin_options -->
|
<!-- END: section archive__admin_options -->
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -620,38 +620,21 @@ Copy and paste link: <a href="${link_base_url}?post_id=${$idaa_slct.post_id}">${
|
|||||||
<!-- END: section post__general_information -->
|
<!-- END: section post__general_information -->
|
||||||
|
|
||||||
{#if $ae_loc.trusted_access}
|
{#if $ae_loc.trusted_access}
|
||||||
<button type="button"
|
<!-- BEGIN: section post_comment__admin_options -->
|
||||||
class="
|
<div class="p-3 space-y-3 rounded-md bg-surface-100-900 border border-error-400">
|
||||||
novi_btn
|
<button
|
||||||
btn btn-sm float-right
|
type="button"
|
||||||
"
|
class="flex flex-row items-center gap-2 text-left w-full"
|
||||||
class:preset-filled-success-200-800={$idaa_loc.bb.show__admin_options}
|
onclick={() => { $idaa_loc.bb.show__admin_options = !$idaa_loc.bb.show__admin_options; }}
|
||||||
class:preset-filled-tertiary-200-800={!$idaa_loc.bb.show__admin_options}
|
>
|
||||||
onclick={() => {
|
<span class="fas fa-{$idaa_loc.bb.show__admin_options ? 'caret-down' : 'caret-right'} text-xs opacity-60"></span>
|
||||||
$idaa_loc.bb.show__admin_options = !$idaa_loc.bb.show__admin_options;
|
<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
|
||||||
{#if $idaa_loc.bb.show__admin_options}
|
</h3>
|
||||||
<span class="fas fa-eye-slash m-1"></span>
|
</button>
|
||||||
{: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>
|
|
||||||
|
|
||||||
|
<div class="space-y-3" class:hidden={!$idaa_loc.bb.show__admin_options}>
|
||||||
<span
|
<span
|
||||||
class="flex flex-col md:flex-row flex-wrap gap-2 items-center justify-center md:justify-stretch w-full"
|
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>
|
</span>
|
||||||
{/if}
|
{/if}
|
||||||
</span>
|
</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- END: section post_comment__admin_options -->
|
<!-- END: section post_comment__admin_options -->
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -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 -->
|
<!-- END: section post__general_information -->
|
||||||
|
|
||||||
{#if $ae_loc.trusted_access}
|
{#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 -->
|
<!-- BEGIN: section post__admin_options -->
|
||||||
<div
|
<div class="p-3 space-y-3 rounded-md bg-surface-100-900 border border-error-400">
|
||||||
class="
|
<button
|
||||||
ae_section post__admin_options
|
type="button"
|
||||||
space-y-1 p-2
|
class="flex flex-row items-center gap-2 text-left w-full"
|
||||||
rounded
|
onclick={() => { $idaa_loc.bb.show__admin_options = !$idaa_loc.bb.show__admin_options; }}
|
||||||
preset-filled-surface-100-900 preset-outlined-error-400-600
|
>
|
||||||
transition
|
<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">
|
||||||
class:hidden={!$idaa_loc.bb.show__admin_options}
|
<span class="fas fa-cogs"></span>
|
||||||
>
|
Admin Options
|
||||||
<h3 class="h3">Admin Options</h3>
|
</h3>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div class="space-y-3" class:hidden={!$idaa_loc.bb.show__admin_options}>
|
||||||
<span
|
<span
|
||||||
class="flex flex-col md:flex-row flex-wrap gap-2 items-center justify-center md:justify-stretch w-full"
|
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>
|
</label>
|
||||||
{/if}
|
{/if}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- END: section post__admin_options -->
|
<!-- END: section post__admin_options -->
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Reference in New Issue
Block a user