style: swiftformat cleanup

This commit is contained in:
Peter Steinberger
2025-12-21 03:44:12 +01:00
parent 3810519671
commit 04e3d0c2fe
3 changed files with 16 additions and 11 deletions

View File

@@ -79,5 +79,4 @@ enum ClawdisConfigFile {
root["inbound"] = inbound root["inbound"] = inbound
self.saveDict(root) self.saveDict(root)
} }
} }

View File

@@ -120,16 +120,16 @@ struct SkillsSettings: View {
} }
private var filteredSkills: [SkillStatus] { private var filteredSkills: [SkillStatus] {
return self.model.skills.filter { skill in self.model.skills.filter { skill in
switch self.filter { switch self.filter {
case .all: case .all:
return true true
case .ready: case .ready:
return !skill.disabled && skill.eligible !skill.disabled && skill.eligible
case .needsSetup: case .needsSetup:
return !skill.disabled && !skill.eligible !skill.disabled && !skill.eligible
case .disabled: case .disabled:
return skill.disabled skill.disabled
} }
} }
} }
@@ -338,12 +338,18 @@ private struct SkillRow: View {
Button("Install on This Mac") { self.onInstall(option, .local) } Button("Install on This Mac") { self.onInstall(option, .local) }
.buttonStyle(.bordered) .buttonStyle(.bordered)
.disabled(self.isBusy) .disabled(self.isBusy)
.help(self.localInstallNeedsSwitch ? "Switches to Local mode to install on this Mac." : "") .help(
self.localInstallNeedsSwitch
? "Switches to Local mode to install on this Mac."
: "")
} else { } else {
Button("Install on This Mac") { self.onInstall(option, .local) } Button("Install on This Mac") { self.onInstall(option, .local) }
.buttonStyle(.borderedProminent) .buttonStyle(.borderedProminent)
.disabled(self.isBusy) .disabled(self.isBusy)
.help(self.localInstallNeedsSwitch ? "Switches to Local mode to install on this Mac." : "") .help(
self.localInstallNeedsSwitch
? "Switches to Local mode to install on this Mac."
: "")
} }
} }
} }

View File

@@ -294,9 +294,9 @@ struct TailscaleIntegrationSection: View {
self.statusMessage = nil self.statusMessage = nil
let trimmedPassword = self.password.trimmingCharacters(in: .whitespacesAndNewlines) let trimmedPassword = self.password.trimmingCharacters(in: .whitespacesAndNewlines)
if (self.tailscaleMode == .funnel || (self.tailscaleMode == .serve && self.requireCredentialsForServe)) if (self.tailscaleMode == .funnel || (self.tailscaleMode == .serve && self.requireCredentialsForServe)),
&& self.authMode == .password self.authMode == .password,
&& trimmedPassword.isEmpty trimmedPassword.isEmpty
{ {
self.validationMessage = "Password required for this mode." self.validationMessage = "Password required for this mode."
return return