Lots of code clean up. Finally working on the Launcher piece again.
This commit is contained in:
@@ -1,39 +1,52 @@
|
||||
<script lang="ts">
|
||||
interface Props {
|
||||
data_url: any;
|
||||
lq__event_obj: any;
|
||||
lq__location_event_file_obj_li: any;
|
||||
// lq__event_location_obj: any;
|
||||
// export let lq__event_location_obj_li: any;
|
||||
lq__event_location_obj_li: any;
|
||||
// lq__event_session_obj: any;
|
||||
// export let lq__event_session_obj_li: any;
|
||||
lq__event_session_obj_li: any;
|
||||
log_lvl?: number;
|
||||
}
|
||||
|
||||
// import { tick } from 'svelte';
|
||||
let {
|
||||
data_url,
|
||||
lq__event_obj,
|
||||
lq__location_event_file_obj_li,
|
||||
// lq__event_location_obj,
|
||||
lq__event_location_obj_li,
|
||||
// lq__event_session_obj,
|
||||
lq__event_session_obj_li,
|
||||
log_lvl = $bindable(0),
|
||||
}: Props = $props();
|
||||
|
||||
// *** Import Svelte specific
|
||||
import { goto } from '$app/navigation';
|
||||
|
||||
import type { key_val } from '$lib/ae_stores';
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
// import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
import { api } from '$lib/api';
|
||||
import Element_ae_crud from '$lib/element_ae_crud.svelte';
|
||||
import Element_data_store from '$lib/element_data_store_v2.svelte';
|
||||
// import Element_ae_crud from '$lib/element_ae_crud.svelte';
|
||||
// import Element_data_store from '$lib/element_data_store_v2.svelte';
|
||||
|
||||
import { liveQuery } from "dexie";
|
||||
// import { liveQuery } from "dexie";
|
||||
// import { core_func } from '$lib/ae_core_functions';
|
||||
// import { db_core } from "$lib/db_core";
|
||||
import { ae_snip, 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 { 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';
|
||||
|
||||
import Menu_session_list_menu from './menu_session_list.svelte';
|
||||
|
||||
export let data_url: any;
|
||||
|
||||
let slct_event_location_id: string = $events_slct.event_location_id;
|
||||
let slct_event_location_id: string = $state($events_slct.event_location_id);
|
||||
|
||||
$events_trigger = null;
|
||||
|
||||
export let lq__event_obj: any;
|
||||
export let lq__location_event_file_obj_li: any;
|
||||
export let lq__event_location_obj: any;
|
||||
// export let lq__event_location_obj_li: any;
|
||||
export let lq__event_location_obj_li: any;
|
||||
export let lq__event_session_obj: any;
|
||||
// export let lq__event_session_obj_li: any;
|
||||
export let lq__event_session_obj_li: any;
|
||||
|
||||
|
||||
let qry__enabled = 'enabled';
|
||||
let qry__hidden = 'not_hidden';
|
||||
@@ -48,9 +61,9 @@ if ($ae_loc.administrator_access) {
|
||||
qry__hidden = 'not_hidden';
|
||||
}
|
||||
|
||||
let ae_promises: key_val = {
|
||||
let ae_promises: key_val = $state({
|
||||
get_li__event_file: null,
|
||||
};
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@@ -60,7 +73,7 @@ let ae_promises: key_val = {
|
||||
<h2 class="">{$lq__event_obj?.cfg_json.short_name ?? 'loading...'}</h2>
|
||||
|
||||
<button
|
||||
on:click={() => {
|
||||
onclick={() => {
|
||||
$events_loc.launcher.show_content__hidden_files = !$events_loc.launcher.show_content__hidden_files;
|
||||
}}
|
||||
class="btn btn-sm preset-tonal-warning border border-warning-500 hover:preset-filled-primary-500 text-xs py-1 px-2"
|
||||
@@ -75,7 +88,7 @@ let ae_promises: key_val = {
|
||||
|
||||
</button>
|
||||
<button
|
||||
on:click={() => {
|
||||
onclick={() => {
|
||||
$events_loc.launcher.show_content__hidden_sessions = !$events_loc.launcher.show_content__hidden_sessions;
|
||||
}}
|
||||
class="btn btn-sm preset-tonal-warning border border-warning-500 hover:preset-filled-primary-500 text-xs py-1 px-2"
|
||||
@@ -105,7 +118,7 @@ let ae_promises: key_val = {
|
||||
<select
|
||||
class="select text-xs p-1"
|
||||
bind:value={slct_event_location_id}
|
||||
on:change={async () => {
|
||||
onchange={async () => {
|
||||
// console.log(`slct_event_location_id:`, slct_event_location_id);
|
||||
|
||||
console.log('Remove fields from the URL.');
|
||||
@@ -150,7 +163,9 @@ let ae_promises: key_val = {
|
||||
for_obj_id: $events_slct.event_location_id,
|
||||
inc_file_li: false,
|
||||
inc_presentation_li: false,
|
||||
params: {qry__enabled: 'enabled', qry__hidden: 'all', qry__limit: 100},
|
||||
enabled: 'enabled',
|
||||
hidden: 'all',
|
||||
limit: 49,
|
||||
try_cache: true,
|
||||
log_lvl: 1,
|
||||
})
|
||||
@@ -245,7 +260,7 @@ let ae_promises: key_val = {
|
||||
{#each $lq__location_event_file_obj_li as event_file_obj, index}
|
||||
<button
|
||||
disabled={!$ae_loc.trusted_access}
|
||||
on:click={() => {
|
||||
onclick={() => {
|
||||
// ae_promises[event_file_obj.event_file_id_random]
|
||||
ae_promises[event_file_obj?.event_file_id_random] = api.download_hosted_file({
|
||||
api_cfg: $ae_api,
|
||||
|
||||
Reference in New Issue
Block a user