setTimeout(() => { creating = false; newName = ''; }, 150)}
+ autofocus
+ />
+ {/if}
{#if meetings.length > 0}
diff --git a/ka-note/client/src/routes/persons/+page.svelte b/ka-note/client/src/routes/persons/+page.svelte
index c5367cb..28e846e 100644
--- a/ka-note/client/src/routes/persons/+page.svelte
+++ b/ka-note/client/src/routes/persons/+page.svelte
@@ -1,6 +1,9 @@
-
Alle Personen
+
+
Alle Personen
+ creating = true}>+ Neu
+
+
+ {#if creating}
+
setTimeout(() => { creating = false; newName = ''; }, 150)}
+ autofocus
+ />
+ {/if}
+
diff --git a/ka-note/client/src/routes/projects/+page.svelte b/ka-note/client/src/routes/projects/+page.svelte
index 05e7853..fa00aab 100644
--- a/ka-note/client/src/routes/projects/+page.svelte
+++ b/ka-note/client/src/routes/projects/+page.svelte
@@ -2,10 +2,29 @@
import { goto } from '$app/navigation';
import { liveQuery } from 'dexie';
import { db } from '$lib/db/schema';
- import { softDeleteContext, toggleFavorite } from '$lib/db/repositories';
+ import { softDeleteContext, toggleFavorite, upsertContext } from '$lib/db/repositories';
+ import { newId } from '$lib/db/helpers';
import ConfirmDialog from '$lib/components/ConfirmDialog.svelte';
import type { AgendaContext, ProjectMeta } from '@ka-note/shared';
+ let creating = $state(false);
+ let newName = $state('');
+
+ async function create() {
+ const name = newName.trim();
+ if (!name) return;
+ const id = newId();
+ await upsertContext({ id, name: `Project ${name}`, type: 'project' });
+ newName = '';
+ creating = false;
+ goto(`/context/${id}`);
+ }
+
+ function onKeydown(e: KeyboardEvent) {
+ if (e.key === 'Enter') { e.preventDefault(); create(); }
+ else if (e.key === 'Escape') { creating = false; newName = ''; }
+ }
+
const allProjects = liveQuery(() =>
db.contexts.filter(c => !c.deletedAt && c.type === 'project').sortBy('sortOrder')
);
@@ -36,7 +55,21 @@
-
Alle Projekte
+
+
Alle Projekte
+ creating = true}>+ Neu
+
+
+ {#if creating}
+
setTimeout(() => { creating = false; newName = ''; }, 150)}
+ autofocus
+ />
+ {/if}
{#if activeProjects.length > 0}
Aktiv
diff --git a/ka-note/client/src/routes/wiki/[id]/+page.svelte b/ka-note/client/src/routes/wiki/[id]/+page.svelte
index 63624c4..0dd013d 100644
--- a/ka-note/client/src/routes/wiki/[id]/+page.svelte
+++ b/ka-note/client/src/routes/wiki/[id]/+page.svelte
@@ -98,48 +98,51 @@
{#if currentPage}
-
- {#if editing}
- e.key === 'Enter' && (e.preventDefault(), saveTitle())}
- placeholder="Seitentitel..."
- />
- {:else}
- {currentPage.title}
- {/if}
+
+
+
+ {#if editing}
+
e.key === 'Enter' && (e.preventDefault(), saveTitle())}
+ placeholder="Seitentitel..."
+ />
+ {:else}
+
{currentPage.title}
+ {/if}
-
-
editing ? switchToRead() : (editing = true)}
- title={editing ? 'Leseansicht' : 'Bearbeiten'}
- >
- {editing ? '✓ Fertig' : '✎ Bearbeiten'}
-
-
-
-
-
handleScopeChange('business')}
- >Firma
-
handleScopeChange('private')}
- >Privat
+
+
+ handleScopeChange('business')}
+ >Firma
+ handleScopeChange('private')}
+ >Privat
+
-
confirmDelete = true}
- >Löschen
-
+
+
+ editing ? switchToRead() : (editing = true)}
+ >
+ {editing ? '✓ Fertig' : '✎ Bearbeiten'}
+
+ confirmDelete = true}
+ >Löschen
+
+
diff --git a/ka-note/client/src/routes/wiki/notebook/[id]/+page.svelte b/ka-note/client/src/routes/wiki/notebook/[id]/+page.svelte
index 6486112..a360b9b 100644
--- a/ka-note/client/src/routes/wiki/notebook/[id]/+page.svelte
+++ b/ka-note/client/src/routes/wiki/notebook/[id]/+page.svelte
@@ -46,54 +46,56 @@
{#if $notebook$}
-
- goto('/wiki')}>←
+
+
+
+
goto('/wiki')}>←
- {#if editingName}
-
{ if (e.key === 'Enter') { e.preventDefault(); saveRename(); } else if (e.key === 'Escape') editingName = false; }}
- onblur={saveRename}
- autofocus
- />
- {:else}
-
{$notebook$.name}
-
✎
- {/if}
+ {#if editingName}
+
{ if (e.key === 'Enter') { e.preventDefault(); saveRename(); } else if (e.key === 'Escape') editingName = false; }}
+ onblur={saveRename}
+ autofocus
+ />
+ {:else}
+
{$notebook$.name}
+
✎
+ {/if}
-
-
toggleNotebookFavorite(notebookId)}
- title={$notebook$.isFavorite ? 'Aus Sidebar entfernen' : 'In Sidebar anzeigen'}
- >★
-
-
-
-
upsertNotebook({ id: notebookId, isPrivate: false })}
- >Firma
-
upsertNotebook({ id: notebookId, isPrivate: true })}
- >Privat
+
+
+ upsertNotebook({ id: notebookId, isPrivate: false })}
+ >Firma
+ upsertNotebook({ id: notebookId, isPrivate: true })}
+ >Privat
+
-
+
+
+ Neue Seite
toggleNotebookFavorite(notebookId)}
+ title={$notebook$.isFavorite ? 'Aus Sidebar entfernen' : 'In Sidebar anzeigen'}
+ >{$notebook$.isFavorite ? '★ Sidebar' : '☆ Sidebar'}
+ confirmDelete = true}
>Löschen
-
+
{#each ($pages$ ?? []) as p (p.id)}
diff --git a/ka-note/server/ka-note.db-wal b/ka-note/server/ka-note.db-wal
index 9cacbe2..eaf8005 100644
Binary files a/ka-note/server/ka-note.db-wal and b/ka-note/server/ka-note.db-wal differ