More clean up. Saving notes.
This commit is contained in:
61
documentation/JOURNALS_CONFIG_MAP.md
Normal file
61
documentation/JOURNALS_CONFIG_MAP.md
Normal file
@@ -0,0 +1,61 @@
|
||||
# Aether Journals: Configuration & Settings Map
|
||||
|
||||
This document tracks all available settings across the three levels of the Journals module.
|
||||
|
||||
## 1. Module Level (Global)
|
||||
* **Scope:** Applied across the entire journals application for the current site/user.
|
||||
* **Storage:** Browser Local Storage (via `journals_loc` persisted store).
|
||||
* **UI Location:** Journals Landing Page -> Settings Icon (Top Right).
|
||||
|
||||
| Setting | Type | Description | Save Type |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| `datetime_format` | enum | Preferred display for date/time strings. | Manual (Save Changes) |
|
||||
| `time_format` | enum | Preferred display for time-only strings. | Manual (Save Changes) |
|
||||
| `entry.auto_save` | boolean | If true, entry edits are debounced and saved to DB. | Manual (Save Changes) |
|
||||
| `show_id_random` | boolean | Display technical UUIDs in metadata footers. | Manual (Save Changes) |
|
||||
| `enable_session_passcode_cache`| boolean | If true, private passcodes are held in session store. | Manual (Save Changes) |
|
||||
|
||||
## 2. Journal Level (Specific Journal)
|
||||
* **Scope:** Applied to a specific journal object and its metadata.
|
||||
* **Storage:** Remote MariaDB (via `update_ae_obj__journal`).
|
||||
* **UI Location:** Journal View -> Menu -> Edit Journal.
|
||||
|
||||
| Setting | Type | Description | Save Type |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| `name` | string | Display name of the journal. | Manual (Save Changes) |
|
||||
| `description` | markdown | Detailed purpose/notes for the journal. | Manual (Save Changes) |
|
||||
| `type_code` | enum | Category of journal (Diary, Log, etc.). | Manual (Save Changes) |
|
||||
| `group` | string | Sorting group for the journal list. | Manual (Save Changes) |
|
||||
| `sort` | integer | Manual sort order weight. | Manual (Save Changes) |
|
||||
| `priority` | boolean | Flag for "Starred" or "Pinned" status. | Manual (Save Changes) |
|
||||
| `enable` | boolean | Global activation flag for the journal. | Manual (Save Changes) |
|
||||
| `hide` | boolean | If true, journal is hidden from standard views. | Manual (Save Changes) |
|
||||
| `passcode` | string | Module-level encryption passcode. | Manual (Save Changes) |
|
||||
| `private_passcode`| string | User-specific secondary encryption secret. | Manual (Save Changes) |
|
||||
| `cfg_json.*` | JSON | UI/UX overrides (colors, default viewers, etc.). | Manual (Save Changes) |
|
||||
|
||||
## 3. Journal Entry Level (Specific Entry)
|
||||
* **Scope:** Applied to an individual entry within a journal.
|
||||
* **Storage:** Remote MariaDB (via `update_ae_obj__journal_entry`).
|
||||
* **UI Location:** Entry View -> Settings Button.
|
||||
|
||||
| Setting | Type | Description | Save Type |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| `name` | string | Entry title. | Auto-Save (if enabled) |
|
||||
| `content` | markdown | Main text body. | Auto-Save (if enabled) |
|
||||
| `category_code` | enum | User-defined category for the entry. | Auto-Save / Manual |
|
||||
| `tags` | string | Comma-separated list of tags. | Auto-Save / Manual |
|
||||
| `priority` | boolean | If true, entry is pinned or highlighted. | Manual (Done) |
|
||||
| `enable` | boolean | Activation flag for the entry. | Manual (Done) |
|
||||
| `hide` | boolean | If true, entry is hidden from standard lists. | Manual (Done) |
|
||||
| `sort` | integer | Manual sort order weight. | Manual (Done) |
|
||||
| `archive_on` | datetime | Scheduled date for automatic archiving. | Manual (Done) |
|
||||
| `private` | boolean | Trigger for E2EE (Encryption). | Manual (Done) |
|
||||
| `alert` | boolean | Trigger for visual "Alert" state. | Manual (Done) |
|
||||
| `group` | string | Grouping key for the list view. | Manual (JSON only) |
|
||||
|
||||
## 📐 Data Normalization Rules
|
||||
To prevent infinite reactivity loops and trivial save cycles, the following normalizations are applied before comparison:
|
||||
1. **Strings:** Trimmed and `null` treated as `""`.
|
||||
2. **Booleans:** Forced to `true/false` (no nulls).
|
||||
3. **JSON:** Deep stringification comparison (`JSON.stringify`).
|
||||
@@ -170,21 +170,21 @@
|
||||
</h2>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<label class="flex items-center space-x-3 cursor-pointer p-3 rounded-lg bg-surface-500/5 border border-surface-500/10 transition-colors hover:bg-surface-500/10">
|
||||
<input type="checkbox" bind:checked={tmp_entry_obj.enable} class="checkbox checkbox-primary" />
|
||||
<input type="checkbox" bind:checked={tmp_entry_obj.enable} onchange={onSave} class="checkbox checkbox-primary" />
|
||||
<div class="flex flex-col">
|
||||
<span class="font-bold">Enabled</span>
|
||||
<span class="text-xs opacity-60">Allow access to this entry</span>
|
||||
</div>
|
||||
</label>
|
||||
<label class="flex items-center space-x-3 cursor-pointer p-3 rounded-lg bg-surface-500/5 border border-surface-500/10 transition-colors hover:bg-surface-500/10">
|
||||
<input type="checkbox" bind:checked={tmp_entry_obj.hide} class="checkbox checkbox-primary" />
|
||||
<input type="checkbox" bind:checked={tmp_entry_obj.hide} onchange={onSave} class="checkbox checkbox-primary" />
|
||||
<div class="flex flex-col">
|
||||
<span class="font-bold">Hidden</span>
|
||||
<span class="text-xs opacity-60">Hide from standard lists</span>
|
||||
</div>
|
||||
</label>
|
||||
<label class="flex items-center space-x-3 cursor-pointer p-3 rounded-lg bg-surface-500/5 border border-surface-500/10 transition-colors hover:bg-surface-500/10">
|
||||
<input type="checkbox" bind:checked={tmp_entry_obj.priority} class="checkbox checkbox-primary" />
|
||||
<input type="checkbox" bind:checked={tmp_entry_obj.priority} onchange={onSave} class="checkbox checkbox-primary" />
|
||||
<div class="flex flex-col">
|
||||
<span class="font-bold">Priority Entry</span>
|
||||
<span class="text-xs opacity-60">Star or pin to top</span>
|
||||
@@ -196,9 +196,9 @@
|
||||
<span class="text-xs opacity-60">Manual list position</span>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<button class="btn-icon btn-icon-sm variant-soft-surface" onclick={() => { tmp_entry_obj.sort = (tmp_entry_obj.sort ?? 0) - 1; }}><Minus size="1em"/></button>
|
||||
<button class="btn-icon btn-icon-sm variant-soft-surface" onclick={() => { tmp_entry_obj.sort = (tmp_entry_obj.sort ?? 0) - 1; onSave(); }}><Minus size="1em"/></button>
|
||||
<span class="font-mono font-bold w-8 text-center text-lg">{tmp_entry_obj.sort ?? 0}</span>
|
||||
<button class="btn-icon btn-icon-sm variant-soft-surface" onclick={() => { tmp_entry_obj.sort = (tmp_entry_obj.sort ?? 0) + 1; }}><Plus size="1em"/></button>
|
||||
<button class="btn-icon btn-icon-sm variant-soft-surface" onclick={() => { tmp_entry_obj.sort = (tmp_entry_obj.sort ?? 0) + 1; onSave(); }}><Plus size="1em"/></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user