mirror of https://github.com/Ombi-app/Ombi
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
2.2 KiB
71 lines
2.2 KiB
@using PlexRequests.UI.Helpers
|
|
@Html.Partial("_Sidebar")
|
|
|
|
<div class="col-sm-8 col-sm-push-1">
|
|
<fieldset>
|
|
<legend>Status</legend>
|
|
|
|
|
|
<div class="form-group">
|
|
<label class="control-label">Version: </label>
|
|
<label class="control-label">@Model.Version</label>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="control-label">Update Available: </label>
|
|
@if (Model.UpdateAvailable)
|
|
{
|
|
<label class="control-label"><a href="@Model.UpdateUri" target="_blank"><i class="fa fa-check"></i></a></label>
|
|
<br />
|
|
@*<button id="autoUpdate" class="btn btn-success-outline">Automatic Update <i class="fa fa-download"></i></button>*@ //TODO
|
|
}
|
|
else
|
|
{
|
|
<label class="control-label"><i class="fa fa-times"></i></label>
|
|
}
|
|
|
|
</div>
|
|
|
|
@if (Model.UpdateAvailable)
|
|
{
|
|
<h2>
|
|
<a href="@Model.DownloadUri">@Model.ReleaseTitle</a>
|
|
</h2>
|
|
<hr />
|
|
<label>Release Notes:</label>
|
|
@Html.Raw(Model.ReleaseNotes)
|
|
}
|
|
|
|
|
|
</fieldset>
|
|
</div>
|
|
|
|
<script>
|
|
|
|
var base = '@Html.GetBaseUrl()';
|
|
$('#autoUpdate')
|
|
.click(function (e) {
|
|
e.preventDefault();
|
|
$('body').append("<i class=\"fa fa-spinner fa-spin fa-5x fa-fw\" style=\"position: absolute; top: 20%; left: 50%;\"></i>");
|
|
$('#autoUpdate').prop("disabled", "disabled");
|
|
var count = 0;
|
|
setInterval(function () {
|
|
count++;
|
|
var dots = new Array(count % 10).join('.');
|
|
document.getElementById('autoUpdate').innerHTML = "Updating" + dots;
|
|
}, 1000);
|
|
|
|
$.ajax({
|
|
type: "Post",
|
|
url: "autoupdate",
|
|
data: { url: "@Model.DownloadUri" },
|
|
dataType: "json",
|
|
error: function () {
|
|
setTimeout(
|
|
function () {
|
|
location.reload();
|
|
}, 30000);
|
|
}
|
|
});
|
|
});
|
|
</script> |