diff --git a/ka-note/client/src/lib/components/JournalView.svelte b/ka-note/client/src/lib/components/JournalView.svelte
index 48dd852..8e936d4 100644
--- a/ka-note/client/src/lib/components/JournalView.svelte
+++ b/ka-note/client/src/lib/components/JournalView.svelte
@@ -10,7 +10,7 @@
import ConfirmDialog from './ConfirmDialog.svelte';
import WiedervorlageSection from './WiedervorlageSection.svelte';
import LinkTitle from './LinkTitle.svelte';
- import { currentScope } from '$lib/stores/scopeContext';
+ import { currentScope, scopeSettings } from '$lib/stores/scopeContext';
interface Props {
contextId: string;
@@ -120,12 +120,14 @@
let editingId = $state
(null);
let editTitle = $state('');
let editBody = $state('');
+ let editIsPrivate = $state(false);
- function startEdit(entry: { id: string; text: string }) {
+ function startEdit(entry: { id: string; text: string; isPrivate?: boolean }) {
const lines = entry.text.split('\n');
editingId = entry.id;
editTitle = lines[0];
editBody = lines.slice(1).join('\n').trim();
+ editIsPrivate = !!entry.isPrivate;
}
function cancelEdit() {
@@ -135,7 +137,7 @@
async function saveEdit() {
if (!editingId || !editTitle.trim()) return;
const text = editBody.trim() ? `${editTitle.trim()}\n${editBody.trim()}` : editTitle.trim();
- await updateHistoryEntry(editingId, text);
+ await updateHistoryEntry(editingId, text, editIsPrivate);
editingId = null;
}
@@ -273,7 +275,8 @@
/>