feat: 添加 Anki APKG 导入/导出功能

- 添加 APKG 解析器 (src/lib/anki/apkg-parser.ts)
- 添加 APKG 导出器 (src/lib/anki/apkg-exporter.ts)
- 添加导入/导出 Server Actions
- 添加导入/导出 UI 组件
- 集成到牌组页面
- 添加 i18n 翻译

同时修复断链:
- /folders → /decks (Navbar, signup, profile)
This commit is contained in:
2026-03-11 10:37:23 +08:00
parent 4d4062985d
commit 7ba31a37bd
13 changed files with 1654 additions and 32 deletions

View File

@@ -456,6 +456,60 @@
"view": "View"
}
},
"decks": {
"title": "Decks",
"subtitle": "Manage your flashcard decks",
"newDeck": "New Deck",
"enterDeckName": "Enter deck name:",
"confirmDelete": "Type \"{name}\" to delete:",
"noDecksYet": "No decks yet",
"deckInfo": "ID: {id} • {totalCards} cards",
"loading": "Loading...",
"public": "Public",
"private": "Private",
"setPublic": "Set Public",
"setPrivate": "Set Private",
"enterNewName": "Enter new name:",
"importApkg": "Import APKG",
"exportApkg": "Export APKG",
"clickToUpload": "Click to upload .apkg file",
"apkgFilesOnly": "APKG files only",
"parsing": "Parsing file...",
"foundDecks": "Found {count} deck(s)",
"deckName": "Deck Name",
"back": "Back",
"import": "Import",
"importing": "Importing...",
"exportSuccess": "Deck exported successfully",
"goToDecks": "Go to Decks"
},
"decks": {
"title": "Decks",
"subtitle": "Manage your flashcard decks",
"newDeck": "New Deck",
"noDecksYet": "No decks yet",
"loading": "Loading...",
"deckInfo": "ID: {id} • {totalCards} cards",
"enterDeckName": "Enter deck name:",
"enterNewName": "Enter new name:",
"confirmDelete": "Type \"{name}\" to delete:",
"public": "Public",
"private": "Private",
"setPublic": "Set Public",
"setPrivate": "Set Private",
"importApkg": "Import APKG",
"exportApkg": "Export APKG",
"clickToUpload": "Click to upload an APKG file",
"apkgFilesOnly": "Only .apkg files are supported",
"parsing": "Parsing...",
"foundDecks": "Found {count} deck(s)",
"deckName": "Deck Name",
"back": "Back",
"import": "Import",
"importing": "Importing...",
"exportSuccess": "Deck exported successfully",
"goToDecks": "Go to Decks"
},
"follow": {
"follow": "Follow",
"following": "Following",