Now with a better download file container thing. Can change open with OS.

This commit is contained in:
Scott Idem
2024-10-07 18:30:09 -04:00
parent 03e6117024
commit c3f4832f48
5 changed files with 318 additions and 63 deletions

View File

@@ -22,13 +22,15 @@ let ae_promises: key_val = {
};
// Event File
let lq__event_file_obj_li = liveQuery(
() => db_events.files
$: lq__event_file_obj_li = liveQuery(async () => {
let results = await db_events.files
// .where('event_session_id_random')
.where('for_id_random')
.equals(lq__event_presenter_obj?.event_presenter_id)
.sortBy('name')
);
.reverse()
.sortBy('created_on')
return results;
});
</script>
@@ -67,10 +69,10 @@ let lq__event_file_obj_li = liveQuery(
<ul class="space-y-1">
{#each $lq__event_file_obj_li as event_file_obj, index}
<li
class="flex flex-row justify-center gap-1"
class="flex flex-col md:flex-row wrap gap justify-center"
class:hidden={!$events_loc.launcher.show_content__hidden_files && event_file_obj.hide}
>
<button
<!-- <button
disabled={!$ae_loc.trusted_access}
on:click={() => {
// ae_promises[event_file_obj.event_file_id_random]
@@ -98,11 +100,7 @@ let lq__event_file_obj_li = liveQuery(
:
</span>
{:then}
<!-- <span class="fas fa-download mx-1"></span> -->
<span class="fas fa-{ae_util.file_extension_icon(event_file_obj.extension)}"></span>
<!-- <span class="text-sm">
Download:
</span> -->
{/await}
<span class="grow">
@@ -115,7 +113,7 @@ let lq__event_file_obj_li = liveQuery(
>
{event_file_obj.file_purpose}
</span>
</button>
</button> -->
<Event_launcher_file_cont
event_file_obj={event_file_obj}