fix(journals): add type='button' to prevent form submission and migrate to V3 Action API for file downloads

This commit is contained in:
Scott Idem
2026-02-03 22:14:22 -05:00
parent 6abe4c897e
commit 281972cb5d
24 changed files with 104 additions and 132 deletions

View File

@@ -58,8 +58,7 @@
</a>
<div class="flex items-center gap-2 grow">
<button
type="button"
<button type="button"
onclick={toggle_edit_mode}
class="btn-icon btn-icon-sm transition-all {has_changed && $journals_loc.entry.edit_kv[entry.journal_entry_id] === 'current' ? 'variant-filled-success' : 'variant-soft-surface'}"
>
@@ -90,7 +89,7 @@
<!-- Auto-Save indicator -->
{#if $journals_loc.entry.edit_kv[entry.journal_entry_id] === 'current'}
<div class="flex items-center gap-1 px-2 border-r border-surface-500/20 mr-1">
<button
<button type="button"
class="btn-icon btn-icon-sm { $journals_loc.entry.auto_save ? 'text-primary-500' : 'opacity-30'}"
onclick={() => $journals_loc.entry.auto_save = !$journals_loc.entry.auto_save}
title="Toggle Auto Save"
@@ -107,7 +106,7 @@
<!-- Decrypt Toggle (Lock) -->
{#if entry.private}
<button
<button type="button"
class="btn-icon btn-icon-sm transition-all {is_decrypted ? 'variant-filled-success shadow-lg shadow-success-500/20' : 'variant-soft-warning'}"
onclick={on_decrypt}
title={is_decrypted ? 'Lock Content' : 'Decrypt Content'}
@@ -119,7 +118,8 @@
<div class="w-[1px] h-6 bg-surface-500/20 mx-1"></div>
<!-- Unified Config Button -->
<button
<button type="button"
class="btn btn-sm variant-soft-primary font-bold"
onclick={on_show_config}
>
@@ -128,7 +128,7 @@
<!-- Explicit Save (Mobile/Backup) -->
{#if has_changed && save_status !== 'saving'}
<button class="btn btn-sm variant-filled-primary shadow-lg" onclick={on_save}>
<button type="button" class="btn btn-sm variant-filled-primary shadow-lg" onclick={on_save}>
<Save size="1.1em" class="mr-2" /> Save
</button>
{/if}