Refine journal entry AI tool layout
This commit is contained in:
@@ -17,20 +17,22 @@ interface Props {
|
|||||||
let { content, summary = $bindable(), on_save, log_lvl = 0 }: Props = $props();
|
let { content, summary = $bindable(), on_save, log_lvl = 0 }: Props = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="journal-entry-ai-tools inline-flex flex-wrap items-center justify-end gap-1">
|
<div class="journal-entry-floating-actions absolute top-14 right-2 z-10">
|
||||||
<AE_AITools
|
<div class="journal-entry-ai-tools inline-flex flex-wrap items-center justify-end gap-1">
|
||||||
{content}
|
<AE_AITools
|
||||||
model={$journals_loc.llm__api_model}
|
{content}
|
||||||
baseUrl={$journals_loc.llm__api_base_url}
|
model={$journals_loc.llm__api_model}
|
||||||
token={$journals_loc.llm__api_token}
|
baseUrl={$journals_loc.llm__api_base_url}
|
||||||
systemPrompt={$journals_loc.entry.llm__system_prompt}
|
token={$journals_loc.llm__api_token}
|
||||||
maxTokens={$journals_loc.entry.llm__max_tokens}
|
systemPrompt={$journals_loc.entry.llm__system_prompt}
|
||||||
temperature={$journals_loc.entry.llm__temperature}
|
maxTokens={$journals_loc.entry.llm__max_tokens}
|
||||||
buttonClass="btn btn-sm preset-tonal-primary shadow-md transition-all duration-150 hover:scale-105"
|
temperature={$journals_loc.entry.llm__temperature}
|
||||||
bind:summary
|
buttonClass="btn btn-sm preset-tonal-primary shadow-md transition-all duration-150 hover:scale-105"
|
||||||
onSave={(newSummary) => {
|
bind:summary
|
||||||
summary = newSummary;
|
onSave={(newSummary) => {
|
||||||
on_save();
|
summary = newSummary;
|
||||||
}}
|
on_save();
|
||||||
{log_lvl} />
|
}}
|
||||||
|
{log_lvl} />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ const preferred_viewer = $derived((journal?.cfg_json?.pref_viewer ?? 'rendered')
|
|||||||
type="button"
|
type="button"
|
||||||
onclick={on_save}
|
onclick={on_save}
|
||||||
disabled={!has_changed}
|
disabled={!has_changed}
|
||||||
class="btn btn-sm md:btn-md lg:btn-lg preset-filled-success fixed top-72 right-6 z-20 hidden min-w-32 shadow-xl transition-all md:inline-flex"
|
class="btn btn-sm md:btn-md lg:btn-lg preset-filled-success fixed top-84 right-6 z-20 hidden min-w-32 shadow-xl transition-all md:inline-flex"
|
||||||
class:hidden={!has_changed}>
|
class:hidden={!has_changed}>
|
||||||
<Save size="1.2em" class="mr-2" /> Save
|
<Save size="1.2em" class="mr-2" /> Save
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -467,13 +467,11 @@ let modal_mode: 'append' | 'prepend' | 'auto' = $state('auto');
|
|||||||
] == 'current'
|
] == 'current'
|
||||||
? 'ring-primary-500/40 ring-2 ring-inset'
|
? 'ring-primary-500/40 ring-2 ring-inset'
|
||||||
: ''}">
|
: ''}">
|
||||||
<div class="flex justify-end px-1 pb-2">
|
<AE_Comp_Journal_Entry_AiTools
|
||||||
<AE_Comp_Journal_Entry_AiTools
|
content={tmp_entry_obj.content}
|
||||||
content={tmp_entry_obj.content}
|
bind:summary={tmp_entry_obj.summary}
|
||||||
bind:summary={tmp_entry_obj.summary}
|
on_save={() => update_journal_entry()}
|
||||||
on_save={() => update_journal_entry()}
|
{log_lvl} />
|
||||||
{log_lvl} />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<AE_Comp_Journal_Entry_Editor
|
<AE_Comp_Journal_Entry_Editor
|
||||||
entry={$lq__journal_entry_obj}
|
entry={$lq__journal_entry_obj}
|
||||||
|
|||||||
Reference in New Issue
Block a user