mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-27 15:17:38 +00:00
50 lines
1.2 KiB
Swift
50 lines
1.2 KiB
Swift
import Foundation
|
|
|
|
// Shared configuration enums used across the application
|
|
|
|
// MARK: - Authentication Mode
|
|
|
|
/// Represents the available authentication modes for dashboard access
|
|
enum AuthenticationMode: String, CaseIterable {
|
|
case none = "none"
|
|
case osAuth = "os"
|
|
case sshKeys = "ssh"
|
|
case both = "both"
|
|
|
|
var displayName: String {
|
|
switch self {
|
|
case .none: "None"
|
|
case .osAuth: "macOS"
|
|
case .sshKeys: "SSH Keys"
|
|
case .both: "macOS + SSH Keys"
|
|
}
|
|
}
|
|
|
|
var description: String {
|
|
switch self {
|
|
case .none: "Anyone can access the dashboard (not recommended)"
|
|
case .osAuth: "Use your macOS username and password"
|
|
case .sshKeys: "Use SSH keys from ~/.ssh/authorized_keys"
|
|
case .both: "Allow both authentication methods"
|
|
}
|
|
}
|
|
}
|
|
|
|
// MARK: - Title Mode
|
|
|
|
/// Represents the terminal window title display modes
|
|
enum TitleMode: String, CaseIterable {
|
|
case none = "none"
|
|
case filter = "filter"
|
|
case `static` = "static"
|
|
case dynamic = "dynamic"
|
|
|
|
var displayName: String {
|
|
switch self {
|
|
case .none: "None"
|
|
case .filter: "Filter"
|
|
case .static: "Static"
|
|
case .dynamic: "Dynamic"
|
|
}
|
|
}
|
|
}
|