mirror of
https://github.com/flarum/framework.git
synced 2025-04-02 15:15:24 +08:00
chore: don't pass password field between auth modals (#3626)
* chore: don't pass password field between auth modals * chore: reset password on failed attempts * chore: `yarn format` Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
This commit is contained in:
parent
6e48a0303e
commit
3b773e2677
framework/core/js/src/forum/components
@ -158,7 +158,6 @@ export default class LogInModal<CustomAttrs extends ILoginModalAttrs = ILoginMod
|
||||
|
||||
const attrs = {
|
||||
[identification.includes('@') ? 'email' : 'username']: identification,
|
||||
password: this.password(),
|
||||
};
|
||||
|
||||
app.modal.show(SignUpModal, attrs);
|
||||
@ -185,6 +184,7 @@ export default class LogInModal<CustomAttrs extends ILoginModalAttrs = ILoginMod
|
||||
onerror(error: RequestError) {
|
||||
if (error.status === 401 && error.alert) {
|
||||
error.alert.content = app.translator.trans('core.forum.log_in.invalid_login_message');
|
||||
this.password('');
|
||||
}
|
||||
|
||||
super.onerror(error);
|
||||
|
@ -149,7 +149,6 @@ export default class SignUpModal<CustomAttrs extends ISignupModalAttrs = ISignup
|
||||
logIn() {
|
||||
const attrs = {
|
||||
identification: this.email() || this.username(),
|
||||
password: this.password(),
|
||||
};
|
||||
|
||||
app.modal.show(LogInModal, attrs);
|
||||
|
Loading…
x
Reference in New Issue
Block a user