1
0
mirror of https://github.com/metabolist/metatext synced 2025-01-14 19:07:05 +01:00
metatext-app-ios-iphone-ipad/Shared/Views/SettingsView.swift
Justin Mazzocchi 5ca8d84604
A lot of stuff
2020-07-31 14:40:57 -07:00

34 lines
1014 B
Swift

// Copyright © 2020 Metabolist. All rights reserved.
import SwiftUI
struct SettingsView: View {
@StateObject var viewModel: SettingsViewModel
@EnvironmentObject var sceneViewModel: SceneViewModel
var body: some View {
NavigationView {
Form {
Text(viewModel.identity.handle)
}
.navigationBarTitle(Text("settings"), displayMode: .inline)
.navigationBarItems(
leading: Button {
sceneViewModel.presentingSettings.toggle()
} label: {
Image(systemName: "xmark.circle.fill").imageScale(.large)
})
}
.navigationViewStyle(StackNavigationViewStyle())
}
}
#if DEBUG
struct SettingsView_Previews: PreviewProvider {
static var previews: some View {
SettingsView(viewModel: SettingsViewModel(identity: .development))
.environmentObject(SceneViewModel.development)
}
}
#endif