QML UI: remove "show password" switch and only show pw on first entry

Like the subject says. We do not want the password to be made
visible, so a switch to show it, is useless and is therefore
removed. Futher, the entry mode is set to PasswordEchoOnEdit,
which causes the passwd to be visible (for easy entry), but
can't be made visible again after save/end edit.

Fixes: #512

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
Jan Mulder 2017-07-26 15:19:42 +02:00 committed by Dirk Hohndel
parent e1e1c4b650
commit bb7dcc25c7

View file

@ -79,7 +79,7 @@ Item {
TextField {
id: password
text: manager.cloudPassword
echoMode: TextInput.Password
echoMode: TextInput.PasswordEchoOnEdit
inputMethodHints: Qt.ImhSensitiveData |
Qt.ImhHiddenText |
Qt.ImhNoAutoUppercase
@ -89,25 +89,6 @@ Item {
}
}
GridLayout {
columns: 2
Kirigami.Label {
text: qsTr("Show password")
Layout.preferredWidth: col1Width
}
SsrfSwitch {
checked: false
id: showPassword
Layout.preferredWidth: col2Width
onCheckedChanged: {
if (checked)
password.text = "" // don't show a hidden password
password.echoMode = checked ? TextInput.Normal : TextInput.Password
}
}
}
Kirigami.Label {
text: qsTr("PIN")
visible: rootItem.showPin