diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-02 11:46:13 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-02 11:46:13 +0900 |
| commit | 023d0fcfce575030ee503c5f60df8c28dba7ab07 (patch) | |
| tree | 2f8ab3915f338232619ec66bb272e4756a96e021 /src/client/db | |
| parent | 13a3d16ffc88845d7bc65fb0778da9aaff53b653 (diff) | |
| download | kioku-023d0fcfce575030ee503c5f60df8c28dba7ab07.tar.gz kioku-023d0fcfce575030ee503c5f60df8c28dba7ab07.tar.zst kioku-023d0fcfce575030ee503c5f60df8c28dba7ab07.zip | |
feat(decks): make deck CRUD work fully offline-first
Create / Edit / Delete deck modals now write through localDeckRepository
and fire-and-forget syncActionAtom so the change is pushed when the
network is up. EditDeckModal reads its note-type list from the
local-first noteTypesAtom instead of fetching, and the "reconnect to..."
guards on the submit buttons are gone — the user can keep working while
offline.
Soft-delete intentionally does NOT cascade to notes/cards, matching the
server's existing deck.softDelete: the deck disappears from listings and
its children become unreachable that way.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'src/client/db')
| -rw-r--r-- | src/client/db/repositories.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/db/repositories.ts b/src/client/db/repositories.ts index 8d9a1fe..9f1d27c 100644 --- a/src/client/db/repositories.ts +++ b/src/client/db/repositories.ts @@ -63,7 +63,9 @@ export const localDeckRepository = { */ async update( id: string, - data: Partial<Pick<LocalDeck, "name" | "description">>, + data: Partial< + Pick<LocalDeck, "name" | "description" | "defaultNoteTypeId"> + >, ): Promise<LocalDeck | undefined> { const deck = await db.decks.get(id); if (!deck) return undefined; |
