summaryrefslogtreecommitdiff
path: root/Sora/Views/Settings/SettingsDetailsView.swift
blob: 29b9e76719282f6eb6901ec2906789d13c11d6a3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import SwiftUI

struct SettingsDetailsView: View {
    @EnvironmentObject var settings: Settings

    var body: some View {
        #if os(macOS)
            Text("Details")
                .font(.headline)

            HStack {
                Text("Detail View Type")

                Spacer()

                Picker("", selection: $settings.detailViewType) {
                    ForEach(PostFileType.allCases, id: \.self) { type in
                        Text(type.rawValue.capitalized).tag(type)
                    }
                }
                .frame(width: 150)
            }
        #else
            Picker("Detail View Type", selection: $settings.detailViewType) {
                ForEach(PostFileType.allCases, id: \.self) { type in
                    Text(type.rawValue.capitalized).tag(type)
                }
            }
        #endif
    }
}