mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
Use only tab navigation on iPhone
This commit is contained in:
parent
0c7af0351b
commit
ef401168ec
@ -5,6 +5,14 @@ import SwiftUI
|
|||||||
struct Constants {
|
struct Constants {
|
||||||
static let yatteeProtocol = "yattee://"
|
static let yatteeProtocol = "yattee://"
|
||||||
static let overlayAnimation = Animation.linear(duration: 0.2)
|
static let overlayAnimation = Animation.linear(duration: 0.2)
|
||||||
|
static var isIPhone: Bool {
|
||||||
|
#if os(iOS)
|
||||||
|
UIDevice.current.userInterfaceIdiom == .phone
|
||||||
|
#else
|
||||||
|
false
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
static var progressViewScale: Double {
|
static var progressViewScale: Double {
|
||||||
#if os(macOS)
|
#if os(macOS)
|
||||||
0.4
|
0.4
|
||||||
|
@ -25,11 +25,15 @@ struct ContentView: View {
|
|||||||
var body: some View {
|
var body: some View {
|
||||||
Group {
|
Group {
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
|
if Constants.isIPhone {
|
||||||
|
AppTabNavigation()
|
||||||
|
} else {
|
||||||
if horizontalSizeClass == .compact {
|
if horizontalSizeClass == .compact {
|
||||||
AppTabNavigation()
|
AppTabNavigation()
|
||||||
} else {
|
} else {
|
||||||
AppSidebarNavigation()
|
AppSidebarNavigation()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#elseif os(macOS)
|
#elseif os(macOS)
|
||||||
AppSidebarNavigation()
|
AppSidebarNavigation()
|
||||||
#elseif os(tvOS)
|
#elseif os(tvOS)
|
||||||
|
Loading…
Reference in New Issue
Block a user