mirror of
https://github.com/pepaskopec-blip/Graduately.git
synced 2026-10-27 15:14:35 +00:00
Add a native SwiftUI macOS app that shares the iOS player.
The GTK Mac build stays; CI now also publishes maturita-macos-swift. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
11eb14e136
commit
58e3a75f21
33 changed files with 1415 additions and 128 deletions
|
|
@ -85,93 +85,3 @@ private struct UpdateAccessory: View {
|
|||
return vm.tr(vm.update.messageKey)
|
||||
}
|
||||
}
|
||||
|
||||
struct RouteDestination: View {
|
||||
@ObservedObject var vm: AppModel
|
||||
let route: Route
|
||||
|
||||
var body: some View {
|
||||
switch route {
|
||||
case .welcome, .subjects:
|
||||
PracticeHome(vm: vm)
|
||||
case .stats:
|
||||
StatsScreen(vm: vm)
|
||||
case .roadmap:
|
||||
RoadmapScreen(vm: vm)
|
||||
case .unitMap(let id):
|
||||
UnitMapScreen(vm: vm, unitId: id)
|
||||
case .germanEx(let unit, let ex):
|
||||
GermanExercise(vm: vm, unitId: unit, ex: ex)
|
||||
case .vocab(let id):
|
||||
VocabExercise(vm: vm, unitId: id)
|
||||
case .netYears:
|
||||
NetYearsScreen(vm: vm)
|
||||
case .netMap:
|
||||
LessonListScreen(
|
||||
title: vm.tr("net_year1"),
|
||||
subtitle: vm.tr("net_sub"),
|
||||
rows: vm.content.netLessons.map { l in
|
||||
let id = l.int("id")
|
||||
return LessonRow(
|
||||
id: "n\(id)",
|
||||
title: vm.tr(l.str("titleKey")),
|
||||
done: vm.progress.netDone(id),
|
||||
destination: .netLesson(id)
|
||||
)
|
||||
}
|
||||
)
|
||||
case .netLesson(let id):
|
||||
if let l = vm.content.netLesson(id) {
|
||||
SlidesScreen(vm: vm, title: vm.tr(l.str("titleKey")), subtitle: vm.tr(l.str("subKey")), slides: l.arr("slides"), next: .netEx(id))
|
||||
}
|
||||
case .netEx(let id):
|
||||
NetQuizScreen(vm: vm, id: id)
|
||||
case .hwMap:
|
||||
LessonListScreen(
|
||||
title: vm.tr("Technické vybavení"),
|
||||
subtitle: vm.tr("hw_sub"),
|
||||
rows: vm.content.hw.map { l in
|
||||
let id = l.int("id")
|
||||
return LessonRow(
|
||||
id: "h\(id)",
|
||||
title: vm.tr(l.str("titleKey")),
|
||||
done: vm.progress.hwDone(id),
|
||||
destination: .hwLesson(id)
|
||||
)
|
||||
}
|
||||
)
|
||||
case .hwLesson(let id):
|
||||
if let l = vm.content.hwLesson(id) {
|
||||
SlidesScreen(vm: vm, title: vm.tr(l.str("titleKey")), subtitle: vm.tr(l.str("subKey")), slides: l.arr("slides"), next: .hwEx(id))
|
||||
}
|
||||
case .hwEx(let id):
|
||||
HwQuizScreen(vm: vm, id: id)
|
||||
case .czechMap:
|
||||
CzechMapScreen(vm: vm)
|
||||
case .mluvnice:
|
||||
LessonListScreen(
|
||||
title: vm.tr("Mluvnice"),
|
||||
subtitle: vm.tr("mluv_sub"),
|
||||
rows: vm.content.mluvnice.map { m in
|
||||
let n = m.int("id")
|
||||
return LessonRow(
|
||||
id: "m\(n)",
|
||||
title: m.str("name"),
|
||||
done: vm.progress.mluvDone(n),
|
||||
destination: .mluvEx(n)
|
||||
)
|
||||
}
|
||||
)
|
||||
case .mluvEx(let n):
|
||||
MluvExercise(vm: vm, n: n)
|
||||
case .readingList:
|
||||
BookListScreen(vm: vm)
|
||||
case .book(let id):
|
||||
BookScreen(vm: vm, id: id)
|
||||
case .bookQuiz(let id):
|
||||
LitQuizScreen(vm: vm, id: id)
|
||||
case .bookPlot(let id):
|
||||
PlotScreen(vm: vm, id: id)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue