Merge pull request #333 from tidusjar/dev

Dev to master
pull/335/head^2
Jamie 9 years ago committed by GitHub
commit 6f30ce2d68

@ -105,7 +105,8 @@ namespace PlexRequests.Core
SearchForMovies = true,
SearchForTvShows = true,
WeeklyRequestLimit = 0,
BaseUrl = baseUrl ?? string.Empty
BaseUrl = baseUrl ?? string.Empty,
CollectAnalyticData = true,
};
var s = new SettingsServiceV2<PlexRequestSettings>(new SettingsJsonRepository(new DbConfiguration(new SqliteFactory()), new MemoryCacheProvider()));
s.SaveSettings(defaultSettings);

@ -818,7 +818,14 @@ namespace PlexRequests.UI.Modules
private async Task<Negotiator> 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];
}

@ -362,7 +362,7 @@ namespace PlexRequests.UI.Modules
return myIssues;
}
private async Task<Negotiator> RemoveIssue(int issueId)
private async Task<Response> RemoveIssue(int issueId)
{
try
{
@ -378,13 +378,13 @@ namespace PlexRequests.UI.Modules
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."});
}
}

@ -61,7 +61,7 @@
</div>
<script id="issue-template" type="text/x-handlebars-template">
<div>
<div id="{{id}}Template">
<div class="row">
<div class="col-md-3">
<div id="title">{{title}}</div>
@ -83,7 +83,7 @@
<div class="col-sm-1">
<a href="" id="{{id}}link" class="btn btn-sm btn-info-outline approve"><i class="fa fa-info"></i> Details</a>
<br />
<form action="@formAction/issues/remove" method="post">
<form action="@formAction/issues/remove" method="post" id="delete{{id}}">
<input id="issueId" name="issueId" value="{{id}}" hidden="hidden" />
<button type="submit" id="{{id}}" class="btn btn-sm btn-danger-outline dropdown-toggle delete">Remove</button>
</form>

Loading…
Cancel
Save