mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Add version number of sidebar footer
This commit is contained in:
@@ -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
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user