feat(hosted-files): introduce direct download mode and automate filename shortening

- Add 'show_direct_download' prop to support native browser downloads via V3 Action paths (/v3/action/...).
- Integrate 'shorten_filename' logic directly into the component via 'max_filename' prop.
- Refactor internal UI to snippets for consistent rendering across button and anchor modes.
- Update 'ae_HostedFile' type with new SQL view fields: 'filename_no_ext' and 'filename_w_ext'.
- Add direct download toggle and edit mode indicator to testing dashboard.
- Simplify 'ae_comp__event_file_obj_tbl' by removing manual snippets in favor of standardized component logic.
This commit is contained in:
Scott Idem
2026-02-03 15:20:32 -05:00
parent 671247e783
commit 6634c9aef0
4 changed files with 168 additions and 119 deletions

View File

@@ -375,24 +375,11 @@
<AE_Comp_Hosted_Files_Download_Button
hosted_file_id={event_file_obj?.hosted_file_id}
hosted_file_obj={event_file_obj}
show_divider={true}
show_direct_download={show_direct_download}
max_filename={50}
classes="btn btn-sm preset-tonal-primary hover:preset-filled-primary-500 min-w-72"
>
{#snippet label()}
<span class="grow">
{ae_util.shorten_filename({
filename: event_file_obj?.filename,
max_length: 30
})}
</span>
<span
class="badge preset-filled-success-600-400 hover:preset-filled-success-700-300 text-xs"
class:hidden={!event_file_obj?.file_purpose}
>
{event_file_obj?.file_purpose}
</span>
{/snippet}
</AE_Comp_Hosted_Files_Download_Button>
/>
<!-- {event_file_obj?.filename} -->
</td>
<td