diff --git a/ShhShell/Settings/AppSettings.swift b/ShhShell/Settings/AppSettings.swift index 431ef76..a65d4ce 100644 --- a/ShhShell/Settings/AppSettings.swift +++ b/ShhShell/Settings/AppSettings.swift @@ -6,6 +6,7 @@ // import Foundation +import SwiftUI struct AppSettings: Codable, Sendable { var scrollback: Int = 1_000 @@ -18,17 +19,26 @@ struct AppSettings: Codable, Sendable { var appIcon: AppIcon = .regular } -enum CursorStyle: Codable { +enum CursorStyle: Codable, CaseIterable { case block case bar } -enum TerminalFilter: Codable { +enum TerminalFilter: Codable, CaseIterable { case none case crt } -enum AppIcon: Codable { +enum AppIcon: Codable, CaseIterable { case regular case blueprint + + var image: Image { + switch self { + case .regular: + Image("Icon") + case .blueprint: + Image(uiImage: UIImage()) + } + } } diff --git a/ShhShell/Views/Settings/SettingsView.swift b/ShhShell/Views/Settings/SettingsView.swift index 6bff861..31973bf 100644 --- a/ShhShell/Views/Settings/SettingsView.swift +++ b/ShhShell/Views/Settings/SettingsView.swift @@ -20,9 +20,37 @@ struct SettingsView: View { Label("Scrollback", systemImage: "scroll") HStack { Slider(value: .constant(0), in: 1_000...50_000, step: 1_000) - Text("\()") + Text("hi") + } + + Picker("Cursor", selection: .constant(CursorStyle.bar)) { + ForEach(CursorStyle.allCases, id: \.self) { type in + Text("\(type)").tag(type) + } + } + + + + } + Toggle("location persistence", isOn: .constant(false)) + + Toggle("bell sound", isOn: .constant(false)) + Toggle("bell haptic", isOn: .constant(false)) + + Toggle("keep screen awake", isOn: .constant(false)) + + Picker("terminal filter", selection: .constant(TerminalFilter.crt)) { + ForEach(TerminalFilter.allCases, id: \.self) { filter in + Text("\(filter)").tag(filter) } } + + Picker("appicon", selection: .constant(AppIcon.regular)) { + ForEach(AppIcon.allCases, id: \.self) { icon in + Text("\(icon)").tag(icon) + icon.image + } + }.pickerStyle(.menu) } .listStyle(.sidebar) .scrollContentBackground(.hidden)