2026-01-30 03:15:10 +01:00
|
|
|
import OpenClawKit
|
2025-12-12 21:18:54 +00:00
|
|
|
import SwiftUI
|
|
|
|
|
|
|
|
|
|
struct ScreenTab: View {
|
2025-12-14 05:04:58 +00:00
|
|
|
@Environment(NodeAppModel.self) private var appModel
|
2025-12-12 21:18:54 +00:00
|
|
|
|
|
|
|
|
var body: some View {
|
2025-12-13 00:50:20 +00:00
|
|
|
ZStack(alignment: .top) {
|
|
|
|
|
ScreenWebView(controller: self.appModel.screen)
|
|
|
|
|
.ignoresSafeArea()
|
|
|
|
|
.overlay(alignment: .top) {
|
2026-02-08 18:08:13 +01:00
|
|
|
if let errorText = self.appModel.screen.errorText,
|
|
|
|
|
self.appModel.gatewayServerName == nil
|
|
|
|
|
{
|
2025-12-13 00:50:20 +00:00
|
|
|
Text(errorText)
|
|
|
|
|
.font(.footnote)
|
|
|
|
|
.padding(10)
|
|
|
|
|
.background(.thinMaterial)
|
|
|
|
|
.clipShape(RoundedRectangle(cornerRadius: 12, style: .continuous))
|
|
|
|
|
.padding()
|
2025-12-12 21:18:54 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-19 00:52:52 +01:00
|
|
|
// Navigation is agent-driven; no local URL bar here.
|
2025-12-12 21:18:54 +00:00
|
|
|
}
|