feat(mac): reuse running gateway

This commit is contained in:
Peter Steinberger
2025-12-09 19:00:07 +00:00
parent b11b33b63c
commit 85ca2152e4
3 changed files with 64 additions and 8 deletions

View File

@@ -4,6 +4,7 @@ import SwiftUI
struct GeneralSettings: View {
@ObservedObject var state: AppState
@ObservedObject private var healthStore = HealthStore.shared
@ObservedObject private var gatewayManager = GatewayProcessManager.shared
@State private var isInstallingCLI = false
@State private var cliStatus: String?
@State private var cliInstalled = false
@@ -278,6 +279,12 @@ struct GeneralSettings: View {
.foregroundStyle(.secondary)
}
if case let .attachedExisting(details) = self.gatewayManager.status {
Text(details ?? "Using existing gateway instance")
.font(.caption)
.foregroundStyle(.secondary)
}
HStack(spacing: 10) {
Button {
Task { await self.installGateway() }