diff --git a/Multiplatform/Shared/Add/Add Account Models/AddFeedlyViewModel.swift b/Multiplatform/Shared/Add/Add Account Models/AddFeedlyViewModel.swift index 7a1d983e0..e2e784459 100644 --- a/Multiplatform/Shared/Add/Add Account Models/AddFeedlyViewModel.swift +++ b/Multiplatform/Shared/Add/Add Account Models/AddFeedlyViewModel.swift @@ -18,7 +18,6 @@ class AddFeedlyViewModel: ObservableObject, OAuthAccountAuthorizationOperationDe @Published var showError: Bool = false @Published var username: String = "" @Published var password: String = "" - @Published var showPassword: Bool = false func authenticateFeedly() { isAuthenticating = true diff --git a/Multiplatform/Shared/Add/Add Account Models/AddNewsBlurViewModel.swift b/Multiplatform/Shared/Add/Add Account Models/AddNewsBlurViewModel.swift index 5e6fee54e..96f58b78f 100644 --- a/Multiplatform/Shared/Add/Add Account Models/AddNewsBlurViewModel.swift +++ b/Multiplatform/Shared/Add/Add Account Models/AddNewsBlurViewModel.swift @@ -19,6 +19,7 @@ class AddNewsBlurViewModel: ObservableObject, AddAccountSignUp { @Published var username: String = "" @Published var password: String = "" @Published var canDismiss: Bool = false + @Published var showPassword: Bool = false func authenticateNewsBlur() { isAuthenticating = true diff --git a/Multiplatform/Shared/Add/Add Account Sheets/AddFeedWranglerAccountView.swift b/Multiplatform/Shared/Add/Add Account Sheets/AddFeedWranglerAccountView.swift index a97780878..7ec1390ab 100644 --- a/Multiplatform/Shared/Add/Add Account Sheets/AddFeedWranglerAccountView.swift +++ b/Multiplatform/Shared/Add/Add Account Sheets/AddFeedWranglerAccountView.swift @@ -34,7 +34,32 @@ struct AddFeedWranglerAccountView: View { .scaleEffect(CGSize(width: 0.5, height: 0.5)) .hidden(!model.isAuthenticating) , content: { TextField("me@email.com", text: $model.username) - SecureField("•••••••••••", text: $model.password) + if model.showPassword == false { + ZStack { + HStack { + SecureField("Password", text: $model.password) + Spacer() + Image(systemName: "eye.fill") + .foregroundColor(.accentColor) + .onTapGesture { + model.showPassword = true + } + } + } + } + else { + ZStack { + HStack { + TextField("Password", text: $model.password) + Spacer() + Image(systemName: "eye.slash.fill") + .foregroundColor(.accentColor) + .onTapGesture { + model.showPassword = false + } + } + } + } }) }.navigationBarItems(leading: Button(action: { diff --git a/Multiplatform/Shared/Add/Add Account Sheets/AddNewsBlurAccountView.swift b/Multiplatform/Shared/Add/Add Account Sheets/AddNewsBlurAccountView.swift index 5fe3ca937..f6b25df25 100644 --- a/Multiplatform/Shared/Add/Add Account Sheets/AddNewsBlurAccountView.swift +++ b/Multiplatform/Shared/Add/Add Account Sheets/AddNewsBlurAccountView.swift @@ -32,7 +32,32 @@ struct AddNewsBlurAccountView: View { .scaleEffect(CGSize(width: 0.5, height: 0.5)) .hidden(!model.isAuthenticating) , content: { TextField("me@email.com", text: $model.username) - SecureField("•••••••••••", text: $model.password) + if model.showPassword == false { + ZStack { + HStack { + SecureField("Password", text: $model.password) + Spacer() + Image(systemName: "eye.fill") + .foregroundColor(.accentColor) + .onTapGesture { + model.showPassword = true + } + } + } + } + else { + ZStack { + HStack { + TextField("Password", text: $model.password) + Spacer() + Image(systemName: "eye.slash.fill") + .foregroundColor(.accentColor) + .onTapGesture { + model.showPassword = false + } + } + } + } }) }.navigationBarItems(leading: Button(action: {