Starting to switch pages to Runes mode....
This commit is contained in:
@@ -1,27 +1,36 @@
|
||||
<script lang="ts">
|
||||
/** @type {import('./$types').PageData} */
|
||||
export let data: any;
|
||||
let log_lvl = 1;
|
||||
// console.log(`ae_idaa_bb +page.svelte data:`, data);
|
||||
let log_lvl: number = 0;
|
||||
|
||||
// *** Import Svelte specific
|
||||
import { browser } from '$app/environment';
|
||||
// import { Modal } from 'flowbite-svelte';
|
||||
|
||||
import { Modal } from 'flowbite-svelte';
|
||||
|
||||
import type { key_val } from '$lib/ae_stores';
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
|
||||
// *** Import other supporting libraries
|
||||
import { liveQuery } from "dexie";
|
||||
import { core_func } from '$lib/ae_core/ae_core_functions';
|
||||
|
||||
// *** Import Aether specific variables and functions
|
||||
// import type { key_val } from '$lib/ae_stores';
|
||||
// import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
// import { core_func } from '$lib/ae_core/ae_core_functions';
|
||||
import { db_archives } from "$lib/ae_archives/db_archives";
|
||||
import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
|
||||
import { idaa_loc, idaa_sess, idaa_slct, idaa_trig } from '$lib/ae_idaa_stores';
|
||||
import { archives_func } from '$lib/ae_archives/ae_archives_functions';
|
||||
// import { archives_func } from '$lib/ae_archives/ae_archives_functions';
|
||||
|
||||
import Comp__archive_obj_li from './ae_idaa_comp__archive_obj_li.svelte';
|
||||
|
||||
interface Props {
|
||||
/** @type {import('./$types').PageData} */
|
||||
data: any;
|
||||
}
|
||||
let { data }: Props = $props();
|
||||
|
||||
$: lq__archive_obj_li = liveQuery(async () => {
|
||||
if (log_lvl) {
|
||||
console.log(`ae_idaa_bb +page.svelte data:`, data);
|
||||
}
|
||||
|
||||
let lq__archive_obj_li = $derived(liveQuery(async () => {
|
||||
let results = await db_archives.archive
|
||||
.where('account_id')
|
||||
.equals($slct.account_id)
|
||||
@@ -35,33 +44,7 @@ $: lq__archive_obj_li = liveQuery(async () => {
|
||||
// .sortBy('[created_on+updated_on]');
|
||||
|
||||
return results;
|
||||
});
|
||||
|
||||
// $: lq__archive_obj = liveQuery(async () => {
|
||||
// let results = await db_archives.archive
|
||||
// .get($idaa_slct.archive_id);
|
||||
|
||||
// return results;
|
||||
// });
|
||||
|
||||
// $: lq__archive_content_obj_li = liveQuery(async () => {
|
||||
// let results = await db_archives.content
|
||||
// .where('archive_id')
|
||||
// .equals($idaa_slct.archive_id)
|
||||
// .reverse()
|
||||
// .sortBy('updated_on');
|
||||
// // .sortBy('title');
|
||||
|
||||
// return results;
|
||||
// });
|
||||
|
||||
// $: lq__archive_content_obj = liveQuery(async () => {
|
||||
// let results = await db_archives.content
|
||||
// .get($idaa_slct.archive_content_id);
|
||||
|
||||
// return results;
|
||||
// });
|
||||
|
||||
}));
|
||||
|
||||
if (browser) {
|
||||
console.log('Browser environment detected.');
|
||||
@@ -72,7 +55,6 @@ if (browser) {
|
||||
let message = {'archive_id': $idaa_slct.archive_id};
|
||||
window.parent.postMessage(message, "*");
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@@ -98,7 +80,7 @@ if (browser) {
|
||||
|
||||
<!-- <h1>Archives {$lq__archive_obj_li?.length}</h1> -->
|
||||
|
||||
{#if $lq__archive_obj_li && $lq__archive_obj_li?.length }
|
||||
{#if $lq__archive_obj_li && $lq__archive_obj_li?.length}
|
||||
<Comp__archive_obj_li
|
||||
lq__archive_obj_li={lq__archive_obj_li}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user