More pages updated to Runes mode
This commit is contained in:
@@ -133,7 +133,7 @@ onMount(() => {
|
||||
TableCell,
|
||||
ImageExtension
|
||||
],
|
||||
autofocus: true,
|
||||
autofocus: false, // This should be changed to a prop in the future
|
||||
onTransaction: (transaction) => {
|
||||
/**
|
||||
* Weird behavior of editor.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
/** @type {import('./$types').LayoutData} */
|
||||
let log_lvl: number = 0;
|
||||
let log_lvl: number = 1;
|
||||
|
||||
// *** Import Svelte specific
|
||||
import '../app.postcss';
|
||||
@@ -38,11 +38,6 @@ hljs.registerLanguage('javascript', javascript);
|
||||
hljs.registerLanguage('typescript', typescript);
|
||||
storeHighlightJs.set(hljs);
|
||||
|
||||
// Floating UI for Popups
|
||||
// import { computePosition, autoUpdate, flip, shift, offset, arrow } from '@floating-ui/dom';
|
||||
// import { storePopup } from '@skeletonlabs/skeleton';
|
||||
// storePopup.set({ computePosition, autoUpdate, flip, shift, offset, arrow });
|
||||
|
||||
// *** Import Aether specific variables and functions
|
||||
import Analytics from '$lib/analytics.svelte'
|
||||
// import { api } from '$lib/api';
|
||||
|
||||
@@ -29,41 +29,13 @@ $events_loc.qry__hidden = 'not_hidden';
|
||||
$events_loc.qry__limit = 15;
|
||||
$events_loc.qry__offset = 0;
|
||||
|
||||
// Quickly save the data passed from the parent(s) to the Svelte stores, localStorage, and other.
|
||||
$slct.account_id = data.account_id;
|
||||
if (log_lvl) {
|
||||
console.log(`$slct.account_id = `, $slct.account_id);
|
||||
}
|
||||
let ae_acct = data[$slct.account_id];
|
||||
if (log_lvl) {
|
||||
console.log(`ae_acct = `, ae_acct);
|
||||
}
|
||||
|
||||
$events_slct.event_id = ae_acct.slct.event_id;
|
||||
$events_slct.event_obj = ae_acct.slct.event_obj;
|
||||
$events_slct.event_obj_li = ae_acct.slct.event_obj_li;
|
||||
|
||||
// let ae_promises: key_val = {};
|
||||
|
||||
// Updated 2024-06-25
|
||||
// $: if ($events_trigger == 'load__event_session_obj_id' && $events_trig_kv['event_session_id']) {
|
||||
// console.log(`load__event_session_obj_id() $events_slct.event_session_id=${$events_slct.event_session_id}`);
|
||||
|
||||
// $events_trigger = null;
|
||||
|
||||
// if ($events_slct.event_session_id) {
|
||||
// $events_trig_kv['event_session_id'] = ({
|
||||
// api_cfg: $ae_api,
|
||||
// event_session_id: $events_slct.event_session_id,
|
||||
// log_lvl: 1
|
||||
// })
|
||||
// .then(function (load_results) {
|
||||
// console.log(`ae_event_session_get_promise:`, load_results);
|
||||
// });
|
||||
// }
|
||||
// let ae_acct = data[$slct.account_id];
|
||||
// if (log_lvl) {
|
||||
// console.log(`ae_acct = `, ae_acct);
|
||||
// }
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@@ -17,14 +17,14 @@ interface Props {
|
||||
|
||||
let { data, children }: Props = $props();
|
||||
|
||||
// Quickly save the data passed from the parent(s) to the Svelte stores, localStorage, and other.
|
||||
$slct.account_id = data.account_id;
|
||||
// console.log(`$slct.account_id = `, $slct.account_id);
|
||||
// *** Quickly pull out data from parent(s)
|
||||
let ae_acct = data[$slct.account_id];
|
||||
console.log(`ae_acct = `, ae_acct);
|
||||
if (log_lvl) {
|
||||
console.log(`ae_acct = `, ae_acct);
|
||||
}
|
||||
|
||||
$idaa_slct.archive_obj_li = ae_acct.slct.archive_obj_li;
|
||||
|
||||
// $idaa_slct.archive_id = ae_acct.slct.archive_id; // Not set here yet.
|
||||
|
||||
// *** Set initial variables
|
||||
// if (browser) {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/** @type {import('./$types').LayoutLoad} */
|
||||
console.log(`IDAA Archives - [archive_id] +layout.ts start`);
|
||||
// console.log(`IDAA Archives - [archive_id] +layout.ts start`);
|
||||
|
||||
import { error } from '@sveltejs/kit';
|
||||
import { browser } from '$app/environment';
|
||||
import { archives_func } from '$lib/ae_archives/ae_archives_functions';
|
||||
// import { error } from '@sveltejs/kit';
|
||||
// import { browser } from '$app/environment';
|
||||
// import { archives_func } from '$lib/ae_archives/ae_archives_functions';
|
||||
|
||||
export async function load({ params, parent }) { // route
|
||||
// let log_lvl: number = 0;
|
||||
|
||||
@@ -37,15 +37,12 @@ let { data }: Props = $props();
|
||||
// let ae_tmp: key_val = {};
|
||||
// let ae_triggers: key_val = {};
|
||||
|
||||
|
||||
// Variables
|
||||
|
||||
|
||||
// Quickly save the data passed from the parent(s) to the Svelte stores, localStorage, and other.
|
||||
$slct.account_id = data.account_id;
|
||||
// console.log(`$slct.account_id = `, $slct.account_id);
|
||||
// *** Quickly pull out data from parent(s)
|
||||
let ae_acct = data[$slct.account_id];
|
||||
console.log(`ae_acct = `, ae_acct);
|
||||
if (log_lvl) {
|
||||
console.log(`ae_acct = `, ae_acct);
|
||||
}
|
||||
|
||||
// For some reason data.params.archive_id (or whatever param) is not being passed to this page when loaded by a link from another page. This seems to be a bug with Svelte or SvelteKit. Hopefully fixed in a future version 5? 2024-11-06
|
||||
$idaa_slct.archive_id = ae_acct.slct.archive_id;
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
<script lang="ts">
|
||||
// *** Import Svelte core
|
||||
// *** Import Svelte specific
|
||||
|
||||
// *** Import Aether core variables and 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 { api } from '$lib/api';
|
||||
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 } from '$lib/ae_idaa_stores';
|
||||
|
||||
export let lq__archive_content_obj_li: any;
|
||||
interface Props {
|
||||
lq__archive_content_obj_li: any;
|
||||
}
|
||||
|
||||
let ae_promises: key_val = {};
|
||||
let { lq__archive_content_obj_li }: Props = $props();
|
||||
|
||||
let ae_promises: key_val = $state({});
|
||||
// let ae_tmp: key_val = {};
|
||||
// let ae_triggers: key_val = {};
|
||||
|
||||
@@ -31,7 +35,7 @@ let ae_promises: key_val = {};
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-md btn-info variant-glass-secondary hover:variant-filled-secondary transition w-96"
|
||||
on:click={() => {
|
||||
onclick={() => {
|
||||
if ($idaa_sess.archives.show_list__archive_content_li_group == idaa_archive_content_obj.group) {
|
||||
$idaa_sess.archives.show_list__archive_content_li_group = null;
|
||||
} else {
|
||||
@@ -83,7 +87,7 @@ let ae_promises: key_val = {};
|
||||
<button
|
||||
type="button"
|
||||
disabled={!$ae_loc.authenticated_access}
|
||||
on:click={() => {
|
||||
onclick={() => {
|
||||
$idaa_slct.archive_content_id = idaa_archive_content_obj?.archive_content_id;
|
||||
$idaa_slct.archive_content_obj = idaa_archive_content_obj;
|
||||
|
||||
@@ -112,7 +116,7 @@ let ae_promises: key_val = {};
|
||||
<button
|
||||
type="button"
|
||||
disabled={!$ae_loc.trusted_access}
|
||||
on:click={() => {
|
||||
onclick={() => {
|
||||
ae_promises[idaa_archive_content_obj.hosted_file_id] = api.download_hosted_file({
|
||||
api_cfg: $ae_api,
|
||||
hosted_file_id: idaa_archive_content_obj.hosted_file_id,
|
||||
@@ -163,7 +167,7 @@ let ae_promises: key_val = {};
|
||||
<button
|
||||
type="button"
|
||||
disabled={!$ae_loc.trusted_access}
|
||||
on:click={() => {
|
||||
onclick={() => {
|
||||
$idaa_slct.archive_content_id = idaa_archive_content_obj.archive_content_id;
|
||||
$idaa_slct.archive_content_obj = idaa_archive_content_obj;
|
||||
|
||||
@@ -219,7 +223,7 @@ let ae_promises: key_val = {};
|
||||
|
||||
|
||||
<section
|
||||
class="ae_meta mt-2 flex flex-col sm:flex-row gap-1 items-center justify-center flex flex-col text-sm text-gray-500"
|
||||
class="ae_meta mt-2 flex flex-col sm:flex-row gap-1 items-center justify-center text-sm text-gray-500"
|
||||
class:hidden={!$ae_loc.administrator_access}
|
||||
>
|
||||
<span
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
export let log_lvl: number = 0;
|
||||
|
||||
// *** Import Svelte core
|
||||
import { onMount } from 'svelte';
|
||||
import { fade } from 'svelte/transition';
|
||||
@@ -14,7 +14,12 @@ import { archives_func } from '$lib/ae_archives/ae_archives_functions';
|
||||
|
||||
import Tiptap_editor from '$lib/element_tiptap_editor.svelte';
|
||||
|
||||
export let lq__archive_obj: any;
|
||||
interface Props {
|
||||
log_lvl?: number;
|
||||
lq__archive_obj: any;
|
||||
}
|
||||
|
||||
let { log_lvl = 0, lq__archive_obj }: Props = $props();
|
||||
|
||||
let create_archive_obj_promise: any;
|
||||
let delete_archive_obj_promise: any;
|
||||
@@ -25,7 +30,7 @@ let prom_api__archive_obj__hosted_file: any;
|
||||
|
||||
let disable_submit_btn = true;
|
||||
|
||||
let lu_time_zone_list:any = localStorage.getItem('lu_time_zone_list') ? JSON.parse(localStorage.getItem('lu_time_zone_list')) : [];
|
||||
let lu_time_zone_list:any = $state(localStorage.getItem('lu_time_zone_list') ? JSON.parse(localStorage.getItem('lu_time_zone_list')) : []);
|
||||
$ae_loc.lu_time_zone_list = [];
|
||||
// $ae_loc.lu_time_zone_list = [];
|
||||
if (lu_time_zone_list && lu_time_zone_list.length > 0) {
|
||||
@@ -165,7 +170,7 @@ async function handle_submit_form(event) {
|
||||
if (!$idaa_slct.archive_id) {
|
||||
prom_api__archive_obj = archives_func.create_ae_obj__archive({
|
||||
api_cfg: $ae_api,
|
||||
archive_id: $idaa_slct.archive_id,
|
||||
account_id: $ae_loc.account_id,
|
||||
data_kv: archive_do,
|
||||
log_lvl: log_lvl
|
||||
})
|
||||
@@ -274,7 +279,7 @@ async function handle_delete_archive_obj(
|
||||
bind:clientHeight={$ae_loc.iframe_height_modal_body}
|
||||
>
|
||||
|
||||
<form on:submit|preventDefault={handle_submit_form} class="space-y-2">
|
||||
<form onsubmit={handle_submit_form} class="space-y-2">
|
||||
|
||||
{#await update_archive_obj_promise}
|
||||
<div class="awaiting alert_msg_pulse" out:fade={{ duration: 2000 }}>Saving...</div>
|
||||
@@ -433,7 +438,7 @@ async function handle_delete_archive_obj(
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm variant-soft-secondary float-right"
|
||||
on:click={() => {
|
||||
onclick={() => {
|
||||
$idaa_loc.archives.show__admin_options = !$idaa_loc.archives.show__admin_options;
|
||||
}}
|
||||
>
|
||||
@@ -585,7 +590,7 @@ async function handle_delete_archive_obj(
|
||||
<button
|
||||
disabled={$ae_loc.administrator_access}
|
||||
type="button"
|
||||
on:click={() => {
|
||||
onclick={() => {
|
||||
if (!confirm('Are you sure you want to delete this archive?')) {return false;}
|
||||
handle_delete_archive_obj({archive_id: $idaa_slct.archive_id});
|
||||
}}
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
<script lang="ts">
|
||||
// *** Import Svelte core
|
||||
// *** Import Svelte specific
|
||||
|
||||
// *** Import Aether core variables and functions
|
||||
// *** Import Aether specific variables and functions
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
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, idaa_prom } 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';
|
||||
|
||||
export let log_lvl: number = 0;
|
||||
export let lq__archive_obj: any;
|
||||
export let lq__archive_content_obj_li: any;
|
||||
interface Props {
|
||||
log_lvl?: number;
|
||||
lq__archive_obj: any;
|
||||
lq__archive_content_obj_li: any;
|
||||
}
|
||||
|
||||
let { log_lvl = 0, lq__archive_obj, lq__archive_content_obj_li }: Props = $props();
|
||||
|
||||
// let ae_promises: key_val = {};
|
||||
// let ae_tmp: key_val = {};
|
||||
let ae_trigger: any = null;
|
||||
// let ae_trigger: any = null;
|
||||
// let ae_triggers: key_val = {};
|
||||
|
||||
// Reminder: Styling is being done with Tailwind CSS, not Bootstrap.
|
||||
@@ -67,7 +71,7 @@ let ae_trigger: any = null;
|
||||
class="ae_meta archive__meta mt-2 flex flex-col gap-2 items-center justify-center"
|
||||
class:hidden={!$ae_loc.trusted_access}
|
||||
>
|
||||
<div class="ae_group flex flex-col sm:flex-row gap-1 items-center justify-center flex flex-col text-sm text-gray-500">
|
||||
<div class="ae_group flex flex-col sm:flex-row gap-1 items-center justify-center text-sm text-gray-500">
|
||||
<span
|
||||
class:hidden={!$ae_loc.administrator_access}
|
||||
>
|
||||
@@ -92,7 +96,7 @@ let ae_trigger: any = null;
|
||||
{#if ($ae_loc.edit_mode && $ae_loc.trusted_access) && (!$idaa_loc.archives.qry__hidden || $idaa_loc.archives.qry__hidden == 'not_hidden')}
|
||||
<button
|
||||
type="button"
|
||||
on:click={() => {
|
||||
onclick={() => {
|
||||
$idaa_loc.archives.qry__enabled = 'enabled';
|
||||
$idaa_loc.archives.qry__hidden = 'all';
|
||||
$idaa_loc.archives.qry__limit = 250;
|
||||
@@ -120,7 +124,7 @@ let ae_trigger: any = null;
|
||||
{:else if $ae_loc.trusted_access && $idaa_loc.archives.qry__hidden != 'not_hidden'}
|
||||
<button
|
||||
type="button"
|
||||
on:click={() => {
|
||||
onclick={() => {
|
||||
$idaa_loc.archives.qry__enabled = 'enabled';
|
||||
$idaa_loc.archives.qry__hidden = 'not_hidden';
|
||||
$idaa_loc.archives.qry__limit = 250;
|
||||
@@ -150,7 +154,7 @@ let ae_trigger: any = null;
|
||||
{#if ($ae_loc.edit_mode && $ae_loc.administrator_access) && (!$idaa_loc.archives.qry__enabled || $idaa_loc.archives.qry__enabled == 'enabled')}
|
||||
<button
|
||||
type="button"
|
||||
on:click={() => {
|
||||
onclick={() => {
|
||||
$idaa_loc.archives.qry__enabled = 'all';
|
||||
$idaa_loc.archives.qry__hidden = 'all';
|
||||
$idaa_loc.archives.qry__limit = 500;
|
||||
@@ -176,7 +180,7 @@ let ae_trigger: any = null;
|
||||
{:else if $ae_loc.administrator_access && $idaa_loc.archives.qry__enabled != 'enabled'}
|
||||
<button
|
||||
type="button"
|
||||
on:click={() => {
|
||||
onclick={() => {
|
||||
$idaa_loc.archives.qry__enabled = 'enabled';
|
||||
$idaa_loc.archives.qry__hidden = 'all';
|
||||
$idaa_loc.archives.qry__limit = 500;
|
||||
@@ -207,7 +211,7 @@ let ae_trigger: any = null;
|
||||
<button
|
||||
type="button"
|
||||
disabled={!$ae_loc.trusted_access}
|
||||
on:click={() => {
|
||||
onclick={() => {
|
||||
if (!confirm('Add new archive content?')) {
|
||||
return false;
|
||||
}
|
||||
@@ -226,7 +230,7 @@ let ae_trigger: any = null;
|
||||
<button
|
||||
type="button"
|
||||
disabled={!$ae_loc.trusted_access}
|
||||
on:click={() => {
|
||||
onclick={() => {
|
||||
// $idaa_slct.archive_id = $lq__archive_obj?.archive_id_random;
|
||||
// $lq__archive_obj? = $lq__archive_obj?;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
let log_lvl: number = 0;
|
||||
// let log_lvl: number = 0;
|
||||
|
||||
// *** Import Svelte specific
|
||||
import { goto } from '$app/navigation';
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
<script lang="ts">
|
||||
|
||||
// *** Import Svelte specific
|
||||
import { onDestroy, onMount } from 'svelte';
|
||||
import { browser } from '$app/environment';
|
||||
|
||||
// import { ae, Element_modal_v3 } from 'aether_npm_lib';
|
||||
// *** Import Aether specific variables and functions
|
||||
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 } from '$lib/ae_idaa_stores';
|
||||
|
||||
// export let archive_content_id = null;
|
||||
interface Props {
|
||||
// export let archive_content_id = null;
|
||||
lq__archive_content_obj: any;
|
||||
}
|
||||
|
||||
export let lq__archive_content_obj: any;
|
||||
let { lq__archive_content_obj }: Props = $props();
|
||||
|
||||
let file_icons:any = {}
|
||||
let file_icons:any = $state({})
|
||||
file_icons['ac3'] = 'file-audio';
|
||||
file_icons['aac'] = 'file-audio';
|
||||
file_icons['csv'] = 'file-csv';
|
||||
@@ -38,16 +43,18 @@ file_icons['xls'] = 'file-excel';
|
||||
file_icons['xlsx'] = 'file-excel';
|
||||
file_icons['zip'] = 'file-archive';
|
||||
|
||||
$: if (browser && $lq__archive_content_obj?.archive_content_id) {
|
||||
console.log('** Component Mounted: ** Media Player - Archive Content Obj');
|
||||
$effect(() => {
|
||||
if (browser && $lq__archive_content_obj?.archive_content_id) {
|
||||
console.log('** Component Mounted: ** Media Player - Archive Content Obj');
|
||||
|
||||
document.body.scrollIntoView();
|
||||
document.body.scrollIntoView();
|
||||
|
||||
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);
|
||||
}
|
||||
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');
|
||||
|
||||
Reference in New Issue
Block a user