Files
openclaw/apps/macos/Sources/OpenClaw/DashboardHandoffSettingsView.swift
Peter Steinberger 777cfed85a feat(mac): hand off gateway-owned settings panes to the dashboard (#115999)
* feat(mac): hand off gateway-owned settings panes to the dashboard

Gateway-config Settings tabs (Channels, Skills, Cron Jobs, Threads,
Instances) now default to a native handoff page with an Open in Dashboard
deep link; a Debug toggle re-enables the legacy native panes. Adds an
openclaw:native-navigate host->shell event with generation-guarded URL
fallback, and lifts the dashboard route map + same-app path validation
into OpenClawKit for future iOS reuse. Exec Approvals stays native: the
Dashboard's host-native policy editor is read-only by contract.

* fix(mac): satisfy native-i18n inventory and type budget

* fix(mac): refresh native i18n source locations
2026-07-29 14:12:42 -04:00

40 lines
1.2 KiB
Swift

import SwiftUI
struct DashboardHandoffSettingsView: View {
let tab: SettingsTab
let dashboardRoute: String
var body: some View {
VStack(spacing: 18) {
Spacer()
Image(systemName: self.tab.systemImage)
.font(.system(size: 42, weight: .medium))
.foregroundStyle(.secondary)
VStack(spacing: 7) {
Text(self.tab.title)
.font(.title2.weight(.semibold))
Text("This configuration lives on your gateway and is managed in the Dashboard.")
.font(.callout)
.foregroundStyle(.secondary)
.multilineTextAlignment(.center)
}
Button("Open in Dashboard") {
Task { await DashboardManager.shared.show(atPath: self.dashboardRoute) }
}
.buttonStyle(.borderedProminent)
.controlSize(.large)
Text("The legacy native pane can be re-enabled in Settings > Debug.")
.font(.caption)
.foregroundStyle(.tertiary)
Spacer()
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.padding(32)
}
}