threema-ch / threema-web

The Threema Web application.
GNU Affero General Public License v3.0
986 stars 106 forks source link

Clear the password field in case of incorrect password entry #1139

Closed Pythonix closed 2 years ago

Pythonix commented 2 years ago

Currently, after the notification that the password entry was incorrect, the password must be deleted manually. This PR will automatically delete the password.

threema-danilo commented 2 years ago

Thanks! That makes sense.

However, it would feel more natural if the password is cleared when the error dialog is closed. Could you change that? In showDecryptionFailed, you can add an onRemoving callback to the .show()-arguments:

this.$mdDialog.show({
    ...
    onRemoving: () => { this.clearPassword(); },
});

(Untested)

Pythonix commented 2 years ago

Thanks, I adopted your suggestion and tested it. Works as intended.

threema-danilo commented 2 years ago

Thanks! Looks good now 🙂