style(macos): swiftformat
This commit is contained in:
@@ -153,12 +153,11 @@ enum PiOAuthStore {
|
||||
}
|
||||
}
|
||||
|
||||
private extension Data {
|
||||
func base64URLEncodedString() -> String {
|
||||
extension Data {
|
||||
fileprivate func base64URLEncodedString() -> String {
|
||||
self.base64EncodedString()
|
||||
.replacingOccurrences(of: "+", with: "-")
|
||||
.replacingOccurrences(of: "/", with: "_")
|
||||
.replacingOccurrences(of: "=", with: "")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -475,7 +475,8 @@ struct OnboardingView: View {
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
Text("Workspace")
|
||||
.font(.headline)
|
||||
Text(self.workspacePath.isEmpty ? AgentWorkspace.displayPath(for: ClawdisConfigFile.defaultWorkspaceURL()) : self.workspacePath)
|
||||
Text(self.workspacePath.isEmpty ? AgentWorkspace
|
||||
.displayPath(for: ClawdisConfigFile.defaultWorkspaceURL()) : self.workspacePath)
|
||||
.font(.callout)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
@@ -491,7 +492,8 @@ struct OnboardingView: View {
|
||||
}
|
||||
}
|
||||
.buttonStyle(.borderedProminent)
|
||||
.disabled(self.identityApplying || self.identityName.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty)
|
||||
.disabled(self.identityApplying || self.identityName.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
.isEmpty)
|
||||
|
||||
Button("Open workspace") {
|
||||
let url = AgentWorkspace.resolveWorkspaceURL(from: self.workspacePath)
|
||||
|
||||
@@ -48,7 +48,7 @@ enum WindowPlacement {
|
||||
fallback: ((NSScreen?) -> NSRect)? = nil)
|
||||
{
|
||||
let frame = window.frame
|
||||
let targetScreens = NSScreen.screens.isEmpty ? [NSScreen.main].compactMap { $0 } : NSScreen.screens
|
||||
let targetScreens = NSScreen.screens.isEmpty ? [NSScreen.main].compactMap(\.self) : NSScreen.screens
|
||||
let isVisibleSomewhere = targetScreens.contains { screen in
|
||||
frame.intersects(screen.visibleFrame.insetBy(dx: 12, dy: 12))
|
||||
}
|
||||
@@ -56,7 +56,7 @@ enum WindowPlacement {
|
||||
if isVisibleSomewhere { return }
|
||||
|
||||
let screen = NSScreen.main ?? targetScreens.first
|
||||
let next = fallback?(screen) ?? centeredFrame(size: defaultSize, on: screen)
|
||||
let next = fallback?(screen) ?? self.centeredFrame(size: defaultSize, on: screen)
|
||||
window.setFrame(next, display: false)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user