mirror of
https://github.com/flarum/core.git
synced 2025-10-24 13:16:08 +02:00
Extract ModalManagerState from ModalManager (#2162)
This commit is contained in:
committed by
GitHub
parent
4f181c84fc
commit
44376cef61
@@ -77,7 +77,7 @@ export default class HeaderSecondary extends Component {
|
||||
Button.component({
|
||||
children: app.translator.trans('core.forum.header.sign_up_link'),
|
||||
className: 'Button Button--link',
|
||||
onclick: () => app.modal.show(new SignUpModal()),
|
||||
onclick: () => app.modal.show(SignUpModal),
|
||||
}),
|
||||
10
|
||||
);
|
||||
@@ -88,7 +88,7 @@ export default class HeaderSecondary extends Component {
|
||||
Button.component({
|
||||
children: app.translator.trans('core.forum.header.log_in_link'),
|
||||
className: 'Button Button--link',
|
||||
onclick: () => app.modal.show(new LogInModal()),
|
||||
onclick: () => app.modal.show(LogInModal),
|
||||
}),
|
||||
0
|
||||
);
|
||||
|
||||
@@ -282,7 +282,7 @@ export default class IndexPage extends Page {
|
||||
} else {
|
||||
deferred.reject();
|
||||
|
||||
app.modal.show(new LogInModal());
|
||||
app.modal.show(LogInModal);
|
||||
}
|
||||
|
||||
return deferred.promise;
|
||||
|
||||
@@ -142,7 +142,7 @@ export default class LogInModal extends Modal {
|
||||
const email = this.identification();
|
||||
const props = email.indexOf('@') !== -1 ? { email } : undefined;
|
||||
|
||||
app.modal.show(new ForgotPasswordModal(props));
|
||||
app.modal.show(ForgotPasswordModal, props);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -156,7 +156,7 @@ export default class LogInModal extends Modal {
|
||||
const identification = this.identification();
|
||||
props[identification.indexOf('@') !== -1 ? 'email' : 'username'] = identification;
|
||||
|
||||
app.modal.show(new SignUpModal(props));
|
||||
app.modal.show(SignUpModal, props);
|
||||
}
|
||||
|
||||
onready() {
|
||||
|
||||
@@ -79,7 +79,7 @@ export default class SettingsPage extends UserPage {
|
||||
Button.component({
|
||||
children: app.translator.trans('core.forum.settings.change_password_button'),
|
||||
className: 'Button',
|
||||
onclick: () => app.modal.show(new ChangePasswordModal()),
|
||||
onclick: () => app.modal.show(ChangePasswordModal),
|
||||
})
|
||||
);
|
||||
|
||||
@@ -88,7 +88,7 @@ export default class SettingsPage extends UserPage {
|
||||
Button.component({
|
||||
children: app.translator.trans('core.forum.settings.change_email_button'),
|
||||
className: 'Button',
|
||||
onclick: () => app.modal.show(new ChangeEmailModal()),
|
||||
onclick: () => app.modal.show(ChangeEmailModal),
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ export default class SignUpModal extends Modal {
|
||||
password: this.password(),
|
||||
};
|
||||
|
||||
app.modal.show(new LogInModal(props));
|
||||
app.modal.show(LogInModal, props);
|
||||
}
|
||||
|
||||
onready() {
|
||||
|
||||
Reference in New Issue
Block a user