feat(journals): extract decryption logic to helper and improve Quick Add behavior
- Extracted journal entry decryption workflow to 'ae_journals_decryption.ts' to decouple it from Svelte reactivity and address loop issues. - Updated 'ae_comp__journal_entry_obj_id_view.svelte' to use the new decryption helper. - Refactored 'Quick Add' to use the first line as the title and remove it from the content before saving.
This commit is contained in:
@@ -36,9 +36,12 @@
|
||||
let name = lines[0].substring(0, 100);
|
||||
if (lines[0].length > 100) name += "...";
|
||||
|
||||
// Remove the first line (title) from the content
|
||||
const entry_content = lines.slice(1).join('\n').trim();
|
||||
|
||||
const data_kv = {
|
||||
name: name,
|
||||
content: note_content,
|
||||
content: entry_content,
|
||||
type_code: 'note',
|
||||
private: false, // Ensure notes are public/decrypted by default
|
||||
enable: true,
|
||||
|
||||
Reference in New Issue
Block a user