From 5a1b606f01512db21c5cb01102b45514741d81eb Mon Sep 17 00:00:00 2001 From: tidusjar Date: Tue, 21 Jun 2016 13:02:53 +0100 Subject: [PATCH 1/2] Set the defaults for the landing page --- PlexRequests.UI/Modules/AdminModule.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/PlexRequests.UI/Modules/AdminModule.cs b/PlexRequests.UI/Modules/AdminModule.cs index daf5f0967..0cdebf427 100644 --- a/PlexRequests.UI/Modules/AdminModule.cs +++ b/PlexRequests.UI/Modules/AdminModule.cs @@ -818,7 +818,14 @@ private Response SaveSlackNotifications() private async Task LandingPage() { var settings = await LandingSettings.GetSettingsAsync(); - + if (settings.NoticeEnd == DateTime.MinValue) + { + settings.NoticeEnd = DateTime.Now; + } + if (settings.NoticeStart == DateTime.MinValue) + { + settings.NoticeStart = DateTime.Now; + } return View["LandingPage", settings]; } From 6f18c69f5f743464f8706cb8aa1ad46d468b7cef Mon Sep 17 00:00:00 2001 From: tidusjar Date: Tue, 21 Jun 2016 13:39:23 +0100 Subject: [PATCH 2/2] Fixes to the issues --- PlexRequests.Core/Setup.cs | 3 ++- PlexRequests.UI/Modules/IssuesModule.cs | 6 +++--- PlexRequests.UI/Views/Issues/Index.cshtml | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/PlexRequests.Core/Setup.cs b/PlexRequests.Core/Setup.cs index 2c015f55c..33682d7b3 100644 --- a/PlexRequests.Core/Setup.cs +++ b/PlexRequests.Core/Setup.cs @@ -105,7 +105,8 @@ private void CreateDefaultSettingsPage(string baseUrl) SearchForMovies = true, SearchForTvShows = true, WeeklyRequestLimit = 0, - BaseUrl = baseUrl ?? string.Empty + BaseUrl = baseUrl ?? string.Empty, + CollectAnalyticData = true, }; var s = new SettingsServiceV2(new SettingsJsonRepository(new DbConfiguration(new SqliteFactory()), new MemoryCacheProvider())); s.SaveSettings(defaultSettings); diff --git a/PlexRequests.UI/Modules/IssuesModule.cs b/PlexRequests.UI/Modules/IssuesModule.cs index 82cb1d2f0..1c66831e0 100644 --- a/PlexRequests.UI/Modules/IssuesModule.cs +++ b/PlexRequests.UI/Modules/IssuesModule.cs @@ -362,7 +362,7 @@ private async Task> FilterIssuesAsync(IEnumerable RemoveIssue(int issueId) + private async Task RemoveIssue(int issueId) { try { @@ -378,13 +378,13 @@ private async Task RemoveIssue(int issueId) await IssuesService.DeleteIssueAsync(issueId); } - return View["Index"]; + return Response.AsJson(new JsonResponseModel() { Result = true }); } catch (Exception e) { Log.Error(e); - return View["Index"]; + return Response.AsJson(new JsonResponseModel() { Result = false, Message = "Could not delete issue! Check the logs."}); } } diff --git a/PlexRequests.UI/Views/Issues/Index.cshtml b/PlexRequests.UI/Views/Issues/Index.cshtml index 2c18ccf41..77d7b983f 100644 --- a/PlexRequests.UI/Views/Issues/Index.cshtml +++ b/PlexRequests.UI/Views/Issues/Index.cshtml @@ -61,7 +61,7 @@