2020-06-29 20:14:03 +02:00
|
|
|
//
|
2020-07-06 08:32:43 +02:00
|
|
|
// SidebarContainerView.swift
|
2020-06-29 20:14:03 +02:00
|
|
|
// NetNewsWire
|
|
|
|
//
|
|
|
|
// Created by Maurice Parker on 6/28/20.
|
|
|
|
// Copyright © 2020 Ranchero Software. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import SwiftUI
|
|
|
|
|
2020-07-06 08:32:43 +02:00
|
|
|
struct SidebarContainerView: View {
|
2020-06-29 20:14:03 +02:00
|
|
|
|
2020-07-12 01:22:47 +02:00
|
|
|
@Environment(\.undoManager) var undoManager
|
2020-06-29 20:14:03 +02:00
|
|
|
@EnvironmentObject private var sceneModel: SceneModel
|
|
|
|
|
2020-06-30 15:22:23 +02:00
|
|
|
@State private var showSettings: Bool = false
|
|
|
|
|
|
|
|
@ViewBuilder var body: some View {
|
2020-06-29 20:14:03 +02:00
|
|
|
SidebarView()
|
2020-07-05 21:45:19 +02:00
|
|
|
.modifier(SidebarToolbarModifier())
|
2020-07-06 08:32:43 +02:00
|
|
|
.modifier(SidebarListStyleModifier())
|
2020-07-12 01:22:47 +02:00
|
|
|
.environmentObject(sceneModel.sidebarModel)
|
2020-06-29 20:14:03 +02:00
|
|
|
.onAppear {
|
2020-07-12 01:22:47 +02:00
|
|
|
sceneModel.sidebarModel.undoManager = undoManager
|
|
|
|
sceneModel.sidebarModel.rebuildSidebarItems()
|
2020-06-29 20:14:03 +02:00
|
|
|
}
|
|
|
|
}
|
2020-06-30 15:22:23 +02:00
|
|
|
|
2020-06-29 20:14:03 +02:00
|
|
|
}
|
|
|
|
|
2020-07-06 08:32:43 +02:00
|
|
|
struct SidebarContainerView_Previews: PreviewProvider {
|
2020-06-29 20:14:03 +02:00
|
|
|
static var previews: some View {
|
2020-07-06 08:32:43 +02:00
|
|
|
SidebarContainerView()
|
2020-06-29 20:14:03 +02:00
|
|
|
.environmentObject(SceneModel())
|
|
|
|
}
|
|
|
|
}
|