From c1d24e24449808e4235fa586fbeb5760a36bc6bb Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 31 Dec 2025 01:29:39 +0900 Subject: feat(client): add note-related tables to client IndexedDB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add LocalNoteType, LocalNoteFieldType, LocalNote, and LocalNoteFieldValue interfaces and tables to the client database for Anki-compatible note system. Update LocalCard interface with noteId and isReversed fields. Includes Dexie schema version 2 with upgrade handler for existing cards. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/client/sync/pull.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/client/sync/pull.ts') diff --git a/src/client/sync/pull.ts b/src/client/sync/pull.ts index 333782c..fa0899b 100644 --- a/src/client/sync/pull.ts +++ b/src/client/sync/pull.ts @@ -28,6 +28,8 @@ export interface ServerDeck { export interface ServerCard { id: string; deckId: string; + noteId?: string | null; + isReversed?: boolean | null; front: string; back: string; state: number; @@ -104,6 +106,8 @@ function serverCardToLocal(card: ServerCard): LocalCard { return { id: card.id, deckId: card.deckId, + noteId: card.noteId ?? null, + isReversed: card.isReversed ?? null, front: card.front, back: card.back, state: card.state as CardStateType, -- cgit v1.2.3-70-g09d2