Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Update passkey registration UI, refactor folder structure (#520)

Leendert de Borst9a3df923b5bb
diff --git a/apps/mobile-app/ios/VaultUI/Components/LoadingOverlayView.swift b/apps/mobile-app/ios/VaultUI/Components/LoadingOverlayView.swift
new file mode 100644
index 000000000..fc0a33ff6
--- /dev/null
+++ b/apps/mobile-app/ios/VaultUI/Components/LoadingOverlayView.swift
@@ -0,0 +1,83 @@
+import SwiftUI
+
+/// Loading overlay component with AliasVault branding
+public struct LoadingOverlayView: View {
+ let message: String
+
+ @Environment(\.colorScheme) private var colorScheme
+ @State private var animatingDots: [Bool] = [false, false, false, false]
+ @State private var textDots = ""
+ @State private var timer: Timer?
+
+ public init(message: String) {
+ self.message = message
+ }
+
+ public var body: some View {
+ VStack(spacing: 0) {
+ Spacer()
+
+ VStack(spacing: 0) {
+ // AliasVault logo animation - four pulsing dots
+ HStack(spacing: 10) {
+ ForEach(0..<4) { index in
+ Circle()
+ .fill(ColorConstants.Light.tertiary)
+ .frame(width: 8, height: 8)
+ .opacity(animatingDots[index] ? 1.0 : 0.3)
+ .animation(
+ Animation.easeInOut(duration: 0.7)
+ .repeatForever(autoreverses: true)
+ .delay(Double(index) * 0.2),
+ value: animatingDots[index]
+ )
+ }
+ }
+ .padding(12)
+ .padding(.horizontal, 12)
+ .background(
+ RoundedRectangle(cornerRadius: 20)
+ .fill(colorScheme == .dark ? Color.clear : Color.white)
+ .overlay(
+ RoundedRectangle(cornerRadius: 20)
+ .stroke(ColorConstants.Light.tertiary, lineWidth: 5)
+ )
+ .shadow(color: Color.black.opacity(0.05), radius: 2, x: 0, y: 1)
+ )
+
+ // Loading message with animated dots
+ if !message.isEmpty {
+ Text(message + textDots)
+ .font(.body)
+ .foregroundColor(colorScheme == .dark ? ColorConstants.Dark.text : ColorConstants.Light.text)
+ .multilineTextAlignment(.center)
+ .padding(.horizontal)
+ .padding(.top, 16)
+ }
+ }
+ .padding(20)
+
+ Spacer()
+ }
+ .onAppear {
+ // Start dot animations
+ for index in 0..<4 {
+ animatingDots[index] = true
+ }
+
+ // Start text dots animation
+ let textTimer = Timer.scheduledTimer(withTimeInterval: 0.4, repeats: true) { _ in
+ if textDots.count >= 3 {
+ textDots = ""
+ } else {
+ textDots += "."
+ }
+ }
+ timer = textTimer
+ }
+ .onDisappear {
+ timer?.invalidate()
+ timer = nil
+ }
+ }
+}
diff --git a/apps/mobile-app/ios/VaultUI/Views/Passkey/Components/CompactInfoRow.swift b/apps/mobile-app/ios/VaultUI/Registration/Passkeys/Components/CompactInfoRow.swift
similarity index 89%
rename from apps/mobile-app/ios/VaultUI/Views/Passkey/Components/CompactInfoRow.swift
rename to apps/mobile-app/ios/VaultUI/Registration/Passkeys/Components/CompactInfoRow.swift
index e193398e1..caadef75e 100644
--- a/apps/mobile-app/ios/VaultUI/Views/Passkey/Components/CompactInfoRow.swift
+++ b/apps/mobile-app/ios/VaultUI/Registration/Passkeys/Components/CompactInfoRow.swift
@@ -1,7 +1,7 @@
import SwiftUI
-/// Compact info row component for displaying read-only information
-struct CompactInfoRow: View {
+/// Info row component for displaying read-only information
+struct InfoRow: View {
let label: String
let value: String
let icon: String
diff --git a/apps/mobile-app/ios/VaultUI/Views/Passkey/Components/ExistingPasskeyRow.swift b/apps/mobile-app/ios/VaultUI/Registration/Passkeys/Components/ExistingPasskeyRow.swift
similarity index 100%
rename from apps/mobile-app/ios/VaultUI/Views/Passkey/Components/ExistingPasskeyRow.swift
rename to apps/mobile-app/ios/VaultUI/Registration/Passkeys/Components/ExistingPasskeyRow.swift
diff --git a/apps/mobile-app/ios/VaultUI/Views/Passkey/Components/PasskeyRegistrationHeader.swift b/apps/mobile-app/ios/VaultUI/Registration/Passkeys/Components/PasskeyRegistrationHeader.swift
similarity index 100%
rename from apps/mobile-app/ios/VaultUI/Views/Passkey/Components/PasskeyRegistrationHeader.swift
rename to apps/mobile-app/ios/VaultUI/Registration/Passkeys/Components/PasskeyRegistrationHeader.swift
diff --git a/apps/mobile-app/ios/VaultUI/Views/Passkey/Components/PasskeyTitleInput.swift b/apps/mobile-app/ios/VaultUI/Registration/Passkeys/Components/PasskeyTitleInput.swift
similarity index 100%
rename from apps/mobile-app/ios/VaultUI/Views/Passkey/Components/PasskeyTitleInput.swift
rename to apps/mobile-app/ios/VaultUI/Registration/Passkeys/Components/PasskeyTitleInput.swift
diff --git a/apps/mobile-app/ios/VaultUI/Views/Passkey/PasskeyNavigationDestination.swift b/apps/mobile-app/ios/VaultUI/Registration/Passkeys/Enums/PasskeyNavigationDestination.swift
similarity index 100%
rename from apps/mobile-app/ios/VaultUI/Views/Passkey/PasskeyNavigationDestination.swift
rename to apps/mobile-app/ios/VaultUI/Registration/Passkeys/Enums/PasskeyNavigationDestination.swift
diff --git a/apps/mobile-app/ios/VaultUI/Registration/Passkeys/PasskeyFormView.swift b/apps/mobile-app/ios/VaultUI/Registration/Passkeys/PasskeyFormView.swift
new file mode 100644
index 000000000..cf0a26588
--- /dev/null
+++ b/apps/mobile-app/ios/VaultUI/Registration/Passkeys/PasskeyFormView.swift
@@ -0,0 +1,131 @@
+import SwiftUI
+
+private let locBundle = Bundle.vaultUI
+
+/// Form view for creating or replacing a passkey
+struct PasskeyFormView: View {
+ @ObservedObject var viewModel: PasskeyRegistrationViewModel
+ let isReplaceMode: Bool
+ let replacingPasskeyId: UUID?
+
+ @Environment(\.colorScheme) private var colorScheme
+ @FocusState private var isTitleFocused: Bool
+
+ var replacingPasskey: PasskeyWithCredentialInfo? {
+ guard let id = replacingPasskeyId else { return nil }
+ return viewModel.existingPasskeys.first(where: { $0.id == id })
+ }
+
+ var isTitleValid: Bool {
+ !viewModel.displayName.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty
+ }
+
+ var body: some View {
+ ZStack {
+ // Background color
+ (colorScheme == .dark ? ColorConstants.Dark.background : ColorConstants.Light.background)
+ .ignoresSafeArea()
+
+ VStack(spacing: 16) {
+ ScrollView {
+ VStack(spacing: 16) {
+ // Notice section
+ if isReplaceMode {
+ // Warning and explanation for replacing
+ if let passkey = replacingPasskey {
+ VStack(spacing: 12) {
+ HStack(spacing: 12) {
+ Image(systemName: "info.circle.fill")
+ .foregroundColor(ColorConstants.Light.primary)
+ Text(String(localized: "replace_passkey_explanation", bundle: locBundle))
+ .font(.caption)
+ .foregroundColor(colorScheme == .dark ? ColorConstants.Dark.textMuted : ColorConstants.Light.textMuted)
+ .fixedSize(horizontal: false, vertical: true)
+ }
+ }
+ .padding(.horizontal)
+ .padding(.top, 8)
+ }
+ } else {
+ // Informational notice for creating new
+ VStack(spacing: 8) {
+ HStack(spacing: 12) {
+ Image(systemName: "info.circle.fill")
+ .foregroundColor(ColorConstants.Light.primary)
+ Text(String(localized: "create_passkey_explanation", bundle: locBundle))
+ .font(.caption)
+ .foregroundColor(colorScheme == .dark ? ColorConstants.Dark.textMuted : ColorConstants.Light.textMuted)
+ .fixedSize(horizontal: false, vertical: true)
+ }
+ .padding()
+ .background(ColorConstants.Light.primary.opacity(0.1))
+ .cornerRadius(8)
+ }
+ .padding(.horizontal)
+ .padding(.top, 8)
+ }
+
+ // Editable title field
+ PasskeyTitleInput(title: $viewModel.displayName, focusState: $isTitleFocused)
+ .padding(.top, 8)
+
+ // Request details (compact, read-only)
+ VStack(spacing: 8) {
+ InfoRow(
+ label: String(localized: "website", bundle: locBundle),
+ value: viewModel.rpId,
+ icon: "globe"
+ )
+
+ if let userName = viewModel.userName {
+ InfoRow(
+ label: String(localized: "username", bundle: locBundle),
+ value: userName,
+ icon: "person.fill"
+ )
+ }
+ }
+ .padding(.horizontal)
+ }
+ }
+
+ // Action button
+ Button(action: {
+ viewModel.createPasskey()
+ }, label: {
+ HStack {
+ Image(systemName: "key.fill")
+ Text(isReplaceMode
+ ? String(localized: "confirm_replace", bundle: locBundle)
+ : String(localized: "create_passkey_button_confirm", bundle: locBundle))
+ }
+ .padding()
+ .frame(maxWidth: .infinity)
+ .background(isTitleValid ? ColorConstants.Light.primary : Color.gray)
+ .foregroundColor(.white)
+ .cornerRadius(8)
+ })
+ .disabled(!isTitleValid)
+ .padding(.horizontal)
+ .padding(.bottom, 20)
+ }
+ .opacity(viewModel.isLoading ? 0.3 : 1.0)
+ .disabled(viewModel.isLoading)
+
+ // Loading overlay
+ if viewModel.isLoading {
+ LoadingOverlayView(message: viewModel.loadingMessage)
+ }
+ }
+ .navigationTitle(isReplaceMode
+ ? String(localized: "replace_passkey_title", bundle: locBundle)
+ : String(localized: "create_passkey_title", bundle: locBundle))
+ .navigationBarTitleDisplayMode(.inline)
+ .onAppear {
+ // Auto-focus the title field
+ DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
+ isTitleFocused = true
+ }
+ }
+ }
+}
diff --git a/apps/mobile-app/ios/VaultUI/Views/Passkey/PasskeyRegistrationView.swift b/apps/mobile-app/ios/VaultUI/Registration/Passkeys/PasskeyRegistrationView.swift
similarity index 77%
rename from apps/mobile-app/ios/VaultUI/Views/Passkey/PasskeyRegistrationView.swift
rename to apps/mobile-app/ios/VaultUI/Registration/Passkeys/PasskeyRegistrationView.swift
index f8bfff3cb..e186b5a7c 100644
--- a/apps/mobile-app/ios/VaultUI/Views/Passkey/PasskeyRegistrationView.swift
+++ b/apps/mobile-app/ios/VaultUI/Registration/Passkeys/PasskeyRegistrationView.swift
@@ -56,7 +56,7 @@ public struct PasskeyRegistrationView: View {
// MARK: - Selection Content (Inline)
private var selectionContent: some View {
- VStack(spacing: 16) {
+ VStack(spacing: 36) {
// Create new button
Button(action: {
viewModel.handleCreateNew()
@@ -73,23 +73,9 @@ public struct PasskeyRegistrationView: View {
.cornerRadius(8)
})
- // Divider
- HStack {
- Rectangle()
- .fill(colorScheme == .dark ? ColorConstants.Dark.textMuted : ColorConstants.Light.textMuted)
- .frame(height: 1)
- Text(String(localized: "or", bundle: locBundle))
- .font(.caption)
- .foregroundColor(colorScheme == .dark ? ColorConstants.Dark.textMuted : ColorConstants.Light.textMuted)
- Rectangle()
- .fill(colorScheme == .dark ? ColorConstants.Dark.textMuted : ColorConstants.Light.textMuted)
- .frame(height: 1)
- }
- .padding(.horizontal)
-
// Existing passkeys list
- VStack(alignment: .leading, spacing: 8) {
- Text(String(localized: "select_passkey_to_replace", bundle: locBundle))
+ VStack(alignment: .leading, spacing: 12) {
+ Text(String(localized: "select_passkey_to_replace", bundle: locBundle) + ":")
.font(.subheadline)
.fontWeight(.medium)
.foregroundColor(colorScheme == .dark ? ColorConstants.Dark.text : ColorConstants.Light.text)
@@ -131,21 +117,41 @@ public struct PasskeyRegistrationView: View {
@FocusState private var isTitleFocused: Bool
+ private var isTitleValid: Bool {
+ !viewModel.displayName.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty
+ }
+
private var createFormContent: some View {
VStack(spacing: 16) {
+ // Informational notice
+ VStack(spacing: 8) {
+ HStack(spacing: 12) {
+ Image(systemName: "info.circle.fill")
+ .foregroundColor(ColorConstants.Light.primary)
+ Text(String(localized: "create_passkey_explanation", bundle: locBundle))
+ .font(.caption)
+ .foregroundColor(colorScheme == .dark ? ColorConstants.Dark.textMuted : ColorConstants.Light.textMuted)
+ .fixedSize(horizontal: false, vertical: true)
+ }
+ .padding()
+ .background(ColorConstants.Light.primary.opacity(0.1))
+ .cornerRadius(8)
+ }
+ .padding(.horizontal)
+
// Editable title field
PasskeyTitleInput(title: $viewModel.displayName, focusState: $isTitleFocused)
// Request details (compact, read-only)
VStack(spacing: 8) {
- CompactInfoRow(
+ InfoRow(
label: String(localized: "website", bundle: locBundle),
value: viewModel.rpId,
icon: "globe"
)
if let userName = viewModel.userName {
- CompactInfoRow(
+ InfoRow(
label: String(localized: "username", bundle: locBundle),
value: userName,
icon: "person.fill"
@@ -167,10 +173,11 @@ public struct PasskeyRegistrationView: View {
}
.padding()
.frame(maxWidth: .infinity)
- .background(ColorConstants.Light.primary)
+ .background(isTitleValid ? ColorConstants.Light.primary : Color.gray)
.foregroundColor(.white)
.cornerRadius(8)
})
+ .disabled(!isTitleValid)
Button(action: {
viewModel.cancel()
@@ -213,83 +220,6 @@ public struct PasskeyRegistrationView: View {
}
}
-/// Loading overlay component with AliasVault branding
-private struct LoadingOverlayView: View {
- let message: String
- @Environment(\.colorScheme) private var colorScheme
- @State private var animatingDots: [Bool] = [false, false, false, false]
- @State private var textDots = ""
- @State private var timer: Timer?
-
- var body: some View {
- VStack(spacing: 0) {
- Spacer()
-
- VStack(spacing: 0) {
- // AliasVault logo animation - four pulsing dots
- HStack(spacing: 10) {
- ForEach(0..<4) { index in
- Circle()
- .fill(ColorConstants.Light.tertiary)
- .frame(width: 8, height: 8)
- .opacity(animatingDots[index] ? 1.0 : 0.3)
- .animation(
- Animation.easeInOut(duration: 0.7)
- .repeatForever(autoreverses: true)
- .delay(Double(index) * 0.2),
- value: animatingDots[index]
- )
- }
- }
- .padding(12)
- .padding(.horizontal, 12)
- .background(
- RoundedRectangle(cornerRadius: 20)
- .fill(colorScheme == .dark ? Color.clear : Color.white)
- .overlay(
- RoundedRectangle(cornerRadius: 20)
- .stroke(ColorConstants.Light.tertiary, lineWidth: 5)
- )
- .shadow(color: Color.black.opacity(0.05), radius: 2, x: 0, y: 1)
- )
-
- // Loading message with animated dots
- if !message.isEmpty {
- Text(message + textDots)
- .font(.body)
- .foregroundColor(colorScheme == .dark ? ColorConstants.Dark.text : ColorConstants.Light.text)
- .multilineTextAlignment(.center)
- .padding(.horizontal)
- .padding(.top, 16)
- }
- }
- .padding(20)
-
- Spacer()
- }
- .onAppear {
- // Start dot animations
- for index in 0..<4 {
- animatingDots[index] = true
- }
-
- // Start text dots animation
- let textTimer = Timer.scheduledTimer(withTimeInterval: 0.4, repeats: true) { _ in
- if textDots.count >= 3 {
- textDots = ""
- } else {
- textDots += "."
- }
- }
- timer = textTimer
- }
- .onDisappear {
- timer?.invalidate()
- timer = nil
- }
- }
-}
-
/// View model for passkey registration
public class PasskeyRegistrationViewModel: ObservableObject {
@Published public var requestId: String
@@ -349,6 +279,13 @@ public class PasskeyRegistrationViewModel: ObservableObject {
}
public func createPasskey() {
+ // Validate title is not empty
+ let trimmedTitle = displayName.trimmingCharacters(in: .whitespacesAndNewlines)
+ guard !trimmedTitle.isEmpty else {
+ print("PasskeyRegistration: Cannot create passkey with empty title")
+ return
+ }
+
// Trigger passkey creation in Swift
print("PasskeyRegistration: Create passkey button clicked, replace mode: \(selectedPasskeyToReplace != nil)")
completionHandler(true)
diff --git a/apps/mobile-app/ios/VaultUI/Components/CredentialCardView.swift b/apps/mobile-app/ios/VaultUI/Selection/Components/CredentialCardView.swift
similarity index 100%
rename from apps/mobile-app/ios/VaultUI/Components/CredentialCardView.swift
rename to apps/mobile-app/ios/VaultUI/Selection/Components/CredentialCardView.swift
diff --git a/apps/mobile-app/ios/VaultUI/Components/SearchBar.swift b/apps/mobile-app/ios/VaultUI/Selection/Components/SearchBar.swift
similarity index 100%
rename from apps/mobile-app/ios/VaultUI/Components/SearchBar.swift
rename to apps/mobile-app/ios/VaultUI/Selection/Components/SearchBar.swift
diff --git a/apps/mobile-app/ios/VaultUI/Views/CredentialProviderView.swift b/apps/mobile-app/ios/VaultUI/Selection/CredentialProviderView.swift
similarity index 100%
rename from apps/mobile-app/ios/VaultUI/Views/CredentialProviderView.swift
rename to apps/mobile-app/ios/VaultUI/Selection/CredentialProviderView.swift
diff --git a/apps/mobile-app/ios/VaultUI/Views/PasskeyProviderView.swift b/apps/mobile-app/ios/VaultUI/Selection/PasskeyProviderView.swift
similarity index 100%
rename from apps/mobile-app/ios/VaultUI/Views/PasskeyProviderView.swift
rename to apps/mobile-app/ios/VaultUI/Selection/PasskeyProviderView.swift
diff --git a/apps/mobile-app/ios/VaultUI/Utils/CredentialFilter.swift b/apps/mobile-app/ios/VaultUI/Selection/Utils/CredentialFilter.swift
similarity index 100%
rename from apps/mobile-app/ios/VaultUI/Utils/CredentialFilter.swift
rename to apps/mobile-app/ios/VaultUI/Selection/Utils/CredentialFilter.swift
diff --git a/apps/mobile-app/ios/VaultUI/Views/Passkey/PasskeyFormView.swift b/apps/mobile-app/ios/VaultUI/Views/Passkey/PasskeyFormView.swift
deleted file mode 100644
index 1cb11a798..000000000
--- a/apps/mobile-app/ios/VaultUI/Views/Passkey/PasskeyFormView.swift
+++ /dev/null
@@ -1,179 +0,0 @@
-import SwiftUI
-
-private let locBundle = Bundle.vaultUI
-
-/// Form view for creating or replacing a passkey
-struct PasskeyFormView: View {
- @ObservedObject var viewModel: PasskeyRegistrationViewModel
- let isReplaceMode: Bool
- let replacingPasskeyId: UUID?
-
- @Environment(\.colorScheme) private var colorScheme
- @FocusState private var isTitleFocused: Bool
-
- var replacingPasskey: PasskeyWithCredentialInfo? {
- guard let id = replacingPasskeyId else { return nil }
- return viewModel.existingPasskeys.first(where: { $0.id == id })
- }
-
- var body: some View {
- ZStack {
- VStack(spacing: 16) {
- ScrollView {
- VStack(spacing: 16) {
- // Warning and explanation if replacing
- if isReplaceMode, let passkey = replacingPasskey {
- VStack(spacing: 12) {
- // Explanation text
- VStack(alignment: .leading, spacing: 8) {
- Text(String(localized: "replace_passkey_explanation", bundle: locBundle))
- .font(.subheadline)
- .foregroundColor(colorScheme == .dark ? ColorConstants.Dark.textMuted : ColorConstants.Light.textMuted)
- .fixedSize(horizontal: false, vertical: true)
- }
- .padding(.horizontal, 4)
- }
- .padding(.horizontal)
- .padding(.top, 8)
- }
-
- // Editable title field
- PasskeyTitleInput(title: $viewModel.displayName, focusState: $isTitleFocused)
- .padding(.top, isReplaceMode ? 8 : 8)
-
- // Request details (compact, read-only)
- VStack(spacing: 8) {
- CompactInfoRow(
- label: String(localized: "website", bundle: locBundle),
- value: viewModel.rpId,
- icon: "globe"
- )
-
- if let userName = viewModel.userName {
- CompactInfoRow(
- label: String(localized: "username", bundle: locBundle),
- value: userName,
- icon: "person.fill"
- )
- }
- }
- .padding(.horizontal)
- }
- }
-
- // Action button
- Button(action: {
- viewModel.createPasskey()
- }, label: {
- HStack {
- Image(systemName: "key.fill")
- Text(isReplaceMode
- ? String(localized: "confirm_replace", bundle: locBundle)
- : String(localized: "create_passkey_button_confirm", bundle: locBundle))
- }
- .padding()
- .frame(maxWidth: .infinity)
- .background(ColorConstants.Light.primary)
- .foregroundColor(.white)
- .cornerRadius(8)
- })
- .padding(.horizontal)
- .padding(.bottom, 20)
- }
- .opacity(viewModel.isLoading ? 0.3 : 1.0)
- .disabled(viewModel.isLoading)
-
- // Loading overlay
- if viewModel.isLoading {
- LoadingOverlayView(message: viewModel.loadingMessage)
- }
- }
- .navigationTitle(isReplaceMode
- ? String(localized: "replace_passkey_title", bundle: locBundle)
- : String(localized: "create_passkey_title", bundle: locBundle))
- .navigationBarTitleDisplayMode(.inline)
- .onAppear {
- // Auto-focus the title field
- DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
- isTitleFocused = true
- }
- }
- }
-}
-
-/// Loading overlay component with AliasVault branding
-private struct LoadingOverlayView: View {
- let message: String
- @Environment(\.colorScheme) private var colorScheme
- @State private var animatingDots: [Bool] = [false, false, false, false]
- @State private var textDots = ""
- @State private var timer: Timer?
-
- var body: some View {
- VStack(spacing: 0) {
- Spacer()
-
- VStack(spacing: 0) {
- // AliasVault logo animation - four pulsing dots
- HStack(spacing: 10) {
- ForEach(0..<4) { index in
- Circle()
- .fill(ColorConstants.Light.tertiary)
- .frame(width: 8, height: 8)
- .opacity(animatingDots[index] ? 1.0 : 0.3)
- .animation(
- Animation.easeInOut(duration: 0.7)
- .repeatForever(autoreverses: true)
- .delay(Double(index) * 0.2),
- value: animatingDots[index]
- )
- }
- }
- .padding(12)
- .padding(.horizontal, 12)
- .background(
- RoundedRectangle(cornerRadius: 20)
- .fill(colorScheme == .dark ? Color.clear : Color.white)
- .overlay(
- RoundedRectangle(cornerRadius: 20)
- .stroke(ColorConstants.Light.tertiary, lineWidth: 5)
- )
- .shadow(color: Color.black.opacity(0.05), radius: 2, x: 0, y: 1)
- )
-
- // Loading message with animated dots
- if !message.isEmpty {
- Text(message + textDots)
- .font(.body)
- .foregroundColor(colorScheme == .dark ? ColorConstants.Dark.text : ColorConstants.Light.text)
- .multilineTextAlignment(.center)
- .padding(.horizontal)
- .padding(.top, 16)
- }
- }
- .padding(20)
-
- Spacer()
- }
- .onAppear {
- // Start dot animations
- for index in 0..<4 {
- animatingDots[index] = true
- }
-
- // Start text dots animation
- let textTimer = Timer.scheduledTimer(withTimeInterval: 0.4, repeats: true) { _ in
- if textDots.count >= 3 {
- textDots = ""
- } else {
- textDots += "."
- }
- }
- timer = textTimer
- }
- .onDisappear {
- timer?.invalidate()
- timer = nil
- }
- }
-}
diff --git a/apps/mobile-app/ios/VaultUI/Views/Passkey/PasskeySelectionView.swift b/apps/mobile-app/ios/VaultUI/Views/Passkey/PasskeySelectionView.swift
deleted file mode 100644
index 57de2eefe..000000000
--- a/apps/mobile-app/ios/VaultUI/Views/Passkey/PasskeySelectionView.swift
+++ /dev/null
@@ -1,78 +0,0 @@
-import SwiftUI
-
-private let locBundle = Bundle.vaultUI
-
-/// Selection view for choosing between creating new or replacing existing passkey
-struct PasskeySelectionView: View {
- @ObservedObject var viewModel: PasskeyRegistrationViewModel
- @Environment(\.colorScheme) private var colorScheme
-
- var body: some View {
- VStack(spacing: 24) {
- // Create new button
- NavigationLink(value: PasskeyNavigationDestination.createNew) {
- HStack {
- Image(systemName: "key.fill")
- Text(String(localized: "create_new_passkey", bundle: locBundle))
- }
- .padding()
- .frame(maxWidth: .infinity)
- .background(ColorConstants.Light.primary)
- .foregroundColor(.white)
- .cornerRadius(8)
- }
- .buttonStyle(PlainButtonStyle())
-
- // Divider
- HStack {
- Rectangle()
- .fill(colorScheme == .dark ? ColorConstants.Dark.textMuted : ColorConstants.Light.textMuted)
- .frame(height: 1)
- Text(String(localized: "or", bundle: locBundle))
- .font(.caption)
- .foregroundColor(colorScheme == .dark ? ColorConstants.Dark.textMuted : ColorConstants.Light.textMuted)
- Rectangle()
- .fill(colorScheme == .dark ? ColorConstants.Dark.textMuted : ColorConstants.Light.textMuted)
- .frame(height: 1)
- }
- .padding(.horizontal)
-
- // Existing passkeys list
- VStack(alignment: .leading, spacing: 8) {
- Text(String(localized: "select_passkey_to_replace", bundle: locBundle))
- .font(.subheadline)
- .fontWeight(.medium)
- .foregroundColor(colorScheme == .dark ? ColorConstants.Dark.text : ColorConstants.Light.text)
- .padding(.horizontal)
-
- ScrollView {
- VStack(spacing: 8) {
- ForEach(viewModel.existingPasskeys) { passkeyInfo in
- NavigationLink(value: PasskeyNavigationDestination.replace(passkeyInfo.id)) {
- ExistingPasskeyRow(passkey: passkeyInfo)
- }
- .buttonStyle(PlainButtonStyle())
- }
- }
- }
- .frame(maxHeight: 200)
- }
-
- Spacer()
-
- // Cancel button
- Button(action: {
- viewModel.cancel()
- }, label: {
- Text(String(localized: "cancel", bundle: locBundle))
- .padding()
- .frame(maxWidth: .infinity)
- .foregroundColor(ColorConstants.Light.primary)
- })
- }
- .padding(.horizontal)
- .padding(.bottom, 20)
- .navigationTitle(String(localized: "create_passkey_title", bundle: locBundle))
- .navigationBarTitleDisplayMode(.inline)
- }
-}
diff --git a/apps/mobile-app/ios/VaultUI/en.lproj/Localizable.strings b/apps/mobile-app/ios/VaultUI/en.lproj/Localizable.strings
index 61f678957..2f1ff67b2 100644
Binary files a/apps/mobile-app/ios/VaultUI/en.lproj/Localizable.strings and b/apps/mobile-app/ios/VaultUI/en.lproj/Localizable.strings differ