Files
zeekayandHanzo Dev c8bfbebc15 Keep ZAMA's copyright notices
This app is ZAMA's BSD 3-Clause Clear demo. The license requires its notices to
survive redistribution, and a rebrand had replaced every one of them with ours:
the LICENSE text, 66 source headers and the app's copyright string. They are
back, each with our line beside it for our changes.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-23 01:55:03 -07:00

50 lines
1.1 KiB
Swift

// Copyright © 2025 Zama. All rights reserved.
// Copyright © 2025 Lux Industries Inc.
import Foundation
enum ActivityStatus {
case progress(String)
case error(String)
}
enum CustomError: LocalizedError {
case missingServerKey
var errorDescription: String {
switch self {
case .missingServerKey: "Missing ServerKey - Open DataVault to regenerate one."
}
}
}
import SwiftUI
struct AsyncStatus: View {
private let status: ActivityStatus
init(_ status: ActivityStatus) {
self.status = status
}
var body: some View {
VStack {
switch status {
case .progress(let string):
Text(string)
Spacer().overlay {
ProgressView()
.tint(nil)
}
Text("This process might take some time.")
case .error(let string):
Text("⚠️ " + string)
}
}
.foregroundStyle(.secondary)
.customFont(.callout)
.fontWeight(.regular)
}
}