refactor(big-bang): cards-native → wordeck-native
Code + Identity-Rename zur Vorbereitung auf Apple-Dev-Portal-Aktion (Bundle ev.mana.wordeck, App-Group group.ev.mana.wordeck, AASA applinks:wordeck.com). Build bleibt funktional, aber gegen die neue text-only-API können image-occlusion-Creates 422 zurückgeben — das wird mit der Wordeck-Native v1.0-Welle (parallele Apple-Aktion) sauber gemacht. Umbenennung: - 41 Files: cardecky/Cardecky → wordeck/Wordeck (Display, Strings, Kommentare) - 57 Files: CardsNative → WordeckNative, CardsAPI → WordeckAPI, CardsTheme → WordeckTheme, CardsBrand → WordeckBrand, CardsWidget → WordeckWidget, CardsDueWidget → WordeckDueWidget - Bundle-ID ev.mana.cardecky → ev.mana.wordeck (project.yml, Info.plist, entitlements, Keychain-Service, App-Group) - AASA applinks:cardecky.mana.how → applinks:wordeck.com - API-Base cardecky-api.mana.how → api.wordeck.com - 10 Files renamed (App-Entry, API-Extensions, Theme, Widget, Entitlements, Tests) - xcodeproj regenerated via xcodegen → WordeckNative.xcodeproj - MaskRegionsTests.swift gelöscht (image-occlusion entfällt mit Wordeck text-only) Forgejo-Repo git.mana.how/till/cards-native → wordeck-native umbenannt (Auto-Redirect aktiv). Lokales Verzeichnis Code/cards-native/ bleibt vorerst — wird beim nächsten Apple-Setup mit Bundle-Test umbenannt. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4f154bfb39
commit
542082772a
83 changed files with 691 additions and 648 deletions
|
|
@ -26,12 +26,12 @@ struct MultipleChoiceCardView: View {
|
|||
VStack(alignment: .leading, spacing: 16) {
|
||||
text(card.fields["front"] ?? "")
|
||||
.font(.title3)
|
||||
.foregroundStyle(CardsTheme.foreground)
|
||||
.foregroundStyle(WordeckTheme.foreground)
|
||||
|
||||
switch phase {
|
||||
case .loading:
|
||||
ProgressView()
|
||||
.tint(CardsTheme.primary)
|
||||
.tint(WordeckTheme.primary)
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.top, 12)
|
||||
|
||||
|
|
@ -46,13 +46,13 @@ struct MultipleChoiceCardView: View {
|
|||
} else {
|
||||
Text("Nicht genug andere Karten im Deck für Multiple-Choice — tippe auf »Antwort anzeigen«.")
|
||||
.font(.caption)
|
||||
.foregroundStyle(CardsTheme.mutedForeground)
|
||||
.foregroundStyle(WordeckTheme.mutedForeground)
|
||||
}
|
||||
|
||||
case .failed:
|
||||
Text("Distractors konnten nicht geladen werden.")
|
||||
.font(.caption)
|
||||
.foregroundStyle(CardsTheme.error)
|
||||
.foregroundStyle(WordeckTheme.error)
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
|
|
@ -76,7 +76,7 @@ struct MultipleChoiceCardView: View {
|
|||
.frame(width: 22)
|
||||
Text(option)
|
||||
.font(.subheadline)
|
||||
.foregroundStyle(CardsTheme.foreground)
|
||||
.foregroundStyle(WordeckTheme.foreground)
|
||||
.multilineTextAlignment(.leading)
|
||||
Spacer(minLength: 0)
|
||||
}
|
||||
|
|
@ -100,51 +100,51 @@ struct MultipleChoiceCardView: View {
|
|||
if isFlipped {
|
||||
if isCorrect {
|
||||
Image(systemName: "checkmark.circle.fill")
|
||||
.foregroundStyle(CardsTheme.success)
|
||||
.foregroundStyle(WordeckTheme.success)
|
||||
} else if isSelected {
|
||||
Image(systemName: "xmark.circle.fill")
|
||||
.foregroundStyle(CardsTheme.error)
|
||||
.foregroundStyle(WordeckTheme.error)
|
||||
} else {
|
||||
Image(systemName: "circle")
|
||||
.foregroundStyle(CardsTheme.mutedForeground.opacity(0.4))
|
||||
.foregroundStyle(WordeckTheme.mutedForeground.opacity(0.4))
|
||||
}
|
||||
} else if isSelected {
|
||||
Image(systemName: "largecircle.fill.circle")
|
||||
.foregroundStyle(CardsTheme.primary)
|
||||
.foregroundStyle(WordeckTheme.primary)
|
||||
} else {
|
||||
Image(systemName: "circle")
|
||||
.foregroundStyle(CardsTheme.mutedForeground.opacity(0.4))
|
||||
.foregroundStyle(WordeckTheme.mutedForeground.opacity(0.4))
|
||||
}
|
||||
}
|
||||
|
||||
private func background(isCorrect: Bool, isSelected: Bool) -> Color {
|
||||
if isFlipped {
|
||||
if isCorrect { return CardsTheme.success.opacity(0.12) }
|
||||
if isSelected { return CardsTheme.error.opacity(0.10) }
|
||||
return CardsTheme.surfaceHover
|
||||
if isCorrect { return WordeckTheme.success.opacity(0.12) }
|
||||
if isSelected { return WordeckTheme.error.opacity(0.10) }
|
||||
return WordeckTheme.surfaceHover
|
||||
}
|
||||
return isSelected
|
||||
? CardsTheme.primary.opacity(0.10)
|
||||
: CardsTheme.surface
|
||||
? WordeckTheme.primary.opacity(0.10)
|
||||
: WordeckTheme.surface
|
||||
}
|
||||
|
||||
private func border(isCorrect: Bool, isSelected: Bool) -> Color {
|
||||
if isFlipped {
|
||||
if isCorrect { return CardsTheme.success.opacity(0.55) }
|
||||
if isSelected { return CardsTheme.error.opacity(0.55) }
|
||||
return CardsTheme.border
|
||||
if isCorrect { return WordeckTheme.success.opacity(0.55) }
|
||||
if isSelected { return WordeckTheme.error.opacity(0.55) }
|
||||
return WordeckTheme.border
|
||||
}
|
||||
return isSelected ? CardsTheme.primary.opacity(0.5) : CardsTheme.border
|
||||
return isSelected ? WordeckTheme.primary.opacity(0.5) : WordeckTheme.border
|
||||
}
|
||||
|
||||
/// Fallback wenn nicht genug Distractors: zeigt die Antwort
|
||||
/// direkt nach Flip, ohne Auswahl-Spiel.
|
||||
private var answerOnlyView: some View {
|
||||
VStack(alignment: .leading, spacing: 6) {
|
||||
Divider().background(CardsTheme.border)
|
||||
Divider().background(WordeckTheme.border)
|
||||
Text(card.fields["answer"] ?? "")
|
||||
.font(.title3)
|
||||
.foregroundStyle(CardsTheme.primary)
|
||||
.foregroundStyle(WordeckTheme.primary)
|
||||
.padding(.top, 4)
|
||||
}
|
||||
}
|
||||
|
|
@ -163,7 +163,7 @@ struct MultipleChoiceCardView: View {
|
|||
private func loadOptions() async {
|
||||
phase = .loading
|
||||
selected = nil
|
||||
let api = CardsAPI(auth: auth)
|
||||
let api = WordeckAPI(auth: auth)
|
||||
let answer = card.fields["answer"] ?? ""
|
||||
|
||||
var distractors: [String] = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue