feat(decks): Card-Liste im DeckDetailView + listCards-API
Bisher zeigte DeckDetailView nur 4 Action-Buttons (Lernen, Hinzufügen, Bearbeiten, Löschen) — Karten waren nur via Study-Loop sichtbar. User-Feedback: "ich sehe keine Karten im Deck". Geändert: - CardsAPI.listCards(deckId:) → [Card] (war nur cardCount via /total) - CardListResponse: nimmt cards-Array zusätzlich zu total - DeckDetailView: ScrollView statt VStack, neue Sektion "Karten" unter den Action-Buttons mit CardPreviewRow pro Karte - CardPreviewRow: Type-Icon + Front-Preview (basic/cloze/audio/ image-occlusion adaptiv) + Type-Label - task(id:) + refreshable triggern loadCards() - Nach CardEditor-Save reloaded die Liste Build 4 → 5. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f528ea448a
commit
e8b898a51d
4 changed files with 169 additions and 17 deletions
|
|
@ -121,6 +121,7 @@ struct DeckListResponse: Decodable, Sendable {
|
|||
|
||||
/// Server-Response von `GET /api/v1/cards?deck_id=...`.
|
||||
struct CardListResponse: Decodable, Sendable {
|
||||
let cards: [Card]
|
||||
let total: Int
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue