Show reload when already on updates page

This commit is contained in:
Mark McDowall 2015-04-22 14:49:24 -07:00
parent 23daae05cc
commit 2feb583e45
1 changed files with 3 additions and 1 deletions

View File

@ -38,13 +38,15 @@ module.exports = Marionette.AppRouter.extend({
}, },
_onServerUpdated : function() { _onServerUpdated : function() {
var label = window.location.pathname === window.NzbDrone.UrlBase + '/system/updates' ? 'Reload' : 'View Changes';
Messenger.show({ Messenger.show({
message : 'Sonarr has been updated', message : 'Sonarr has been updated',
hideAfter : 0, hideAfter : 0,
id : 'sonarrUpdated', id : 'sonarrUpdated',
actions : { actions : {
viewChanges : { viewChanges : {
label : 'View Changes', label : label,
action : function() { action : function() {
window.location = window.NzbDrone.UrlBase + '/system/updates'; window.location = window.NzbDrone.UrlBase + '/system/updates';
} }