Added more constructors for convenience in creating Notification objects. Refactored to use the new constructors where applicable. Fixed localization key issue in Site Settings and added scroll to top when testing SMTP.

This commit is contained in:
Shaun Walker
2022-02-24 09:01:44 -05:00
parent ac45f67a21
commit 938bcb2b62
5 changed files with 65 additions and 25 deletions

View File

@ -605,8 +605,10 @@
await SettingService.UpdateSiteSettingsAsync(settings, PageState.Site.SiteId);
await logger.LogInformation("Site SMTP Settings Saved");
await NotificationService.AddNotificationAsync(new Notification(PageState.Site.SiteId, PageState.User.DisplayName, PageState.User.Email, PageState.User.DisplayName, PageState.User.Email, PageState.Site.Name + " SMTP Configuration Test", "SMTP Server Is Configured Correctly."));
await NotificationService.AddNotificationAsync(new Notification(PageState.Site.SiteId, PageState.User, PageState.Site.Name + " SMTP Configuration Test", "SMTP Server Is Configured Correctly."));
AddModuleMessage(Localizer["Info.Smtp.SaveSettings"], MessageType.Info);
var interop = new Interop(JSRuntime);
await interop.ScrollTo(0, 0, "smooth");
}
catch (Exception ex)
{
@ -616,7 +618,7 @@
}
else
{
AddModuleMessage(Localizer["Message.required.Smtp"], MessageType.Warning);
AddModuleMessage(Localizer["Message.Required.Smtp"], MessageType.Warning);
}
}