Require Face ID to open the app and to send

This commit is contained in:
2026-09-27 23:35:26 +08:00
parent b989b0f791
commit 78e1cefad4
8 changed files with 172 additions and 7 deletions
+30
View File
@@ -0,0 +1,30 @@
import SwiftUI
/// Full-screen biometric lock, overlaid on the app whenever `model.locked`.
struct LockScreen: View {
var unlock: () -> Void
var body: some View {
ZStack {
Theme.background.ignoresSafeArea()
VStack(spacing: 16) {
Spacer()
Image(systemName: "lock.shield")
.font(.system(size: 44, weight: .light))
.foregroundStyle(Theme.accent)
Text("Koins is locked")
.font(.system(size: 22, weight: .bold))
.foregroundStyle(Theme.text)
Text("Authenticate to continue")
.font(.system(size: 13))
.foregroundStyle(Theme.muted)
Spacer()
PrimaryButton(title: "Unlock with \(Biometrics.label)", action: unlock)
Spacer()
}
.padding(24)
}
.preferredColorScheme(.dark)
.task { unlock() }
}
}