General improvement for archive content creation. Better show/hide for enable and hide fields. Novi and iframe related updates.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
/** @type {import('./$types').PageData} */
|
||||
export let data: any;
|
||||
let log_lvl = 1;
|
||||
let log_lvl = 0;
|
||||
|
||||
// Imports
|
||||
import { Modal } from 'flowbite-svelte';
|
||||
@@ -19,7 +19,7 @@ import { liveQuery } from "dexie";
|
||||
import { core_func } from '$lib/ae_core/ae_core_functions';
|
||||
import { db_archives } from "$lib/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_trigger } from '$lib/ae_idaa_stores';
|
||||
import { idaa_loc, idaa_sess, idaa_slct, idaa_trig, idaa_prom } from '$lib/ae_idaa_stores';
|
||||
import { archives_func } from '$lib/ae_archives/ae_archives_functions';
|
||||
|
||||
import Archive_obj_id_edit from './ae_idaa_comp__archive_obj_id_edit.svelte';
|
||||
@@ -89,6 +89,50 @@ $: lq__archive_content_obj = liveQuery(async () => {
|
||||
});
|
||||
|
||||
|
||||
$: if ($idaa_trig.archive_content_li) {
|
||||
$idaa_trig.archive_content_li = false;
|
||||
|
||||
if (log_lvl) {
|
||||
console.log(`Triggered: $idaa_trig.archive_content_li`);
|
||||
}
|
||||
|
||||
if ($idaa_loc.archives.qry__enabled !== 'all' || $idaa_loc.archives.qry__hidden !== 'all') {
|
||||
console.log(`Deleting disabled or hidden archive content.`);
|
||||
// let results = db_archives.content
|
||||
// .where('enable')
|
||||
// .notEqual(true)
|
||||
// .delete();
|
||||
let results = db_archives.content
|
||||
.clear();
|
||||
console.log(`Deleted ${results} disabled archive content.`);
|
||||
|
||||
}
|
||||
// if ($idaa_loc.archives.qry__hidden !== 'all') {
|
||||
// console.log(`Deleting hidden archive content.`);
|
||||
// let results = db_archives.content
|
||||
// .clear();
|
||||
// console.log(`Deleted ${results} hidden archive content.`);
|
||||
|
||||
// }
|
||||
// let results = db_archives.content
|
||||
// .where('enable')
|
||||
// .equals('false')
|
||||
// .delete();
|
||||
// console.log(`Deleted ${results} disabled archive content.`);
|
||||
|
||||
$idaa_prom.load__archive_content_obj_li = archives_func.load_ae_obj_li__archive_content({
|
||||
api_cfg: $ae_api,
|
||||
for_obj_type: 'archive',
|
||||
for_obj_id: $idaa_slct.archive_id,
|
||||
enabled: $idaa_loc.archives.qry__enabled,
|
||||
hidden: $idaa_loc.archives.qry__hidden,
|
||||
limit: $idaa_loc.archives.qry__limit,
|
||||
order_by_li: $idaa_loc.archives.qry__order_by_li,
|
||||
try_cache: true,
|
||||
log_lvl: log_lvl,
|
||||
});
|
||||
}
|
||||
|
||||
if (browser) {
|
||||
console.log('Browser environment detected.');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user