diff --git a/js/src/forum/utils/alertEmailConfirmation.js b/js/src/forum/utils/alertEmailConfirmation.js index a5610a7a7..9f158271c 100644 --- a/js/src/forum/utils/alertEmailConfirmation.js +++ b/js/src/forum/utils/alertEmailConfirmation.js @@ -18,15 +18,15 @@ export default function alertEmailConfirmation(app) { super.oninit(vnode); this.loading = false; - this.disabled = false; - - this.content = app.translator.trans('core.forum.user_email_confirmation.resend_button'); + this.sent = false; } view() { return ( - ); } @@ -42,8 +42,7 @@ export default function alertEmailConfirmation(app) { }) .then(() => { this.loading = false; - this.content = [icon('fas fa-check'), ' ', app.translator.trans('core.forum.user_email_confirmation.sent_message')]; - this.disabled = true; + this.sent = true; m.redraw(); }) .catch(() => { @@ -53,22 +52,13 @@ export default function alertEmailConfirmation(app) { } } - class ContainedAlert extends Alert { - view(vnode) { - const vdom = super.view(vnode); - - return { ...vdom, children: [
{vdom.children}
] }; - } - } - m.mount($('
').insertBefore('#content')[0], { - view: () => - ContainedAlert.component( - { - dismissible: false, - controls: [ResendButton.component()], - }, - app.translator.trans('core.forum.user_email_confirmation.alert_message', { email: {user.email()} }) - ), + view: () => ( + ]}> +
+ {app.translator.trans('core.forum.user_email_confirmation.alert_message', { email: {user.email()} })} +
+
+ ), }); }