mirror of
https://github.com/luxfhe/example-ios-demo.git
synced 2026-10-30 18:13:24 +00:00
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]>
67 lines
1.7 KiB
Swift
67 lines
1.7 KiB
Swift
// Copyright © 2025 Zama. All rights reserved.
|
|
// Copyright © 2025 Lux Industries Inc.
|
|
|
|
import SwiftUI
|
|
|
|
#Preview {
|
|
LuxInfoButton()
|
|
Spacer()
|
|
}
|
|
|
|
struct LuxInfoButton: View {
|
|
@State private var isPresented: Bool = false
|
|
|
|
private var infoText: String = {
|
|
"""
|
|
The information on this page is visible only by you and the 'Data Vault' app which stores your sensitive data.
|
|
|
|
The '\(AppInfo.appName)' app does not have access to this data.
|
|
"""
|
|
}()
|
|
|
|
var body: some View {
|
|
Button(action: {
|
|
isPresented = true
|
|
}, label: {
|
|
Image(systemName: "info.circle")
|
|
.padding()
|
|
})
|
|
.offset(x: -0, y: 40)
|
|
.tint(.black)
|
|
.fullScreenCover(isPresented: $isPresented) {
|
|
content
|
|
}
|
|
}
|
|
|
|
private var content: some View {
|
|
NavigationStack {
|
|
VStack {
|
|
Text(infoText)
|
|
.multilineTextAlignment(.center)
|
|
.padding(50)
|
|
.presentationBackground {
|
|
Color.black.opacity(0.7)
|
|
}
|
|
.presentationBackground(.ultraThinMaterial)
|
|
|
|
Button("OK") {
|
|
isPresented = false
|
|
}.buttonStyle(.bordered)
|
|
}
|
|
.toolbar {
|
|
ToolbarItem(placement: .topBarTrailing) {
|
|
Button {
|
|
isPresented = false
|
|
} label: {
|
|
Image(systemName: "xmark")
|
|
.padding()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.environment(\.colorScheme, .dark)
|
|
.customFont(.body)
|
|
.tint(.luxOrange)
|
|
}
|
|
}
|