diff --git a/src/lib/ae_core/ae_comp__hosted_files_download_button.svelte b/src/lib/ae_core/ae_comp__hosted_files_download_button.svelte
new file mode 100644
index 00000000..ad88ad53
--- /dev/null
+++ b/src/lib/ae_core/ae_comp__hosted_files_download_button.svelte
@@ -0,0 +1,152 @@
+
+
+
+{#if hosted_file_id && hosted_file_obj}
+
+
+{:else}
+
+
+
+{/if}
\ No newline at end of file
diff --git a/src/lib/ae_journals/db_journals.ts b/src/lib/ae_journals/db_journals.ts
index 3bf336a5..1f2b4ae6 100644
--- a/src/lib/ae_journals/db_journals.ts
+++ b/src/lib/ae_journals/db_journals.ts
@@ -58,7 +58,7 @@ export interface Journal {
cfg_json?: null|key_val; // This is the configuration JSON for the journal
- data_json?: null|string; // We always need to store something extra...
+ data_json?: null|key_val; // We always need to store something extra...
ux_mode?: null|string; // 'mobile' or 'desktop'
@@ -229,7 +229,7 @@ export interface Journal_Entry {
related_entry_id_li?: null|key_val; // List of related journal entry IDs
// cfg_json?: null|key_val; // This is the configuration JSON for the journal entry
- data_json?: null|string; // We always need to store something extra...
+ data_json?: null|key_val; // We always need to store something extra...
// This only allows for basic access to the content.
passcode_read?: null|string; // For LLM (AI) generated summary...???
diff --git a/src/lib/element_manage_hosted_file_li.svelte b/src/lib/element_manage_hosted_file_li.svelte
index 1057f5c5..6b90eb7b 100644
--- a/src/lib/element_manage_hosted_file_li.svelte
+++ b/src/lib/element_manage_hosted_file_li.svelte
@@ -99,7 +99,8 @@ ae_tmp.show__direct_download = $ae_loc.core?.show__direct_download ?? false;
hidden: 'not_hidden',
limit: 250,
// params: params,
- try_cache: true
+ try_cache: true,
+ log_lvl: 2
});
// ae_tmp.show__file_li = false;
diff --git a/src/routes/journals/ae_comp__journal_entry_obj_file_li.svelte b/src/routes/journals/ae_comp__journal_entry_obj_file_li.svelte
new file mode 100644
index 00000000..ab28af9a
--- /dev/null
+++ b/src/routes/journals/ae_comp__journal_entry_obj_file_li.svelte
@@ -0,0 +1,307 @@
+
+
+
+
diff --git a/src/routes/journals/ae_comp__journal_entry_obj_id_view.svelte b/src/routes/journals/ae_comp__journal_entry_obj_id_view.svelte
index 4198149f..3c3d9940 100644
--- a/src/routes/journals/ae_comp__journal_entry_obj_id_view.svelte
+++ b/src/routes/journals/ae_comp__journal_entry_obj_id_view.svelte
@@ -9,7 +9,7 @@ import {
BookHeart, BriefcaseBusiness,
CalendarClock, CalendarOff, Clock, CodeXml, Copy,
Eye, EyeOff,
- Flag, FlagOff, FileX, Fingerprint,
+ Flag, FlagOff, FileDown, FileX, Fingerprint,
Globe, Group,
Hash, History,
LockKeyhole, LockKeyholeOpen,
@@ -36,11 +36,14 @@ import E_app_codemirror_v5 from '$lib/e_app_codemirror_v5.svelte';
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 { api } from '$lib/api';
import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
import { journals_loc, journals_sess, journals_slct, journals_trig, journals_prom } from '$lib/ae_journals/ae_journals_stores';
import { journals_func } from '$lib/ae_journals/ae_journals_functions';
+import Comp_journal_entry_file_li from './ae_comp__journal_entry_obj_file_li.svelte';
import Comp_hosted_files_upload from '$lib/ae_core/ae_comp__hosted_files_upload.svelte';
import Element_manage_hosted_file_li_wrap from '$lib/element_manage_hosted_file_li_all.svelte';
+import Comp_hosted_files_download_button from '$lib/ae_core/ae_comp__hosted_files_download_button.svelte';
interface Props {
log_lvl?: number;
@@ -305,10 +308,10 @@ async function update_journal_entry() {
// log_lvl = 1;
// append slct_hosted_file_kv to data_json.hosted_file_kv
- if (!tmp_entry_obj.data_json.hosted_file_kv) {
- tmp_entry_obj.data_json.hosted_file_kv = {};
- }
- tmp_entry_obj.data_json.hosted_file_kv = $journals_loc.entry.hosted_file_kv;
+ // if (!tmp_entry_obj.data_json.hosted_file_kv) {
+ // tmp_entry_obj.data_json.hosted_file_kv = {};
+ // }
+ // tmp_entry_obj.data_json.hosted_file_kv = $journals_loc.entry.hosted_file_kv;
let data_kv: key_val = {
alert: tmp_entry_obj?.alert,
@@ -2266,198 +2269,40 @@ tabindex={$ae_loc.edit_mode ? 0 : -1} -->
{/if}
-
-
-
{#if $lq__journal_entry_obj?.journal_entry_id}
-
+
- Upload/Manage Hosted File
+
+ {#if $lq__journal_entry_obj?.data_json?.hosted_file_kv}
+
+
+
+
+
+ Download Files:
+
+
- {#if !tmp_entry_obj?.data_json?.hosted_file_kv}
- No file(s) uploaded yet.
+ {#each Object.entries($lq__journal_entry_obj?.data_json?.hosted_file_kv) as [key, hosted_file_obj]}
- {#if $ae_loc.trusted_access}
-
-
-
-
- {#snippet label()}
-
-
-
- Upload Journal Entry files
-
-
- Aether hosted files only
-
-
- {/snippet}
-
-
-
-
-
-
-
-
-
- {/if}
-
- {:else}
-
-
-
-
-
-
-
-
+
+ {/each}
+
{/if}
-
+
+
{:else}
{
+
+
+
+
+
+ Linked files:
+
+ {journals_journal_entry_obj?.data_json?.hosted_file_kv
+ ? Object.keys(journals_journal_entry_obj?.data_json?.hosted_file_kv).length
+ : 0}×
+
+
+
{#if journals_journal_entry_obj.tags && journals_journal_entry_obj.tags.length}
-