1
0
mirror of https://github.com/flarum/core.git synced 2025-07-30 13:10:24 +02:00

Extract AlertManagerState from AlertManager (#2163)

This commit is contained in:
Alexander Skvortsov
2020-06-30 18:06:59 -04:00
committed by GitHub
parent aaebd3581f
commit ea9d601338
12 changed files with 107 additions and 103 deletions

View File

@@ -179,9 +179,10 @@ export default class MailPage extends Page {
})
.then((response) => {
this.sendingTest = false;
app.alerts.show(
(this.testEmailSuccessAlert = new Alert({ type: 'success', children: app.translator.trans('core.admin.email.send_test_mail_success') }))
);
this.testEmailSuccessAlert = app.alerts.show({
type: 'success',
children: app.translator.trans('core.admin.email.send_test_mail_success'),
});
})
.catch((error) => {
this.sendingTest = false;
@@ -204,7 +205,10 @@ export default class MailPage extends Page {
saveSettings(settings)
.then(() => {
app.alerts.show((this.successAlert = new Alert({ type: 'success', children: app.translator.trans('core.admin.basics.saved_message') })));
this.successAlert = app.alerts.show({
type: 'success',
children: app.translator.trans('core.admin.basics.saved_message'),
});
})
.catch(() => {})
.then(() => {