mirror of
https://github.com/flarum/core.git
synced 2025-08-04 07:27:39 +02: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:
@@ -158,7 +158,6 @@ export default class LogInModal<CustomAttrs extends ILoginModalAttrs = ILoginMod
|
|||||||
|
|
||||||
const attrs = {
|
const attrs = {
|
||||||
[identification.includes('@') ? 'email' : 'username']: identification,
|
[identification.includes('@') ? 'email' : 'username']: identification,
|
||||||
password: this.password(),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
app.modal.show(SignUpModal, attrs);
|
app.modal.show(SignUpModal, attrs);
|
||||||
@@ -185,6 +184,7 @@ export default class LogInModal<CustomAttrs extends ILoginModalAttrs = ILoginMod
|
|||||||
onerror(error: RequestError) {
|
onerror(error: RequestError) {
|
||||||
if (error.status === 401 && error.alert) {
|
if (error.status === 401 && error.alert) {
|
||||||
error.alert.content = app.translator.trans('core.forum.log_in.invalid_login_message');
|
error.alert.content = app.translator.trans('core.forum.log_in.invalid_login_message');
|
||||||
|
this.password('');
|
||||||
}
|
}
|
||||||
|
|
||||||
super.onerror(error);
|
super.onerror(error);
|
||||||
|
@@ -149,7 +149,6 @@ export default class SignUpModal<CustomAttrs extends ISignupModalAttrs = ISignup
|
|||||||
logIn() {
|
logIn() {
|
||||||
const attrs = {
|
const attrs = {
|
||||||
identification: this.email() || this.username(),
|
identification: this.email() || this.username(),
|
||||||
password: this.password(),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
app.modal.show(LogInModal, attrs);
|
app.modal.show(LogInModal, attrs);
|
||||||
|
Reference in New Issue
Block a user