refactor: standardize event file actions and apply batch formatting

- Updated 'create_event_file_obj_from_hosted_file_async' to use the modern V3 action endpoint.
- Standardized 'prevent_default' helper names in root Event and Archive components.
- Applied batch formatting (printWidth: 80) across the settings and events modules.
This commit is contained in:
Scott Idem
2026-02-06 16:17:31 -05:00
parent 433862ad00
commit d21e2f8e6f
20 changed files with 846 additions and 453 deletions

View File

@@ -24,11 +24,16 @@
</script>
<!-- New standard events module menu 2025-06-20 -->
<div class="ae_comp__pres_mgmt_menu_opts w-full border-t border-gray-300 mt-1" class:hidden={hide}>
<div
class="ae_comp__pres_mgmt_menu_opts w-full border-t border-gray-300 mt-1"
class:hidden={hide}
>
<h2 class="text-sm font-semibold text-center pb-1">
<button type="button"
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.hide__menu_opts = !$events_loc.pres_mgmt.hide__menu_opts;
$events_loc.pres_mgmt.hide__menu_opts =
!$events_loc.pres_mgmt.hide__menu_opts;
}}
class="btn btn-sm preset-tonal-info border border-info-500"
>
@@ -54,8 +59,13 @@
<div class="flex flex-col gap-1 items-end justify-center">
<span class="flex flex-col gap-1 items-end justify-center">
<!-- Max person select options -->
<span class="flex flex-row gap-1 items-center justify-around w-full">
<label class="text-sm w-32 text-right" for="qry_limit__people">
<span
class="flex flex-row gap-1 items-center justify-around w-full"
>
<label
class="text-sm w-32 text-right"
for="qry_limit__people"
>
Max people:
</label>
<!-- Not using: $events_loc.pres_mgmt.qry_limit__people -->
@@ -79,13 +89,20 @@
</span>
<!-- Max presenters select options -->
<span class="flex flex-row gap-1 items-center justify-around w-full">
<label class="text-sm w-32 text-right" for="qry_limit__presenters">
<span
class="flex flex-row gap-1 items-center justify-around w-full"
>
<label
class="text-sm w-32 text-right"
for="qry_limit__presenters"
>
Max presenters:
</label>
<select
id="qry_limit__presenters"
bind:value={$events_loc.pres_mgmt.qry_limit__presenters}
bind:value={
$events_loc.pres_mgmt.qry_limit__presenters
}
class="select w-20 text-sm preset-tonal-surface px-1"
>
<option value="">-- not set --</option>
@@ -104,13 +121,20 @@
</span>
<!-- Max sessions select options -->
<span class="flex flex-row gap-1 items-center justify-around w-full">
<label class="text-sm w-32 text-right" for="qry_limit__sessions">
<span
class="flex flex-row gap-1 items-center justify-around w-full"
>
<label
class="text-sm w-32 text-right"
for="qry_limit__sessions"
>
Max sessions:
</label>
<select
id="qry_limit__sessions"
bind:value={$events_loc.pres_mgmt.qry_limit__sessions}
bind:value={
$events_loc.pres_mgmt.qry_limit__sessions
}
class="select w-20 text-sm preset-tonal-surface px-1"
>
<option value="">-- not set --</option>
@@ -124,8 +148,13 @@
</span>
<!-- Max files select options -->
<span class="flex flex-row gap-1 items-center justify-around w-full">
<label class="text-sm w-32 text-right" for="qry_limit__files">
<span
class="flex flex-row gap-1 items-center justify-around w-full"
>
<label
class="text-sm w-32 text-right"
for="qry_limit__files"
>
Max files:
</label>
<select
@@ -147,7 +176,8 @@
<span class="flex flex-col gap-1 items-end justify-center">
<!-- Toggle between the showing hidden sessions -->
<!-- qry_hidden = all, not_hidden, hidden -->
<button type="button"
<button
type="button"
onclick={() => {
if ($events_loc.pres_mgmt.qry_hidden == 'all') {
$events_loc.pres_mgmt.qry_hidden = 'not_hidden';
@@ -159,7 +189,8 @@
title="Toggle between showing hidden sessions"
>
<span
class="fas {$events_loc.pres_mgmt.qry_hidden == 'all'
class="fas {$events_loc.pres_mgmt.qry_hidden ==
'all'
? 'fa-toggle-on'
: 'fa-toggle-off'} m-1"
></span>
@@ -179,10 +210,14 @@
<!-- Toggle between the showing disabled sessions -->
<!-- qry_enabled = all, enabled -->
{#if $ae_loc.manager_access}
<button type="button"
<button
type="button"
onclick={() => {
if ($events_loc.pres_mgmt.qry_enabled == 'all') {
$events_loc.pres_mgmt.qry_enabled = 'enabled';
if (
$events_loc.pres_mgmt.qry_enabled == 'all'
) {
$events_loc.pres_mgmt.qry_enabled =
'enabled';
} else {
$events_loc.pres_mgmt.qry_enabled = 'all';
}
@@ -191,7 +226,8 @@
title="Toggle between showing disabled sessions"
>
<span
class="fas {$events_loc.pres_mgmt.qry_enabled == 'all'
class="fas {$events_loc.pres_mgmt.qry_enabled ==
'all'
? 'fa-toggle-on'
: 'fa-toggle-off'} m-1"
></span>
@@ -202,7 +238,8 @@
</span>
{:else}
<span class="grow">
<span class="fas fa-check-circle m-1"></span>
<span class="fas fa-check-circle m-1"
></span>
Show Disabled Sessions?
</span>
{/if}
@@ -213,14 +250,16 @@
{/if}
<div class="flex flex-col flex-wrap gap-1 items-center justify-evenly">
<button type="button"
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.save_search_text =
!$events_loc.pres_mgmt.save_search_text;
}}
class="btn btn-sm justify-between w-full text-center"
class:ae_btn_surface={$events_loc.pres_mgmt.save_search_text}
class:ae_btn_surface_outlined={!$events_loc.pres_mgmt.save_search_text}
class:ae_btn_surface_outlined={!$events_loc.pres_mgmt
.save_search_text}
title="Save the search text for this session search?"
>
{#if $events_loc.pres_mgmt.save_search_text}
@@ -240,7 +279,8 @@
{#if $ae_loc.authenticated_access}
{#if !$events_loc.pres_mgmt.hide__session_msg}
<button type="button"
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.hide__session_msg = true;
}}
@@ -253,7 +293,8 @@
</span>
</button>
{:else}
<button type="button"
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.hide__session_msg = false;
}}
@@ -271,7 +312,8 @@
{#if $ae_loc.authenticated_access}
<!-- Show or hide the session code -->
{#if !$events_loc.pres_mgmt.hide__session_code}
<button type="button"
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.hide__session_code = true;
}}
@@ -284,7 +326,8 @@
</span>
</button>
{:else}
<button type="button"
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.hide__session_code = false;
}}
@@ -304,7 +347,8 @@
{#if $ae_loc.trusted_access}
<div class="flex flex-col gap-1 items-center justify-center">
{#if $events_loc.pres_mgmt.show__copy_access_link}
<button type="button"
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.show__copy_access_link = false;
}}
@@ -314,7 +358,8 @@
Showing Copy Access Link
</button>
{:else}
<button type="button"
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.show__copy_access_link = true;
}}
@@ -326,7 +371,8 @@
{/if}
{#if $events_loc.pres_mgmt.show__email_access_link}
<button type="button"
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.show__email_access_link = false;
}}
@@ -336,7 +382,8 @@
Showing Email Access Link
</button>
{:else}
<button type="button"
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.show__email_access_link = true;
}}
@@ -352,7 +399,8 @@
{#if $ae_loc.authenticated_access}
<div class="flex flex-col gap-1 items-end justify-center">
{#if $events_loc.pres_mgmt.show_content__session_qr}
<button type="button"
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.show_content__session_qr = false;
}}
@@ -366,7 +414,8 @@
</span>
</button>
{:else}
<button type="button"
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.show_content__session_qr = true;
}}
@@ -382,7 +431,8 @@
{/if}
{#if $events_loc.pres_mgmt.show_content__presenter_qr}
<button type="button"
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.show_content__presenter_qr = false;
}}
@@ -396,7 +446,8 @@
</span>
</button>
{:else}
<button type="button"
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.show_content__presenter_qr = true;
}}
@@ -417,7 +468,8 @@
{#if $ae_loc.authenticated_access}
<div class="flex flex-col gap-1 items-center justify-center">
<!-- Show/Hide launcher links (new version) -->
<button type="button"
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.hide__launcher_link =
!$events_loc.pres_mgmt.hide__launcher_link;
@@ -438,7 +490,8 @@
</button>
<!-- Show/Hide launcher links (legacy version) -->
<button type="button"
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.hide__launcher_link_legacy =
!$events_loc.pres_mgmt.hide__launcher_link_legacy;
@@ -446,7 +499,8 @@
class="btn btn-sm ae_btn_surface justify-between w-full text-center"
>
<span
class="fas {$events_loc.pres_mgmt.hide__launcher_link_legacy
class="fas {$events_loc.pres_mgmt
.hide__launcher_link_legacy
? 'fa-toggle-off'
: 'fa-toggle-on'} m-1"
></span>
@@ -459,7 +513,8 @@
</button>
<!-- Show/Hide links to the location (room) -->
<button type="button"
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.hide__location_link =
!$events_loc.pres_mgmt.hide__location_link;
@@ -480,16 +535,19 @@
</button>
<!-- Show/Hide the Location (room) column in tables and lists -->
<button type="button"
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.hide__session_li_location_field =
!$events_loc.pres_mgmt.hide__session_li_location_field;
!$events_loc.pres_mgmt
.hide__session_li_location_field;
}}
class="btn btn-sm ae_btn_surface justify-between w-full text-center"
title="Toggle showing the Location column in session lists and tables"
>
<span
class="fas {$events_loc.pres_mgmt.hide__session_li_location_field
class="fas {$events_loc.pres_mgmt
.hide__session_li_location_field
? 'fa-toggle-off'
: 'fa-toggle-on'} m-1"
></span>
@@ -502,7 +560,8 @@
</button>
<!-- Show/Hide the POC column in tables and lists -->
<button type="button"
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.hide__session_li_poc_field =
!$events_loc.pres_mgmt.hide__session_li_poc_field;
@@ -511,7 +570,8 @@
title="Toggle showing the POC column in session lists and tables"
>
<span
class="fas {$events_loc.pres_mgmt.hide__session_li_poc_field
class="fas {$events_loc.pres_mgmt
.hide__session_li_poc_field
? 'fa-toggle-off'
: 'fa-toggle-on'} m-1"
></span>
@@ -524,9 +584,12 @@
</button>
<!-- These are related to more content showing in lists. -->
<span class="flex flex-col flex-wrap gap-1 items-center justify-evenly">
<span
class="flex flex-col flex-wrap gap-1 items-center justify-evenly"
>
{#if $events_loc.pres_mgmt.show_content__session_files}
<button type="button"
<button
type="button"
disabled={!$ae_loc.manager_access}
onclick={() => {
$events_loc.pres_mgmt.show_content__session_files = false;
@@ -540,7 +603,8 @@
</span>
</button>
{:else}
<button type="button"
<button
type="button"
disabled={!$ae_loc.manager_access}
onclick={() => {
$events_loc.pres_mgmt.show_content__session_files = true;
@@ -556,7 +620,8 @@
{/if}
{#if $events_loc.pres_mgmt.show_content__session_presentations}
<button type="button"
<button
type="button"
disabled={!$ae_loc.manager_access}
onclick={() => {
$events_loc.pres_mgmt.show_content__session_presentations = false;
@@ -570,7 +635,8 @@
</span>
</button>
{:else}
<button type="button"
<button
type="button"
disabled={!$ae_loc.manager_access}
onclick={() => {
$events_loc.pres_mgmt.show_content__session_presentations = true;
@@ -588,10 +654,13 @@
</div>
{/if}
<div class="flex flex-row flex-wrap gap-1 items-center justify-evenly max-w-56">
<div
class="flex flex-row flex-wrap gap-1 items-center justify-evenly max-w-56"
>
{#if $ae_loc?.trusted_access}
{#if $ae_loc?.edit_mode}
<button type="button"
<button
type="button"
onclick={() => {
$ae_loc.edit_mode = false;
}}
@@ -605,7 +674,8 @@
</span>
</button>
{:else}
<button type="button"
<button
type="button"
onclick={() => {
$ae_loc.edit_mode = true;
}}
@@ -621,7 +691,8 @@
{/if}
{#if $ae_loc?.adv_mode}
<button type="button"
<button
type="button"
onclick={() => {
$ae_loc.adv_mode = false;
}}
@@ -635,7 +706,8 @@
</span>
</button>
{:else}
<button type="button"
<button
type="button"
onclick={() => {
$ae_loc.adv_mode = true;
}}