Fade in/out update message

This commit is contained in:
JonnyWong16 2018-02-16 10:47:59 -08:00
commit 7e81ce8c06
2 changed files with 5 additions and 6 deletions

View file

@ -45,14 +45,14 @@
% if plexpy.CONFIG.CHECK_GITHUB and not plexpy.CURRENT_VERSION:
<div id="updatebar" style="display: none;">
You are running an unknown version of Tautulli.<br />
<a href="update">Update</a> or <a href="#" id="updateDismiss">Close</a>
<a href="update">Update</a> or <a href="#" id="updateDismiss">Close</a>.
</div>
% elif plexpy.CONFIG.CHECK_GITHUB and plexpy.CURRENT_VERSION != plexpy.LATEST_VERSION and plexpy.COMMITS_BEHIND > 0 and plexpy.INSTALL_TYPE != 'win':
<div id="updatebar" style="display: none;">
A <a href="${anon_url('https://github.com/%s/%s/compare/%s...%s' % (plexpy.CONFIG.GIT_USER, plexpy.CONFIG.GIT_REPO, plexpy.CURRENT_VERSION, plexpy.LATEST_VERSION))}" target="_blank">
newer version</a> is available!<br />
You are ${plexpy.COMMITS_BEHIND} commits behind.<br />
<a href="update">Update</a> or <a href="#" id="updateDismiss">Close</a>
<a href="update">Update</a> or <a href="#" id="updateDismiss">Close</a>.
</div>
% else:
<div id="updatebar" style="display: none;"></div>
@ -292,7 +292,7 @@ ${next.modalIncludes()}
<script>
% if _session['user_group'] == 'admin':
$('#updateDismiss').click(function() {
$('#updatebar').slideUp('slow');
$('#updatebar').fadeOut();
// Set cookie to remember dismiss decision for 1 hour.
setCookie('updateDismiss', 'true', 1/24);
});
@ -315,13 +315,13 @@ ${next.modalIncludes()}
msg = 'A <a href="' + result.compare_url + '" target="_blank">newer version</a> is available!<br />' +
'You are '+ result.commits_behind + ' commits behind.<br />' +
'<a href="update">Update</a> or <a href="#" id="updateDismiss">Close</a>.';
$('#updatebar').html(msg).show();
$('#updatebar').html(msg).fadeIn();
} else if (result.update === false) {
showMsg('<i class="fa fa-check"></i> ' + result.message, false, true, 2000);
} else if (result.update === null) {
msg = 'You are running an unknown version of Tautulli.<br />' +
'<a href="update">Update</a> or <a href="#" id="updateDismiss">Close</a>.';
$('#updatebar').html(msg).show();
$('#updatebar').html(msg).fadeIn();
}
if (_callback) {

View file

@ -3236,7 +3236,6 @@ div.dataTables_info {
#updatebar {
background-color: rgba(255,255,255,0.075);
color: #999999;
display: none;
font-size: 14px;
right: 10px;
padding: 10px 10px;