diff --git a/iOSClient/Settings/Settings/NCSettingsModel.swift b/iOSClient/Settings/Settings/NCSettingsModel.swift index 0bbc73df78..826b359cfe 100644 --- a/iOSClient/Settings/Settings/NCSettingsModel.swift +++ b/iOSClient/Settings/Settings/NCSettingsModel.swift @@ -15,7 +15,7 @@ class NCSettingsModel: ObservableObject, ViewOnAppearHandling { // State to control the lock on/off section @Published var isLockActive: Bool = false // State to control the enable TouchID toggle - @Published var enableTouchID: Bool = false + @Published var enableTouchFaceID: Bool = false // State to control @Published var lockScreen: Bool = false // State to control @@ -48,7 +48,7 @@ class NCSettingsModel: ObservableObject, ViewOnAppearHandling { func onViewAppear() { let capabilities = NCNetworking.shared.capabilities[self.controller?.account ?? ""] ?? NKCapabilities.Capabilities() isLockActive = (keychain.passcode != nil) - enableTouchID = keychain.touchFaceID + enableTouchFaceID = keychain.touchFaceID lockScreen = !keychain.requestPasscodeAtStart privacyScreen = keychain.privacyScreenEnabled resetWrongAttempts = keychain.resetAppCounterFail @@ -62,7 +62,7 @@ class NCSettingsModel: ObservableObject, ViewOnAppearHandling { /// Function to update Touch ID / Face ID setting func updateTouchIDSetting() { - keychain.touchFaceID = enableTouchID + keychain.touchFaceID = enableTouchFaceID } /// Function to update Lock Screen setting diff --git a/iOSClient/Settings/Settings/NCSettingsView.swift b/iOSClient/Settings/Settings/NCSettingsView.swift index 1588d8d17b..dbbcd83492 100644 --- a/iOSClient/Settings/Settings/NCSettingsView.swift +++ b/iOSClient/Settings/Settings/NCSettingsView.swift @@ -82,8 +82,8 @@ struct NCSettingsView: View { } }) // Enable Touch ID - Toggle(NSLocalizedString("_enable_touch_face_id_", comment: ""), isOn: $model.enableTouchID) - .onChange(of: model.enableTouchID) { + Toggle(NSLocalizedString("_enable_touch_face_id_", comment: ""), isOn: $model.enableTouchFaceID) + .onChange(of: model.enableTouchFaceID) { model.updateTouchIDSetting() } @@ -108,13 +108,15 @@ struct NCSettingsView: View { } if !NCBrandOptions.shared.enforce_privacyScreenEnabled { - Section { + Section(content: { // Splash screen when app inactive Toggle(NSLocalizedString("_privacy_screen_", comment: ""), isOn: $model.privacyScreen) .onChange(of: model.privacyScreen) { model.updatePrivacyScreenSetting() } - } + }, footer: { + Text(NSLocalizedString("_privacy_screen_footer_", comment: "")) + }) .tint(Color(NCBrandColor.shared.getElement(account: model.session.account))) } @@ -288,3 +290,4 @@ struct E2EESection: View { #Preview { NCSettingsView(model: NCSettingsModel(controller: nil)) } + diff --git a/iOSClient/Settings/Settings/SetupPasscodeView.swift b/iOSClient/Settings/Settings/SetupPasscodeView.swift index f3124d4f5e..b17a573814 100644 --- a/iOSClient/Settings/Settings/SetupPasscodeView.swift +++ b/iOSClient/Settings/Settings/SetupPasscodeView.swift @@ -12,7 +12,7 @@ import PopupView struct SetupPasscodeView: UIViewControllerRepresentable { @Binding var isLockActive: Bool var changePasscode: Bool = false - let maxFailedAttempts = 2 // + 1 = 3... The lib failed attempt counter starts at 0. Why? Who knows. + let maxFailedAttempts = 2 // + 1 = 3... The lib's failed attempt counter starts at 0. Why? Who knows. func makeUIViewController(context: Context) -> UIViewController { let laContext = LAContext() @@ -68,8 +68,10 @@ struct SetupPasscodeView: UIViewControllerRepresentable { context.evaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, localizedReason: NCBrandOptions.shared.brand) { success, _ in DispatchQueue.main.async { if success { - DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { + DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { [self] in + parent.isLockActive = false NCPreferences().passcode = nil + passcodeViewController.dismiss(animated: true) } } diff --git a/iOSClient/Supporting Files/en.lproj/Localizable.strings b/iOSClient/Supporting Files/en.lproj/Localizable.strings index 46bf73d7a3..1a6685d5f2 100644 --- a/iOSClient/Supporting Files/en.lproj/Localizable.strings +++ b/iOSClient/Supporting Files/en.lproj/Localizable.strings @@ -258,7 +258,7 @@ "_autoupload_photos_" = "Auto upload photos"; "_autoupload_videos_" = "Auto upload videos"; "_autoupload_favorites_" = "Auto upload favorites only"; -"_autoupload_description_" = "Choose whether new photos or videos will be automatically uploaded to your server."; +"_autoupload_description_" = "Choose whether new photos or videos will be automatically uploaded to your account."; "_autoupload_fullphotos_" = "Upload the whole camera roll"; "_start_autoupload_" = "Turn on auto upload"; "_stop_autoupload_" = "Turn off auto upload"; @@ -557,7 +557,8 @@ "_full_resolution_image_info_" = "This may reveal more information about the photo."; "_download_audio_" = "Download the audio locally"; "_copied_path_" = "Copied path"; -"_privacy_screen_" = "Splash screen when app inactive"; +"_privacy_screen_" = "Hide content when app is inactive"; +"_privacy_screen_footer_" = "Hide the content in the app and show a splash screen when the app is inactive."; "_in_" = "in"; "_enter_passphrase_" = "Enter passphrase (12 words)"; "_show_more_results_" = "Show more results"; @@ -602,8 +603,8 @@ "_download_image_" = "Download image"; "_download_video_" = "Download video"; "_reset_wrong_passcode_" = "Reset application"; -"_reset_wrong_passcode_option_" = "Reset application after failed attempts"; -"_reset_wrong_passcode_desc_" = "Use \"Reset application\" to remove all accounts and local data after %d failed code entry attempts."; +"_reset_wrong_passcode_option_" = "Reset application after 10 failed attempts"; +"_reset_wrong_passcode_desc_" = "Enabling this will remove all accounts and local data after %d failed passcode entry attempts."; "_deviceOwnerAuthentication_" = "The biometric sensor has been temporarily disabled due to multiple failed attempts. Enter the device passcode to re-enable the sensor."; "_virus_detect_" = "Virus detected. Upload cannot be completed!"; "_select_photos_" = "Select photos"; @@ -620,7 +621,7 @@ "_use_system_style_" = "Use system style"; "_account_settings_" = "Account settings"; "_users_" = "Users"; -"_users_footer_" = "Every time the app is reactivated, the account will be requested."; +"_users_footer_" = "Allows you to select an account every time you open the app."; "_while_charging_" = "While charging"; "_keep_screen_awake_" = "Keep screen awake\nwhile transferring files"; "_error_not_found_" = "The requested resource could not be found";