add dummy settings ui for everything

This commit is contained in:
neon443
2025-08-19 19:33:54 +01:00
parent 78bdb60350
commit 2338d0d108
2 changed files with 42 additions and 4 deletions

View File

@@ -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())
}
}
}

View File

@@ -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)