diff --git a/editor/js/user.js b/editor/js/user.js
index 895adcb3d..e115ce813 100644
--- a/editor/js/user.js
+++ b/editor/js/user.js
@@ -22,7 +22,7 @@ RED.user = (function() {
}
var dialog = $('
'+
- '
'+
+ '
'+
'
'+
''+
'
'+
@@ -45,6 +45,13 @@ RED.user = (function() {
success: function(data) {
if (data.type == "credentials") {
var i=0;
+
+ if (data.image) {
+ $("#node-dialog-login-image").attr("src",data.image);
+ } else {
+ $("#node-dialog-login-image").attr("src","red/images/node-red-256.png");
+ }
+
for (;i
",{class:"form-row"});
diff --git a/red/api/auth/index.js b/red/api/auth/index.js
index f89395fa5..733235bf2 100644
--- a/red/api/auth/index.js
+++ b/red/api/auth/index.js
@@ -22,6 +22,8 @@ var Tokens = require("./tokens");
var Users = require("./users");
var permissions = require("./permissions");
+var theme = require("../theme");
+
var settings = null;
var log = require("../../log");
@@ -80,6 +82,9 @@ function login(req,res) {
"type":"credentials",
"prompts":[{id:"username",type:"text",label:"Username"},{id:"password",type:"password",label:"Password"}]
}
+ if (theme.context().login && theme.context().login.image) {
+ response.image = theme.context().login.image;
+ }
}
res.json(response);
}
diff --git a/red/api/theme.js b/red/api/theme.js
index 2f474e2b1..fb3e5c41b 100644
--- a/red/api/theme.js
+++ b/red/api/theme.js
@@ -51,7 +51,7 @@ function serveFile(app,baseUrl,file) {
app.get(url,function(req, res) {
res.sendfile(file);
});
- return url;
+ return "theme"+url;
} catch(err) {
//TODO: log filenotfound
return null;
@@ -79,7 +79,7 @@ module.exports = {
for (i=0;i