From 76acc8ffa6efaf7d7576bda608eb0f97fa090518 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Tue, 20 Jan 2015 23:06:22 -0800 Subject: [PATCH] New: button on update notification to go to change log --- src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs | 2 +- src/UI/Mixins/jquery.ajax.js | 12 +++++++++++- src/UI/index.html | 11 ++++++----- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs b/src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs index 9466cb6ce..554eb5716 100644 --- a/src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs +++ b/src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs @@ -93,8 +93,8 @@ private string GetIndexText() text = text.Replace("API_KEY", API_KEY); text = text.Replace("APP_VERSION", BuildInfo.Version.ToString()); text = text.Replace("APP_BRANCH", _configFileProvider.Branch.ToLower()); - text = text.Replace("APP_ANALYTICS", _analyticsService.IsEnabled.ToString().ToLowerInvariant()); + text = text.Replace("URL_BASE", _configFileProvider.UrlBase); _generatedContent = text; diff --git a/src/UI/Mixins/jquery.ajax.js b/src/UI/Mixins/jquery.ajax.js index cb2c9aca5..16bfea539 100644 --- a/src/UI/Mixins/jquery.ajax.js +++ b/src/UI/Mixins/jquery.ajax.js @@ -46,7 +46,17 @@ define( messenger.show({ message : 'Sonarr has been updated', hideAfter : 0, - id : 'droneUpdated' + id : 'droneUpdated', + actions : { + viewChanges: { + label: 'View Changes', + action: function() { + //TODO: UrlBase + window.location = window.NzbDrone.UrlBase + 'system/updates'; + //Backbone.history.navigate('/system/updates', { trigger: true }); + } + } + } }); vent.trigger(vent.Events.ServerUpdated); diff --git a/src/UI/index.html b/src/UI/index.html index 9ce2b276c..8c2e48ab8 100644 --- a/src/UI/index.html +++ b/src/UI/index.html @@ -76,11 +76,12 @@