mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-23 16:20:53 +01:00
Merge pull request #2260 from rizwankce/show-password-for-feedbin-accouunt-view
Add show/hide password for feedbin account view
This commit is contained in:
commit
1a74701052
@ -41,6 +41,7 @@ class SettingsFeedbinAccountModel: ObservableObject {
|
||||
}
|
||||
}
|
||||
@Published var showError: Bool = false
|
||||
@Published var showPassword: Bool = false
|
||||
|
||||
init() {
|
||||
|
||||
|
@ -30,7 +30,19 @@ struct SettingsFeedbinAccountView: View {
|
||||
List {
|
||||
Section(header: AccountHeaderImageView(image: AppAssets.image(for: .feedbin)!)) {
|
||||
TextField("Email", text: $settingsModel.email).textContentType(.emailAddress)
|
||||
SecureField("Password", text: $settingsModel.password)
|
||||
HStack {
|
||||
if settingsModel.showPassword {
|
||||
TextField("Password", text:$settingsModel.password)
|
||||
}
|
||||
else {
|
||||
SecureField("Password", text: $settingsModel.password)
|
||||
}
|
||||
Button(action: {
|
||||
settingsModel.showPassword.toggle()
|
||||
}) {
|
||||
Text(settingsModel.showPassword ? "Hide" : "Show")
|
||||
}
|
||||
}
|
||||
}
|
||||
Section(footer: errorFooter) {
|
||||
HStack {
|
||||
|
Loading…
Reference in New Issue
Block a user