mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 18:47:15 -07:00
- Added a visual indication on the UI to tell the admin there is a update available.
- We are now also recording the last scheduled run in the database
This commit is contained in:
parent
af028f0b56
commit
df3dc4ac04
28 changed files with 392 additions and 45 deletions
|
@ -34,7 +34,7 @@
|
|||
</button>
|
||||
<a class="navbar-brand" href="@url/search">Plex Requests</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav">
|
||||
@Html.GetNavbarUrl(Context, "/search", "Search", "search")
|
||||
|
@ -42,7 +42,7 @@
|
|||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
|
||||
|
||||
|
||||
@if (!Context.CurrentUser.IsAuthenticated())
|
||||
{
|
||||
<li><a href="@url/login"><i class="fa fa-user"></i> Admin</a></li>
|
||||
|
@ -66,6 +66,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="updateAvailable" hidden="hidden"></div>
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
|
@ -82,6 +83,24 @@
|
|||
|
||||
$(function () {
|
||||
|
||||
var urlBase = '@Html.GetBaseUrl()';
|
||||
var url = createBaseUrl(urlBase, '/updatechecker');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: url,
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
if (response.updateAvailable) {
|
||||
var status = createBaseUrl(urlBase, '/admin/status');
|
||||
$('#updateAvailable').html("There is a new update available! Click <a style='color: white' href='"+status+"'>Here!</a>");
|
||||
$('#updateAvailable').removeAttr("hidden");
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
console.log(e);
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('scroll', function () {
|
||||
|
||||
if ($(window).scrollTop() > 100) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue