mirror of
https://github.com/pepaskopec-blip/Graduately.git
synced 2026-10-28 23:54:34 +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
|
|
@ -49,7 +49,11 @@ struct PrimaryButton: View {
|
|||
.font(.body.weight(.semibold))
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
#if os(iOS)
|
||||
.buttonStyle(.glassProminent)
|
||||
#else
|
||||
.buttonStyle(.borderedProminent)
|
||||
#endif
|
||||
.controlSize(.large)
|
||||
}
|
||||
}
|
||||
|
|
@ -250,17 +254,39 @@ extension View {
|
|||
|
||||
/// Detail screens with their own bottom action hide the tab bar so the
|
||||
/// primary button is never covered by it.
|
||||
@ViewBuilder
|
||||
func detailScreen(_ title: String, subtitle: String? = nil) -> some View {
|
||||
#if os(iOS)
|
||||
navigationTitle(title)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.navSubtitle(subtitle)
|
||||
.toolbar(.hidden, for: .tabBar)
|
||||
#else
|
||||
navigationTitle(title)
|
||||
.navSubtitle(subtitle)
|
||||
#endif
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
func sheetDetents() -> some View {
|
||||
#if os(iOS)
|
||||
presentationDetents([.medium, .large])
|
||||
.presentationDragIndicator(.visible)
|
||||
#else
|
||||
self
|
||||
#endif
|
||||
}
|
||||
|
||||
/// Full-width, leading-aligned content for exercise screens.
|
||||
func exerciseContent() -> some View {
|
||||
#if os(macOS)
|
||||
frame(maxWidth: 720, alignment: .leading)
|
||||
.padding(20)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
#else
|
||||
frame(maxWidth: .infinity, alignment: .leading)
|
||||
.padding()
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue