From 0b4c652ce7d6b88434122ff6c7702de3e3185157 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Thu, 7 Jan 2016 16:42:10 +0000 Subject: [PATCH] Add version number of sidebar footer --- editor/js/settings.js | 11 ++++++----- editor/sass/style.scss | 5 +++++ editor/templates/index.mst | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/editor/js/settings.js b/editor/js/settings.js index 887fa92e6..ca580ebed 100644 --- a/editor/js/settings.js +++ b/editor/js/settings.js @@ -16,9 +16,9 @@ RED.settings = (function () { - + var loadedSettings = {}; - + var hasLocalStorage = function () { try { return 'localStorage' in window && window['localStorage'] !== null; @@ -74,7 +74,7 @@ RED.settings = (function () { RED.settings.set("auth-tokens",{access_token: accessToken}); window.location.search = ""; } - + $.ajaxSetup({ beforeSend: function(jqXHR,settings) { // Only attach auth header for requests to relative paths @@ -89,7 +89,7 @@ RED.settings = (function () { load(done); } - + var load = function(done) { $.ajax({ headers: { @@ -104,6 +104,7 @@ RED.settings = (function () { RED.settings.remove("auth-tokens"); } console.log("Node-RED: " + data.version); + $('#node-red-version').text("v"+data.version); done(); }, error: function(jqXHR,textStatus,errorThrown) { @@ -141,7 +142,7 @@ RED.settings = (function () { set: set, get: get, remove: remove, - + theme: theme } }) diff --git a/editor/sass/style.scss b/editor/sass/style.scss index 08b90bd4b..d69043cf1 100644 --- a/editor/sass/style.scss +++ b/editor/sass/style.scss @@ -111,3 +111,8 @@ pre code { background-color: transparent; border: 0; } + +#node-red-version { + font-size: 0.8em; + color: #ddd; +} diff --git a/editor/templates/index.mst b/editor/templates/index.mst index 7c2f5ca0d..44d0009f2 100644 --- a/editor/templates/index.mst +++ b/editor/templates/index.mst @@ -68,7 +68,7 @@