2020-06-28 21:21:43 +02:00
|
|
|
//
|
|
|
|
// SceneNavigationView.swift
|
|
|
|
// NetNewsWire
|
|
|
|
//
|
|
|
|
// Created by Maurice Parker on 6/28/20.
|
|
|
|
// Copyright © 2020 Ranchero Software. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import SwiftUI
|
|
|
|
|
|
|
|
struct SceneNavigationView: View {
|
2020-06-29 16:06:00 +02:00
|
|
|
|
|
|
|
#if os(iOS)
|
|
|
|
@Environment(\.horizontalSizeClass) private var horizontalSizeClass
|
|
|
|
#endif
|
|
|
|
|
|
|
|
var body: some View {
|
2020-06-28 21:21:43 +02:00
|
|
|
NavigationView {
|
|
|
|
#if os(macOS)
|
2020-06-29 20:14:03 +02:00
|
|
|
RegularSidebarContainerView()
|
2020-06-29 23:58:10 +02:00
|
|
|
.frame(minWidth: 100, idealWidth: 150, maxHeight: .infinity)
|
2020-06-28 21:21:43 +02:00
|
|
|
#else
|
2020-06-29 20:14:03 +02:00
|
|
|
if horizontalSizeClass == .compact {
|
|
|
|
CompactSidebarContainerView()
|
2020-07-01 15:06:40 +02:00
|
|
|
|
2020-06-29 20:14:03 +02:00
|
|
|
} else {
|
|
|
|
RegularSidebarContainerView()
|
|
|
|
}
|
2020-06-28 21:21:43 +02:00
|
|
|
#endif
|
|
|
|
|
2020-06-29 16:06:00 +02:00
|
|
|
#if os(iOS)
|
|
|
|
if horizontalSizeClass != .compact {
|
|
|
|
Text("Timeline")
|
|
|
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
|
|
|
}
|
|
|
|
#else
|
2020-06-28 21:21:43 +02:00
|
|
|
Text("Timeline")
|
|
|
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
2020-06-29 16:06:00 +02:00
|
|
|
#endif
|
2020-06-28 21:21:43 +02:00
|
|
|
|
|
|
|
#if os(macOS)
|
|
|
|
Text("None Selected")
|
|
|
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
|
|
|
.toolbar { Spacer() }
|
|
|
|
#else
|
|
|
|
Text("None Selected")
|
|
|
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
|
|
|
#endif
|
|
|
|
}
|
2020-07-01 15:06:40 +02:00
|
|
|
|
2020-06-28 21:21:43 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
struct NavigationView_Previews: PreviewProvider {
|
|
|
|
static var previews: some View {
|
2020-06-29 00:43:20 +02:00
|
|
|
SceneNavigationView()
|
2020-06-29 04:17:00 +02:00
|
|
|
.environmentObject(SceneModel())
|
2020-06-28 21:21:43 +02:00
|
|
|
}
|
|
|
|
}
|