Making the URL update when viewing and closing specific content. Other clean up.
This commit is contained in:
@@ -286,7 +286,7 @@ async function handle_input_upload_files(input_upload_files, task_id) {
|
||||
</span>
|
||||
<!-- <span class="fas fa-save m-1"></span> -->
|
||||
<span class="grow font-bold">
|
||||
{#if $ae_sess.files.processed_file_list.length > 0}
|
||||
{#if $ae_sess.files.processed_file_list?.length > 0}
|
||||
<!-- {#each $ae_sess.files.processed_file_list as file_obj, index}
|
||||
<span class="text-xs">
|
||||
{file_obj.filename}
|
||||
|
||||
@@ -245,7 +245,7 @@ if (browser) {
|
||||
|
||||
<!-- Modal: Archive Content ID media player -->
|
||||
<Modal
|
||||
title="{$lq__archive_content_obj?.name} - {$lq__archive_content_obj?.id}"
|
||||
title="{$lq__archive_content_obj?.name} - {$lq__archive_content_obj?.archive_content_id}"
|
||||
bind:open={$idaa_sess.archives.show__modal_view__archive_content_id}
|
||||
autoclose={false}
|
||||
placement="top-center"
|
||||
@@ -259,7 +259,7 @@ if (browser) {
|
||||
<span class="text-sm text-gray-500">
|
||||
Viewing:
|
||||
</span>
|
||||
{$lq__archive_content_obj?.name}</h3>
|
||||
{$lq__archive_content_obj?.name} - {$lq__archive_content_obj?.archive_content_id}</h3>
|
||||
</div>
|
||||
|
||||
</svelte:fragment>
|
||||
|
||||
@@ -123,7 +123,7 @@ onMount(() => {
|
||||
</a> -->
|
||||
{/if}
|
||||
|
||||
{#if $ae_loc.trusted_access}
|
||||
{#if $ae_loc.trusted_access && $ae_loc.edit_mode}
|
||||
<button
|
||||
disabled={!$ae_loc.trusted_access}
|
||||
on:click={() => {
|
||||
|
||||
@@ -70,7 +70,7 @@ onMount(() => {
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{#if $ae_loc.trusted_access}
|
||||
{#if $ae_loc.trusted_access && $ae_loc.edit_mode}
|
||||
<div class="ae_options">
|
||||
<!-- {#if $ae_loc.trusted_access} -->
|
||||
<button
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher, onMount } from 'svelte';
|
||||
import { fade } from 'svelte/transition';
|
||||
import { onDestroy, onMount } from 'svelte';
|
||||
import { browser } from '$app/environment';
|
||||
|
||||
// import { ae, Element_modal_v3 } from 'aether_npm_lib';
|
||||
import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
|
||||
@@ -8,6 +8,8 @@ import { idaa_loc, idaa_sess, idaa_slct } from '$lib/ae_idaa_stores';
|
||||
|
||||
// export let archive_content_id = null;
|
||||
|
||||
export let lq__archive_content_obj: any;
|
||||
|
||||
let file_icons:any = {}
|
||||
file_icons['ac3'] = 'file-audio';
|
||||
file_icons['aac'] = 'file-audio';
|
||||
@@ -35,17 +37,36 @@ file_icons['xls'] = 'file-excel';
|
||||
file_icons['xlsx'] = 'file-excel';
|
||||
file_icons['zip'] = 'file-archive';
|
||||
|
||||
onMount(() => {
|
||||
$: if (browser && $lq__archive_content_obj?.archive_content_id) {
|
||||
console.log('** Component Mounted: ** Media Player - Archive Content Obj');
|
||||
|
||||
const url = new URL(location);
|
||||
url.searchParams.set('archive_content_id', $lq__archive_content_obj?.archive_content_id);
|
||||
// url.searchParams.set('archive_content_id', $idaa_slct?.archive_content_id);
|
||||
history.pushState({}, '', url);
|
||||
}
|
||||
|
||||
onDestroy(() => {
|
||||
console.log('** Component Destroyed: ** View - Archive Content Obj');
|
||||
|
||||
const url = new URL(location);
|
||||
url.searchParams.delete('archive_content_id');
|
||||
history.pushState({}, '', url);
|
||||
});
|
||||
|
||||
// Reminder: Styling is being done with Tailwind CSS, not Bootstrap.
|
||||
</script>
|
||||
|
||||
<!-- <h3 class="ae_title">Viewing: {$idaa_slct.archive_content_obj.name}</h3> -->
|
||||
<!-- <h3 class="ae_title">Viewing: {$idaa_slct.archive_content_obj.name} - {$lq__archive_content_obj?.archive_content_id}</h3> -->
|
||||
|
||||
<section class="ae_content flex flex-col gap-2 items-center justify-center">
|
||||
{#if file_icons[$idaa_slct.archive_content_obj.file_extension] == 'file-audio'}
|
||||
{#if !$idaa_slct.archive_content_obj.hosted_file_id}
|
||||
<span class="text-center text-lg text-gray-500 bg-yellow-100 p-2 rounded-lg">
|
||||
<span class="fas fa-exclamation-triangle text-warning"></span>
|
||||
No Hosted File Linked
|
||||
<span class="fas fa-exclamation-triangle text-warning"></span>
|
||||
</span>
|
||||
{:else if file_icons[$idaa_slct.archive_content_obj.file_extension] == 'file-audio'}
|
||||
<audio
|
||||
autoplay controls
|
||||
style="max-width: 100%; max-height: 65vh;"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from 'svelte';
|
||||
import { fade } from 'svelte/transition';
|
||||
import { Modal } from 'flowbite-svelte';
|
||||
import { onDestroy } from 'svelte';
|
||||
import { browser } from '$app/environment';
|
||||
|
||||
// *** Import Aether core variables and functions
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
@@ -15,7 +14,6 @@ export let lq__post_obj: any;
|
||||
export let lq__post_comment_obj_li: any;
|
||||
export let lq__post_comment_obj: any;
|
||||
|
||||
// import Edit_post_comment_obj from './10_edit__post_comment_obj.svelte';
|
||||
|
||||
if ($idaa_slct.post_id) {
|
||||
console.log(`Post ID selected: ${$idaa_slct.post_id}`);
|
||||
@@ -24,51 +22,63 @@ if ($idaa_slct.post_id) {
|
||||
$idaa_trigger = 'load__post_obj';
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
$: if (browser && $lq__post_obj?.post_id) {
|
||||
console.log('** Component Mounted: ** View - Post Obj');
|
||||
|
||||
const url = new URL(location);
|
||||
url.searchParams.set('post_id', $lq__post_obj?.post_id);
|
||||
history.pushState({}, '', url);
|
||||
}
|
||||
|
||||
onDestroy(() => {
|
||||
console.log('** Component Destroyed: ** View - Post Obj');
|
||||
|
||||
const url = new URL(location);
|
||||
url.searchParams.delete('post_id');
|
||||
history.pushState({}, '', url);
|
||||
});
|
||||
|
||||
function handle_post_comment_obj_created(event) {
|
||||
console.log('*** handle_post_comment_obj_created() ***');
|
||||
console.log(event.detail);
|
||||
// function handle_post_comment_obj_created(event) {
|
||||
// console.log('*** handle_post_comment_obj_created() ***');
|
||||
// console.log(event.detail);
|
||||
|
||||
$idaa_slct.post_comment_id = null;
|
||||
$idaa_slct.post_comment_obj = {};
|
||||
// $idaa_slct.post_comment_id = null;
|
||||
// $idaa_slct.post_comment_obj = {};
|
||||
|
||||
$idaa_trigger = 'load__post_obj_li';
|
||||
$idaa_trigger = 'load__post_obj';
|
||||
$idaa_trigger = 'load__post_comment_obj_li';
|
||||
// $idaa_trigger = 'load__post_obj_li';
|
||||
// $idaa_trigger = 'load__post_obj';
|
||||
// $idaa_trigger = 'load__post_comment_obj_li';
|
||||
|
||||
// $idaa_sess.bb.show_post_list = false;
|
||||
// $idaa_sess.bb.show_edit__post_id = false;
|
||||
// $idaa_sess.bb.show_view__post_id = true;
|
||||
$idaa_sess.bb.show_edit__post_comment = false;
|
||||
}
|
||||
function handle_post_comment_obj_updated(event) {
|
||||
console.log('*** handle_post_comment_obj_updated() ***');
|
||||
console.log(event.detail);
|
||||
// // $idaa_sess.bb.show_post_list = false;
|
||||
// // $idaa_sess.bb.show_edit__post_id = false;
|
||||
// // $idaa_sess.bb.show_view__post_id = true;
|
||||
// $idaa_sess.bb.show_edit__post_comment = false;
|
||||
// }
|
||||
// function handle_post_comment_obj_updated(event) {
|
||||
// console.log('*** handle_post_comment_obj_updated() ***');
|
||||
// console.log(event.detail);
|
||||
|
||||
$idaa_trigger = 'load__post_obj';
|
||||
$idaa_trigger = 'load__post_comment_obj_li';
|
||||
// $idaa_trigger = 'load__post_obj';
|
||||
// $idaa_trigger = 'load__post_comment_obj_li';
|
||||
|
||||
// $idaa_sess.bb.show_post_list = false;
|
||||
// $idaa_sess.bb.show_edit__post_id = false;
|
||||
// $idaa_sess.bb.show_view__post_id = true;
|
||||
$idaa_sess.bb.show_edit__post_comment = false;
|
||||
}
|
||||
function handle_post_comment_obj_deleted(event) {
|
||||
console.log('*** handle_post_comment_obj_deleted() ***');
|
||||
console.log(event.detail);
|
||||
// // $idaa_sess.bb.show_post_list = false;
|
||||
// // $idaa_sess.bb.show_edit__post_id = false;
|
||||
// // $idaa_sess.bb.show_view__post_id = true;
|
||||
// $idaa_sess.bb.show_edit__post_comment = false;
|
||||
// }
|
||||
// function handle_post_comment_obj_deleted(event) {
|
||||
// console.log('*** handle_post_comment_obj_deleted() ***');
|
||||
// console.log(event.detail);
|
||||
|
||||
$idaa_trigger = 'load__post_obj_li';
|
||||
$idaa_trigger = 'load__post_obj';
|
||||
$idaa_trigger = 'load__post_comment_obj_li';
|
||||
// $idaa_trigger = 'load__post_obj_li';
|
||||
// $idaa_trigger = 'load__post_obj';
|
||||
// $idaa_trigger = 'load__post_comment_obj_li';
|
||||
|
||||
// $idaa_sess.bb.show_post_list = false;
|
||||
// $idaa_sess.bb.show_edit__post_id = false;
|
||||
// $idaa_sess.bb.show_view__post_id = true;
|
||||
$idaa_sess.bb.show_edit__post_comment = false;
|
||||
}
|
||||
// // $idaa_sess.bb.show_post_list = false;
|
||||
// // $idaa_sess.bb.show_edit__post_id = false;
|
||||
// // $idaa_sess.bb.show_view__post_id = true;
|
||||
// $idaa_sess.bb.show_edit__post_comment = false;
|
||||
// }
|
||||
</script>
|
||||
|
||||
|
||||
@@ -134,6 +144,7 @@ function handle_post_comment_obj_deleted(event) {
|
||||
<span class="fas fa-comment"></span> {($idaa_slct.post_obj.post_comment_count == 1 ? `${$idaa_slct.post_obj.post_comment_count} comment` : `${$idaa_slct.post_obj.post_comment_count} comments` )}
|
||||
</span>
|
||||
{/if}
|
||||
{#if ($ae_loc.trusted_access && $ae_loc.edit_mode) || $idaa_loc.novi_uuid}
|
||||
<button
|
||||
on:click={() => {
|
||||
if (confirm('Are you sure you want to add a new comment?')) {
|
||||
@@ -145,8 +156,9 @@ function handle_post_comment_obj_deleted(event) {
|
||||
>
|
||||
<span class="fas fa-plus m-1"></span> New Comment
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
{#if $ae_loc.trusted_access || $idaa_slct.post_obj.external_person_id === $idaa_loc.novi_uuid}
|
||||
{#if ($ae_loc.trusted_access && $ae_loc.edit_mode) || $idaa_slct.post_obj.external_person_id === $idaa_loc.novi_uuid}
|
||||
<button
|
||||
on:click={() => {
|
||||
// $idaa_slct.post_id = $idaa_slct.post_obj.post_id_random;
|
||||
@@ -172,8 +184,6 @@ function handle_post_comment_obj_deleted(event) {
|
||||
{/if}
|
||||
|
||||
|
||||
|
||||
|
||||
{#if $lq__post_comment_obj_li?.length}
|
||||
<section class="post_comment_obj_li space-y-2 border border-1 rounded p-2 border-y-4">
|
||||
{#each $lq__post_comment_obj_li as post_comment_obj, index}
|
||||
@@ -213,7 +223,7 @@ function handle_post_comment_obj_deleted(event) {
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{#if $ae_loc.trusted_access || post_comment_obj.external_person_id === $idaa_loc.novi_uuid}
|
||||
{#if ($ae_loc.trusted_access && $ae_loc.edit_mode) || post_comment_obj.external_person_id === $idaa_loc.novi_uuid}
|
||||
<div class="ae_options">
|
||||
<button on:click={() => {
|
||||
$idaa_slct.post_comment_id = post_comment_obj.post_comment_id;
|
||||
|
||||
@@ -68,7 +68,7 @@ onMount(() => {
|
||||
{/if}
|
||||
</button>
|
||||
|
||||
{#if $ae_loc.trusted_access || idaa_post_obj.external_person_id === $idaa_loc.novi_uuid}
|
||||
{#if ($ae_loc.trusted_access && $ae_loc.edit_mode) || idaa_post_obj.external_person_id === $idaa_loc.novi_uuid}
|
||||
<button
|
||||
on:click={() => {
|
||||
$idaa_slct.post_id = idaa_post_obj.post_id;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher, onMount } from 'svelte';
|
||||
import { onDestroy } from 'svelte';
|
||||
import { browser } from '$app/environment';
|
||||
// import { fade } from 'svelte/transition';
|
||||
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
@@ -8,8 +9,6 @@ import { idaa_loc, idaa_sess, idaa_slct } from '$lib/ae_idaa_stores';
|
||||
|
||||
export let lq__event_obj: any;
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
if ($idaa_slct.event_id) {
|
||||
console.log(`Event ID selected: ${$idaa_slct.event_id}`);
|
||||
console.log(`Event Object selected: ${$lq__event_obj}`)
|
||||
@@ -17,8 +16,18 @@ if ($idaa_slct.event_id) {
|
||||
$slct_trigger = 'load__event_obj';
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
console.log('** Component Mounted: ** View - Event Obj');
|
||||
$: if (browser && $lq__event_obj?.event_id) {
|
||||
const url = new URL(location);
|
||||
url.searchParams.set('event_id', $lq__event_obj?.event_id);
|
||||
history.pushState({}, '', url);
|
||||
}
|
||||
|
||||
onDestroy(() => {
|
||||
console.log('** Component Destroyed: ** View - Event Obj');
|
||||
|
||||
const url = new URL(location);
|
||||
url.searchParams.delete('event_id');
|
||||
history.pushState({}, '', url);
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ onMount(() => {
|
||||
</button>
|
||||
|
||||
<!-- This checks if the currently logged in Novi user has a matching UUID or email address. -->
|
||||
{#if $ae_loc.trusted_access || idaa_event_obj?.external_person_id === $idaa_loc.novi_uuid || idaa_event_obj?.contact_li_json[0].email === $idaa_loc.novi_email}
|
||||
{#if ($ae_loc.trusted_access && $ae_loc.edit_mode) || idaa_event_obj?.external_person_id === $idaa_loc.novi_uuid || idaa_event_obj?.contact_li_json[0].email === $idaa_loc.novi_email}
|
||||
<button
|
||||
on:click={() => {
|
||||
$idaa_slct.event_id = idaa_event_obj?.event_id;
|
||||
|
||||
@@ -439,8 +439,12 @@ async function handle_qry__event(
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
{#if ($ae_loc.trusted_access && $ae_loc.edit_mode) || $idaa_loc.novi_uuid}
|
||||
<button
|
||||
on:click={() => {
|
||||
if (!confirm('Create new meeting?')) {
|
||||
return false;
|
||||
}
|
||||
$slct.event_id = null;
|
||||
$slct.event_obj = {};
|
||||
|
||||
@@ -453,11 +457,12 @@ async function handle_qry__event(
|
||||
$idaa_loc.recovery_meetings.show_view__event_obj = false;
|
||||
$idaa_loc.recovery_meetings.show_edit__event_obj = true;
|
||||
}}
|
||||
class="btn_new_recovery_meeting ae_btn btn btn-secondary btn-sm variant-filled-warning"
|
||||
class="btn_new_recovery_meeting btn btn-sm variant-ghost-warning hover:variant-filled-warning transition text-xs"
|
||||
disabled={true}
|
||||
>
|
||||
<span class="fas fa-plus m-1"></span> Create new Meeting
|
||||
<span class="fas fa-plus m-1"></span> Create New Meeting
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
{#if $ae_loc.trusted_access}
|
||||
<button
|
||||
@@ -480,7 +485,7 @@ async function handle_qry__event(
|
||||
});
|
||||
|
||||
}}
|
||||
class="btn btn-sm variant-ghost-warning w-42 mb-1 export_data_btn text-xs"
|
||||
class="btn btn-sm variant-ghost-warning hover:variant-filled-warning transition w-42 mb-1 export_data_btn text-xs"
|
||||
title={`Download sponsorship data for ${$ae_loc.account_name}`}
|
||||
>
|
||||
{#await ae_promises.download__events_export}
|
||||
|
||||
Reference in New Issue
Block a user