import Modal from 'flarum/components/Modal'; /** * The `ChangeEmailModal` component shows a modal dialog which allows the user * to change their email address. */ export default class ChangeEmailModal extends Modal { constructor(...args) { super(...args); /** * Whether or not the email has been changed successfully. * * @type {Boolean} */ this.success = false; /** * The value of the email input. * * @type {function} */ this.email = m.prop(app.session.user.email()); } className() { return 'ChangeEmailModal Modal--small'; } title() { return app.trans('core.change_email'); } content() { if (this.success) { const emailProviderName = this.email().split('@')[1]; return (
{m.trust(app.trans('core.confirmation_email_sent', {email: this.email()}))}