import SwiftUI import HaloDesign /// Während ein Weg zum Server gesucht wird. struct ConnectingView: View { let serverName: String var body: some View { VStack(spacing: HaloSpacing.loose) { ProgressView() Text(serverName.isEmpty ? String(localized: "connecting.searching") : String(localized: "connecting.to \(serverName)")) .font(.haloBody) .foregroundStyle(Color.haloTextSecondary) } .frame(maxWidth: .infinity, maxHeight: .infinity) .background(Color.haloCanvas) } } /// Wenn etwas schiefgegangen ist. struct ConnectionFailureView: View { let message: String let onRetry: () -> Void let onSignOut: () -> Void var body: some View { ContentUnavailableView { Label("error.title", systemImage: "exclamationmark.triangle") } description: { Text(message) } actions: { Button("action.retry", action: onRetry).buttonStyle(.borderedProminent) Button("action.signOut", action: onSignOut) .foregroundStyle(Color.haloTextSecondary) } .background(Color.haloCanvas) } }