mirror of
https://github.com/yattee/yattee.git
synced 2024-11-10 08:18:19 +00:00
46 lines
916 B
Swift
46 lines
916 B
Swift
import Defaults
|
|
import SwiftUI
|
|
|
|
struct ViewOptionsView: View {
|
|
@EnvironmentObject private var profile: Profile
|
|
|
|
@Environment(\.dismiss) private var dismiss
|
|
@Default(.layout) var layout
|
|
|
|
var body: some View {
|
|
HStack {
|
|
VStack {
|
|
Spacer()
|
|
|
|
HStack(alignment: .center) {
|
|
Spacer()
|
|
|
|
VStack {
|
|
nextLayoutButton
|
|
|
|
Button("Close") {
|
|
dismiss()
|
|
}
|
|
}
|
|
|
|
Spacer()
|
|
}
|
|
|
|
Spacer()
|
|
}
|
|
|
|
Spacer()
|
|
}
|
|
.background(.thinMaterial)
|
|
}
|
|
|
|
var nextLayoutButton: some View {
|
|
Button(layout.next().name, action: nextLayout)
|
|
}
|
|
|
|
func nextLayout() {
|
|
Defaults[.layout] = layout.next()
|
|
dismiss()
|
|
}
|
|
}
|