Require Face ID to open the app and to send
This commit is contained in:
@@ -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() }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user