@node-red/editor-api 4.0.5 → 4.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/auth/index.js +8 -0
- package/lib/editor/theme.js +15 -3
- package/package.json +4 -4
package/lib/auth/index.js
CHANGED
|
@@ -126,6 +126,14 @@ async function login(req,res) {
|
|
|
126
126
|
if (themeContext.login && themeContext.login.image) {
|
|
127
127
|
response.image = themeContext.login.image;
|
|
128
128
|
}
|
|
129
|
+
if (themeContext.login?.message) {
|
|
130
|
+
response.loginMessage = themeContext.login?.message
|
|
131
|
+
}
|
|
132
|
+
if (themeContext.login?.button) {
|
|
133
|
+
response.prompts = [
|
|
134
|
+
{ type: "button", ...themeContext.login.button }
|
|
135
|
+
]
|
|
136
|
+
}
|
|
129
137
|
}
|
|
130
138
|
res.json(response);
|
|
131
139
|
}
|
package/lib/editor/theme.js
CHANGED
|
@@ -206,14 +206,26 @@ module.exports = {
|
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
if (theme.login) {
|
|
209
|
+
let themeContextLogin = {}
|
|
210
|
+
let hasLoginTheme = false
|
|
209
211
|
if (theme.login.image) {
|
|
210
212
|
url = serveFile(themeApp,"/login/",theme.login.image);
|
|
211
213
|
if (url) {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
}
|
|
214
|
+
themeContextLogin.image = url
|
|
215
|
+
hasLoginTheme = true
|
|
215
216
|
}
|
|
216
217
|
}
|
|
218
|
+
if (theme.login.message) {
|
|
219
|
+
themeContextLogin.message = theme.login.message
|
|
220
|
+
hasLoginTheme = true
|
|
221
|
+
}
|
|
222
|
+
if (theme.login.button) {
|
|
223
|
+
themeContextLogin.button = theme.login.button
|
|
224
|
+
hasLoginTheme = true
|
|
225
|
+
}
|
|
226
|
+
if (hasLoginTheme) {
|
|
227
|
+
themeContext.login = themeContextLogin
|
|
228
|
+
}
|
|
217
229
|
}
|
|
218
230
|
themeApp.get("/", async function(req,res) {
|
|
219
231
|
const themePluginList = await runtimeAPI.plugins.getPluginsByType({type:"node-red-theme"});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node-red/editor-api",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.7",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
}
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@node-red/util": "4.0.
|
|
20
|
-
"@node-red/editor-client": "4.0.
|
|
19
|
+
"@node-red/util": "4.0.7",
|
|
20
|
+
"@node-red/editor-client": "4.0.7",
|
|
21
21
|
"bcryptjs": "2.4.3",
|
|
22
22
|
"body-parser": "1.20.3",
|
|
23
23
|
"clone": "2.1.2",
|
|
24
24
|
"cors": "2.8.5",
|
|
25
25
|
"express-session": "1.18.1",
|
|
26
|
-
"express": "4.21.
|
|
26
|
+
"express": "4.21.2",
|
|
27
27
|
"memorystore": "1.6.7",
|
|
28
28
|
"mime": "3.0.0",
|
|
29
29
|
"multer": "1.4.5-lts.1",
|