Show reload when already on updates page

pull/193/head
Mark McDowall 9 years ago
parent 23daae05cc
commit 2feb583e45

@ -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';
} }

Loading…
Cancel
Save