refactor(ui): standardize button types and migrate file operations to V3 Action API

This commit is contained in:
Scott Idem
2026-02-03 22:54:22 -05:00
parent e8f92b818a
commit 49f0a888b0
81 changed files with 393 additions and 653 deletions

View File

@@ -221,8 +221,7 @@
<!-- View (default)/Edit event_id toggle -->
{#if $idaa_sess.recovery_meetings.edit__event_obj}
<button
type="button"
<button type="button"
class="
novi_btn
btn btn-sm
@@ -246,8 +245,7 @@
{: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__event_obj?.external_person_id === $idaa_loc.novi_uuid || ($lq__event_obj?.contact_li_json && $lq__event_obj.contact_li_json.length > 0 && $lq__event_obj.contact_li_json[0]?.email === $idaa_loc.novi_email)}
<button
type="button"
<button type="button"
class="
novi_btn
btn btn-sm preset-tonal-warning

View File

@@ -958,8 +958,7 @@
$idaa_slct.event_obj.description_new_html &&
$idaa_slct.event_obj?.description_new_html != '<p></p>' &&
$idaa_slct.event_obj.description != $idaa_slct.event_obj.description_new_html}
<button
type="button"
<button type="button"
class="btn btn-md btn-primary variant-ghost-secondary"
on:click={() => $idaa_slct.event_obj.description = $idaa_slct.event_obj.description_new_html}
>
@@ -1064,8 +1063,7 @@
</fieldset>
{#if !$idaa_slct.event_obj?.physical && !$idaa_slct.event_obj?.more__location_fields}
<button
type="button"
<button type="button"
class="
novi_btn btn-secondary
btn btn-sm
@@ -1078,8 +1076,7 @@
Show Extra Location Fields
</button>
{:else if !$idaa_slct.event_obj?.physical && $idaa_slct.event_obj?.more__location_fields}
<button
type="button"
<button type="button"
class="
novi_btn btn-secondary
btn btn-sm
@@ -1338,8 +1335,7 @@
$idaa_slct.event_obj?.location_text_new_html &&
$idaa_slct.event_obj?.location_text_new_html != '<p></p>' &&
$idaa_slct.event_obj.location_text != $idaa_slct.event_obj.location_text_new_html}
<button
type="button"
<button type="button"
class="btn btn-md btn-primary variant-ghost-secondary"
on:click={() => $idaa_slct.event_obj.location_text = $idaa_slct.event_obj.location_text_new_html}
>
@@ -1350,8 +1346,7 @@
</label>
{#if !$idaa_slct.event_obj?.virtual && !$idaa_slct.event_obj?.more__virtual_fields}
<button
type="button"
<button type="button"
class="
novi_btn btn-secondary
btn btn-sm
@@ -1365,8 +1360,7 @@
Show Extra Virtual Fields
</button>
{:else if !$idaa_slct.event_obj?.virtual && $idaa_slct.event_obj?.more__virtual_fields}
<button
type="button"
<button type="button"
class="btn btn-secondary preset-tonal-surface hover:preset-filled-surface-100-900"
onclick={() => ($idaa_slct.event_obj.more__virtual_fields = false)}
>
@@ -1406,8 +1400,7 @@
{$idaa_sess.recovery_meetings.attend_platform}
</p>
{#if $idaa_sess.recovery_meetings?.attend_platform === 'Zoom'}
<button
type="button"
<button type="button"
class="
novi_btn
btn btn-lg
@@ -1422,8 +1415,7 @@
Not Zoom - Other Platform/Service
</button>
{:else if $idaa_sess.recovery_meetings?.attend_platform === 'Jitsi'}
<button
type="button"
<button type="button"
class="
novi_btn
btn btn-lg
@@ -1438,8 +1430,7 @@
Not Jitsi - Other Platform/Service
</button>
{:else if !$idaa_sess.recovery_meetings?.attend_platform || $idaa_sess.recovery_meetings?.attend_platform === 'other'}
<button
type="button"
<button type="button"
class="
novi_btn
btn btn-lg
@@ -1482,8 +1473,7 @@
Zoom Meeting
</button>
<button
type="button"
<button type="button"
class="
novi_btn
btn btn-lg
@@ -1812,8 +1802,7 @@
$idaa_slct.event_obj?.attend_text_new_html &&
$idaa_slct.event_obj?.attend_text_new_html != '<p></p>' &&
$idaa_slct.event_obj.attend_text != $idaa_slct.event_obj.attend_text_new_html}
<button
type="button"
<button type="button"
class="btn btn-md btn-primary variant-ghost-secondary"
on:click={() => $idaa_slct.event_obj.attend_text = $idaa_slct.event_obj.attend_text_new_html}
>
@@ -2057,8 +2046,7 @@
$idaa_slct.event_obj?.recurring_text_new_html &&
$idaa_slct.event_obj?.recurring_text_new_html != '<p></p>' &&
$idaa_slct.event_obj.recurring_text != $idaa_slct.event_obj.recurring_text_new_html}
<button
type="button"
<button type="button"
class="btn btn-md btn-primary variant-ghost-secondary"
on:click={() => $idaa_slct.event_obj.recurring_text = $idaa_slct.event_obj.recurring_text_new_html}
>
@@ -2069,8 +2057,7 @@
</label>
{/if}
{#if $ae_loc.administrator_access || ($lq__event_obj && ($idaa_slct.event_obj?.show_recurring_text || ($lq__event_obj?.recurring_text && !$lq__event_obj?.recurring_text.includes('*gen*'))))}
<button
type="button"
<button type="button"
class="
novi_btn
btn btn-sm
@@ -2095,8 +2082,7 @@
<span class="fas fa-minus m-1"></span> Remove Details?
</button>
{:else}
<button
type="button"
<button type="button"
class="
novi_btn
btn btn-sm
@@ -2187,8 +2173,7 @@
<span class="ae_group">
{#if !($ae_loc.administrator_access || ($idaa_slct.event_obj?.contact_li_json?.length && $idaa_slct.event_obj?.contact_li_json[0]?.unlock))}
<button
type="button"
<button type="button"
onclick={preventDefault(() => {
if (
confirm(
@@ -2214,8 +2199,7 @@
locked
</button>
{:else}
<button
type="button"
<button type="button"
onclick={preventDefault(() => {
$idaa_slct.event_obj.contact_li_json[0].unlock = false;
})}
@@ -2429,8 +2413,7 @@
<!-- END: section event__contacts -->
{#if $ae_loc.trusted_access}
<button
type="button"
<button type="button"
onclick={() => {
$idaa_loc.recovery_meetings.show__admin_options =
!$idaa_loc.recovery_meetings.show__admin_options;
@@ -2689,8 +2672,7 @@
{#if $idaa_slct.event_id}
{#if $ae_loc.administrator_access}
<button
type="button"
<button type="button"
onclick={() => {
if (!confirm('Are you sure you want to delete this event?')) {
return false;
@@ -2711,8 +2693,7 @@
<span class="fas fa-minus m-1"></span> Delete
</button>
{:else if $ae_loc.trusted_access}
<button
type="button"
<button type="button"
onclick={() => {
if (!confirm('Are you sure you want to disable this event?')) {
return false;
@@ -2733,8 +2714,7 @@
<span class="fas fa-minus m-1"></span> Delete
</button>
{:else}
<button
type="button"
<button type="button"
onclick={() => {
if (!confirm('Are you sure you want to hide this event?')) {
return false;
@@ -2758,8 +2738,7 @@
{/if}
</span>
<span>
<button
type="button"
<button type="button"
class="
novi_btn
btn btn-sm

View File

@@ -111,8 +111,7 @@
<div
class="ae_group flex flex-row flex-wrap gap-2 w-full items-center justify-center border-b border-surface-300-700 p-1"
>
<button
type="button"
<button type="button"
class="
novi_btn novi_smallest
btn btn-sm
@@ -363,8 +362,7 @@
<span class="flex flex-row gap-1 items-center justify-around">
{#if $ae_loc.edit_mode && $ae_loc.trusted_access && (!$idaa_loc.recovery_meetings.qry__hidden || $idaa_loc.recovery_meetings.qry__hidden == 'not_hidden')}
<button
type="button"
<button type="button"
onclick={() => {
$idaa_loc.recovery_meetings.qry__hidden = 'all';
$idaa_loc.recovery_meetings.qry__limit = 200;
@@ -379,8 +377,7 @@
<span class="fas fa-eye m-1"></span> Show Hidden Events
</button>
{:else if $ae_loc.trusted_access && $idaa_loc.recovery_meetings.qry__hidden != 'not_hidden'}
<button
type="button"
<button type="button"
onclick={() => {
$idaa_loc.recovery_meetings.qry__hidden = 'not_hidden';
}}
@@ -396,8 +393,7 @@
{/if}
{#if $ae_loc.edit_mode && $ae_loc.administrator_access && (!$idaa_loc.recovery_meetings.qry__enabled || $idaa_loc.recovery_meetings.qry__enabled == 'enabled')}
<button
type="button"
<button type="button"
onclick={() => {
$idaa_loc.recovery_meetings.qry__hidden = 'all';
$idaa_loc.recovery_meetings.qry__enabled = 'all';
@@ -413,8 +409,7 @@
<span class="fas fa-eye m-1"></span> Show Disabled Events
</button>
{:else if $ae_loc.administrator_access && $idaa_loc.recovery_meetings.qry__enabled != 'enabled'}
<button
type="button"
<button type="button"
onclick={() => {
$idaa_loc.recovery_meetings.qry__enabled = 'enabled';
}}
@@ -432,8 +427,7 @@
<span class="flex flex-row gap-1 items-center justify-around">
{#if ($ae_loc.trusted_access && $ae_loc.edit_mode) || $idaa_loc.novi_uuid}
<button
type="button"
<button type="button"
onclick={() => {
if (!confirm('Create new meeting?')) {
return false;
@@ -485,8 +479,7 @@
{/if}
{#if $ae_loc.edit_mode && $ae_loc.trusted_access}
<button
type="button"
<button type="button"
onclick={() => {
if (!confirm('Download exported data Excel file?')) {
return false;