Refine journal description editor layout

This commit is contained in:
Scott Idem
2026-05-05 14:36:01 -04:00
parent 1c20038a55
commit 07dd213cfd
2 changed files with 31 additions and 43 deletions

View File

@@ -270,7 +270,7 @@ async function delete_journal() {
<div class="animate-in fade-in space-y-6 duration-300">
<!-- Core Meta -->
<section class="grid grid-cols-1 gap-4 p-2">
<label class="label">
<label class="label flex flex-col items-start gap-1">
<span class="text-sm font-bold opacity-70"
>Journal Name</span>
<input
@@ -279,17 +279,28 @@ async function delete_journal() {
class="input"
placeholder="e.g. Personal Log" />
</label>
<label class="label">
<label class="label flex flex-col items-start gap-1">
<span class="text-sm font-bold opacity-70"
>Description (Markdown)</span>
<textarea
bind:value={tmp__journal_obj.description}
class="textarea h-32"
placeholder="Describe the purpose of this journal..."
></textarea>
<div class="w-full">
{#if tmp__journal_obj?.cfg_json?.pref_editor === 'codemirror'}
<AE_Comp_Editor_CodeMirror
bind:content={tmp__journal_obj.description}
language="markdown"
theme_mode={$ae_loc.theme_mode}
placeholder="Describe the purpose of this journal..."
class_li="rounded-lg border border-surface-500/20" />
{:else}
<textarea
bind:value={tmp__journal_obj.description}
class="textarea h-32"
placeholder="Describe the purpose of this journal..."
></textarea>
{/if}
</div>
</label>
<div class="grid grid-cols-2 gap-4">
<label class="label">
<label class="label flex flex-col items-start gap-1">
<span class="text-sm font-bold opacity-70"
>Type</span>
<select
@@ -301,7 +312,7 @@ async function delete_journal() {
{/each}
</select>
</label>
<label class="label">
<label class="label flex flex-col items-start gap-1">
<span class="text-sm font-bold opacity-70"
>Journal Group (text)</span>
<input

View File

@@ -211,15 +211,17 @@ async function handle_new_entry() {
<div
class="flex grow flex-row flex-wrap items-center justify-end gap-2">
<!-- Simplified Config Trigger -->
<button
type="button"
onclick={() =>
($journals_sess.show__modal_edit__journal_obj = true)}
class="btn preset-tonal-secondary px-3 py-1 shadow-md"
title="Journal Config & Actions">
<Settings size="1.2em" class="mr-2" />
<span class="hidden md:inline">Config</span>
</button>
{#if $ae_loc.edit_mode}
<button
type="button"
onclick={() =>
($journals_sess.show__modal_edit__journal_obj = true)}
class="btn preset-tonal-secondary px-3 py-1 shadow-md"
title="Journal Config & Actions">
<Settings size="1.2em" class="mr-2" />
<span class="hidden md:inline">Config</span>
</button>
{/if}
<!-- Passcode Verification (Condensed) -->
{#if !$journals_sess?.journal_kv[$lq__journal_obj?.id]?.journal_passcode_verified}
@@ -235,31 +237,6 @@ async function handle_new_entry() {
</div>
</header>
<!-- Show Journal description -->
{#if $lq__journal_obj?.description && $ae_loc.edit_mode}
<div
class="
prose
word-break
prose-p:m-0
prose-p:p-0 prose-h1:underline prose-h1:decoration-double
prose-h2:underline
prose-h1:text-2xl prose-h2:text-xl
prose-h3:text-lg prose-h1:m-0
prose-h2:m-0 prose-h3:m-0
prose-h4:m-0 prose-h5:m-0 prose-h6:m-0 prose-li:m-0
prose-li:p-0 prose-li:line-height-none
w-full max-w-(--breakpoint-sm)
space-y-1
rounded-lg bg-gray-50 p-2
font-mono text-sm font-normal text-wrap text-gray-900 shadow-md
md:max-w-(--breakpoint-md) dark:bg-gray-800 dark:text-gray-100
">
{@html $lq__journal_obj.description_md_html}
</div>
{/if}
</section>
</div>