Lot of updates to Svelte 5 syntax
This commit is contained in:
@@ -1,5 +1,25 @@
|
||||
<script lang="ts">
|
||||
export let log_lvl: number = 0;
|
||||
interface Props {
|
||||
log_lvl?: number;
|
||||
// import { events_func } from '$lib/ae_events_functions';
|
||||
container_class_li?: string|Array<string>;
|
||||
link_to_type: string;
|
||||
link_to_id: string;
|
||||
allow_basic?: boolean;
|
||||
allow_moderator?: boolean;
|
||||
display_mode?: string; // 'default', 'compact', 'minimal', 'launcher'
|
||||
}
|
||||
|
||||
let {
|
||||
log_lvl = 0,
|
||||
container_class_li = [],
|
||||
link_to_type,
|
||||
link_to_id,
|
||||
allow_basic = false,
|
||||
allow_moderator = false,
|
||||
display_mode = 'default'
|
||||
}: Props = $props();
|
||||
|
||||
import { liveQuery } from "dexie";
|
||||
|
||||
import type { key_val } from '$lib/ae_stores';
|
||||
@@ -13,14 +33,7 @@ import Element_manage_event_file_li from '$lib/element_manage_event_file_li.svel
|
||||
// import { ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
|
||||
import { db_events } from "$lib/ae_events/db_events";
|
||||
// import { events_loc, events_sess, events_slct, events_trigger } from '$lib/ae_events_stores';
|
||||
// import { events_func } from '$lib/ae_events_functions';
|
||||
|
||||
export let container_class_li: string|Array<string> = [];
|
||||
export let link_to_type: string;
|
||||
export let link_to_id: string;
|
||||
export let allow_basic: boolean = false;
|
||||
export let allow_moderator: boolean = false;
|
||||
export let display_mode: string = 'default'; // 'default', 'compact', 'minimal', 'launcher'
|
||||
// export let show_convert_btn: null|boolean = null;
|
||||
|
||||
// let ae_promises: key_val = {};
|
||||
@@ -35,7 +48,7 @@ let dq__where_for_id_eq_val: string = link_to_id;
|
||||
|
||||
// This should only include files that are directly linked to an object (event, location, session, presenter, etc.).
|
||||
// I am not sure why, but doing reverse() and then sortBy() seems to sort in descending order.
|
||||
$: lq__event_file_obj_li = liveQuery(async () => {
|
||||
let lq__event_file_obj_li = $derived(liveQuery(async () => {
|
||||
let results = await db_events.files
|
||||
.where(dq__where_val)
|
||||
.equals(dq__where_eq_val)
|
||||
@@ -45,7 +58,7 @@ $: lq__event_file_obj_li = liveQuery(async () => {
|
||||
// .toArray()
|
||||
;
|
||||
return results;
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user