This commit is contained in:
2026-02-25 08:24:05 +01:00
parent 914d608d35
commit 3997f3feee
7 changed files with 504 additions and 105 deletions

View File

@@ -447,6 +447,40 @@ class SettingsService {
return !key.isEmpty
}
// MARK: - Bash Execution Settings
var bashEnabled: Bool {
get { cache["bashEnabled"] == "true" }
set {
cache["bashEnabled"] = String(newValue)
DatabaseService.shared.setSetting(key: "bashEnabled", value: String(newValue))
}
}
var bashRequireApproval: Bool {
get { cache["bashRequireApproval"].map { $0 == "true" } ?? true }
set {
cache["bashRequireApproval"] = String(newValue)
DatabaseService.shared.setSetting(key: "bashRequireApproval", value: String(newValue))
}
}
var bashWorkingDirectory: String {
get { cache["bashWorkingDirectory"] ?? "~" }
set {
cache["bashWorkingDirectory"] = newValue
DatabaseService.shared.setSetting(key: "bashWorkingDirectory", value: newValue)
}
}
var bashTimeout: Int {
get { cache["bashTimeout"].flatMap(Int.init) ?? 30 }
set {
cache["bashTimeout"] = String(newValue)
DatabaseService.shared.setSetting(key: "bashTimeout", value: String(newValue))
}
}
// MARK: - Paperless-NGX Settings
var paperlessEnabled: Bool {