From b99a5a668bedc550054c72fec1e29ebae32ad81b Mon Sep 17 00:00:00 2001 From: Jamie Date: Thu, 22 Mar 2018 13:00:25 +0000 Subject: [PATCH] Think i've finished the ui now too !wip needs testing --- src/Ombi.Mapping/Profiles/SettingsProfile.cs | 1 + .../Settings/Models/CustomizationSettings.cs | 1 + .../INotificationTemplatesRepository.cs | 4 +-- .../NotificationTemplatesRepository.cs | 8 +++--- src/Ombi/ClientApp/app/app.component.html | 15 ++++++----- .../app/interfaces/INotificationSettings.ts | 1 + .../ClientApp/app/interfaces/ISettings.ts | 1 + .../customization.component.html | 7 +++++ .../ClientApp/app/settings/settings.module.ts | 4 +++ .../app/settings/settingsmenu.component.html | 2 +- src/Ombi/Controllers/SettingsController.cs | 27 +++++++++++-------- 11 files changed, 46 insertions(+), 25 deletions(-) diff --git a/src/Ombi.Mapping/Profiles/SettingsProfile.cs b/src/Ombi.Mapping/Profiles/SettingsProfile.cs index 62232ee19..139290f2b 100644 --- a/src/Ombi.Mapping/Profiles/SettingsProfile.cs +++ b/src/Ombi.Mapping/Profiles/SettingsProfile.cs @@ -18,6 +18,7 @@ namespace Ombi.Mapping.Profiles CreateMap().ReverseMap(); CreateMap().ReverseMap(); CreateMap().ReverseMap(); + CreateMap().ReverseMap(); } } } \ No newline at end of file diff --git a/src/Ombi.Settings/Settings/Models/CustomizationSettings.cs b/src/Ombi.Settings/Settings/Models/CustomizationSettings.cs index 16d6245f5..515c2fc85 100644 --- a/src/Ombi.Settings/Settings/Models/CustomizationSettings.cs +++ b/src/Ombi.Settings/Settings/Models/CustomizationSettings.cs @@ -18,6 +18,7 @@ namespace Ombi.Settings.Settings.Models public string PresetThemeName { get; set; } public string PresetThemeContent { get; set; } + public bool RecentlyAddedPage { get; set; } [NotMapped] public string PresetThemeVersion diff --git a/src/Ombi.Store/Repository/INotificationTemplatesRepository.cs b/src/Ombi.Store/Repository/INotificationTemplatesRepository.cs index 2ef0e09cf..2398158db 100644 --- a/src/Ombi.Store/Repository/INotificationTemplatesRepository.cs +++ b/src/Ombi.Store/Repository/INotificationTemplatesRepository.cs @@ -10,8 +10,8 @@ namespace Ombi.Store.Repository public interface INotificationTemplatesRepository : IDisposable { IQueryable All(); - Task> GetAllTemplates(); - Task> GetAllTemplates(NotificationAgent agent); + IQueryable GetAllTemplates(); + IQueryable GetAllTemplates(NotificationAgent agent); Task Insert(NotificationTemplates entity); Task Update(NotificationTemplates template); Task UpdateRange(IEnumerable template); diff --git a/src/Ombi.Store/Repository/NotificationTemplatesRepository.cs b/src/Ombi.Store/Repository/NotificationTemplatesRepository.cs index de892e934..3822f8001 100644 --- a/src/Ombi.Store/Repository/NotificationTemplatesRepository.cs +++ b/src/Ombi.Store/Repository/NotificationTemplatesRepository.cs @@ -23,14 +23,14 @@ namespace Ombi.Store.Repository return Db.NotificationTemplates.AsQueryable(); } - public async Task> GetAllTemplates() + public IQueryable GetAllTemplates() { - return await Db.NotificationTemplates.ToListAsync(); + return Db.NotificationTemplates; } - public async Task> GetAllTemplates(NotificationAgent agent) + public IQueryable GetAllTemplates(NotificationAgent agent) { - return await Db.NotificationTemplates.Where(x => x.Agent == agent).ToListAsync(); + return Db.NotificationTemplates.Where(x => x.Agent == agent); } public async Task GetTemplate(NotificationAgent agent, NotificationType type) diff --git a/src/Ombi/ClientApp/app/app.component.html b/src/Ombi/ClientApp/app/app.component.html index bc44c3b49..0db13fa9c 100644 --- a/src/Ombi/ClientApp/app/app.component.html +++ b/src/Ombi/ClientApp/app/app.component.html @@ -34,13 +34,14 @@ {{ 'NavigationBar.Requests' | translate }} - - +