Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Coder-Desktop/Coder-Desktop/VPN/VPNSystemExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Foundation
import os
import SystemExtensions

enum SystemExtensionState: Equatable, Sendable {
enum SystemExtensionState: Equatable {
case uninstalled
case needsUserApproval
case installed
Expand Down
12 changes: 6 additions & 6 deletions Coder-Desktop/Coder-Desktop/Views/ButtonRow.swift
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import SwiftUI

struct ButtonRowView<Label: View>: View {
init(highlightColor: Color = .accentColor, isSelected: Bool = false, label: @escaping () -> Label) {
init(highlightColor: Color = .accentColor, isSelected: Bool = false, @ViewBuilder label: () -> Label) {
self.highlightColor = highlightColor
self.isSelected = isSelected
self.label = label
_isSelected = State(initialValue: isSelected)
self.label = label()
}

let highlightColor: Color
@State private var isSelected: Bool = false
@ViewBuilder var label: () -> Label
@State private var isSelected: Bool
let label: Label

var body: some View {
HStack(spacing: 0) {
label()
label
Spacer()
}
.padding(.horizontal, Theme.Size.trayPadding)
Expand Down
2 changes: 1 addition & 1 deletion Coder-Desktop/Coder-Desktop/Views/Util.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private struct ActivationPolicyModifier: ViewModifier {
NSApp.setActivationPolicy(.regular)
}
.onDisappear {
if NSApp.windows.filter({ $0.level != .statusBar && $0.isVisible }).count <= 1 {
if NSApp.windows.count(where: { $0.level != .statusBar && $0.isVisible }) <= 1 {
NSApp.setActivationPolicy(.accessory)
}
}
Expand Down
2 changes: 1 addition & 1 deletion Coder-Desktop/CoderSDK/HTTP.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public struct HTTPHeader: Sendable, Codable {
}
}

enum HTTPMethod: String, Equatable, Hashable, Sendable {
enum HTTPMethod: String, Equatable, Hashable {
case get = "GET"
case post = "POST"
case delete = "DELETE"
Expand Down
2 changes: 1 addition & 1 deletion Coder-Desktop/CoderSDK/UserAgent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public enum CoderComponent: String, Sendable {
}

/// Go's `GOARCH` spelling, so a single pattern matches the CLI, the vpn-daemon and Desktop client.
enum GoArch: String, Sendable {
enum GoArch: String {
case arm64
case amd64
}
Expand Down
2 changes: 1 addition & 1 deletion Coder-Desktop/VPNLibTests/CoderRouterTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ struct CoderRouterTests {
router = CoderRouter()
}

struct RouteTestCase: CustomStringConvertible, Sendable {
struct RouteTestCase: CustomStringConvertible {
let urlString: String
let expectedRoute: CoderRoute?
let description: String
Expand Down
4 changes: 2 additions & 2 deletions Coder-Desktop/VPNLibTests/SpeakerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Testing
@testable import VPNLib

@Suite(.timeLimit(.minutes(1)))
struct SpeakerTests: Sendable {
struct SpeakerTests {
let pipeMT = Pipe()
let pipeTM = Pipe()
let uut: Speaker<Vpn_TunnelMessage, Vpn_ManagerMessage>
Expand Down Expand Up @@ -121,7 +121,7 @@ struct SpeakerTests: Sendable {
}

@Suite(.timeLimit(.minutes(1)))
struct ManagerSpeakerTests: Sendable {
struct ManagerSpeakerTests {
let pipeMT = Pipe()
let pipeTM = Pipe()
let queue: DispatchQueue = .global(qos: .utility)
Expand Down
1 change: 1 addition & 0 deletions Coder-Desktop/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ targets:
DEVELOPMENT_ASSET_PATHS: '"Coder-Desktop/Preview Content"' # Adds development assets.
ENABLE_HARDENED_RUNTIME: YES
ENABLE_PREVIEWS: YES
INFOPLIST_KEY_LSApplicationCategoryType: "public.app-category.developer-tools"
INFOPLIST_KEY_LSUIElement: YES
INFOPLIST_KEY_NSHumanReadableCopyright: ""
SWIFT_EMIT_LOC_STRINGS: YES
Expand Down
Loading