mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
add dummy settings ui for everything
This commit is contained in:
@@ -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())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user