Improvements and other minor fixes. Wrapping up for the night.

This commit is contained in:
Scott Idem
2025-07-10 21:10:06 -04:00
parent 1e35681116
commit 6e4649882c
7 changed files with 37 additions and 9 deletions

View File

@@ -52,15 +52,16 @@ if (browser) {
// The archive_id should not already be set while the page is loading if we are looking at this page?
// let message = {'archive_id': $idaa_slct?.archive_id ?? null};
$idaa_slct.archive_id = null;
let message = {'archive_id': $idaa_slct.archive_id};
$idaa_slct.archive_content_id = null;
let message = {'archive_id': $idaa_slct.archive_id, 'archive_content_id': $idaa_slct.archive_content_id};
window.parent.postMessage(message, "*");
add_activity_log(
{
action: 'idaa_archives_page',
action_with: 'browser',
}
);
// add_activity_log(
// {
// action: 'idaa_archives_page',
// action_with: 'browser',
// }
// );
}
function add_activity_log(

View File

@@ -466,9 +466,12 @@ onDestroy(() => {
{/snippet} -->
<!-- Showing and hiding a modal like this seems to cause an issue with where it is rendered on the page. The <Modal> should be moved back here and the actual "player" left mostly separate. 2025-07-10 -->
<!-- {#if $idaa_slct.archive_content_id} -->
<Modal_media_player
lq__archive_content_obj={lq__archive_content_obj}
/>
<!-- {/if} -->
<!-- </Modal> -->
<!-- {/if} -->

View File

@@ -63,7 +63,7 @@ let ae_promises: key_val = $state({});
{#if $idaa_sess.archives.show_list__archive_content_li_group == idaa_archive_content_obj.group}
<div
class="container archive archive_content_obj border border p-2 mb-2 space-y-2 w-full max-w-(--breakpoint-lg) flex flex-col items-center justify-center bg-white rounded-lg"
class="container archive archive_content_obj border p-2 mb-2 space-y-2 w-full max-w-(--breakpoint-lg) flex flex-col items-center justify-center bg-white rounded-lg"
class:dim={idaa_archive_content_obj.hide}
class:bg-warning-100={!idaa_archive_content_obj?.enable}
>

View File

@@ -2,7 +2,7 @@
/** @type {import('./$types').PageData} */
// *** Import Svelte specific
// import { onDestroy, onMount } from 'svelte';
import { onDestroy, onMount } from 'svelte';
// import { browser } from '$app/environment';
// *** Import other supporting libraries
@@ -25,6 +25,12 @@ if (log_lvl) {
console.log(`lq__archive_content_obj:`, lq__archive_content_obj);
}
onDestroy(() => {
// This does not always seem to be triggered???
$idaa_slct.archive_content_id = null;
let message = {'archive_content_id': null};
window.parent.postMessage(message, "*");
});
</script>
@@ -56,6 +62,10 @@ if (log_lvl) {
class="btn btn-sm btn-secondary absolute top-2 right-2"
onclick={() => {
$idaa_sess.archives.show__modal_view__archive_content_id = false;
$idaa_slct.archive_content_id = null;
let message = {'archive_content_id': null};
window.parent.postMessage(message, "*");
}}
>
<span class="fas fa-times"></span>
@@ -73,6 +83,10 @@ if (log_lvl) {
class="btn btn-sm btn-secondary"
onclick={() => {
$idaa_sess.archives.show__modal_view__archive_content_id = false;
$idaa_slct.archive_content_id = null;
let message = {'archive_content_id': null};
window.parent.postMessage(message, "*");
}}
>
<span class="fas fa-times"></span>

View File

@@ -48,6 +48,7 @@ if (browser) {
}
if ($idaa_loc.bb.edit__post_obj) {
obj_changed = true; // This is an odd workaround to make new posts saveable.
$idaa_sess.bb.edit__post_obj = $idaa_loc.bb.edit__post_obj;
$idaa_loc.bb.edit__post_obj = false;
}

View File

@@ -141,6 +141,8 @@ if (log_lvl) console.log('** Component Loaded: ** Post Options');
return false;
}
$idaa_slct.post_obj = {};
let data_kv = {
external_person_id: $idaa_loc.novi_uuid,
title: 'Change Me',
@@ -161,6 +163,9 @@ if (log_lvl) console.log('** Component Loaded: ** Post Options');
console.log('New post created:', results);
}
$idaa_slct.post_id = results?.post_id_random;
$idaa_slct.post_obj = {
...results
};
$idaa_sess.bb.edit__post_obj = $idaa_slct.post_id;
$idaa_loc.bb.edit__post_obj = $idaa_slct.post_id;
// if (!$idaa_loc.bb.edit_kv) {

View File

@@ -44,6 +44,10 @@ import Comp__event_obj_li_wrapper from './ae_idaa_comp__event_obj_li_wrapper.sve
// }
if (browser) {
$idaa_slct.event_id = null; // Just in case
let message = {'event_id': null};
window.parent.postMessage(message, "*");
$idaa_trig.event_li_qry = true;
// $idaa_trig = 'load__event_obj_li';
}