mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Add theme tests
This commit is contained in:
@@ -18,8 +18,9 @@ var express = require("express");
|
||||
var util = require("util");
|
||||
var path = require("path");
|
||||
var fs = require("fs");
|
||||
var clone = require("clone");
|
||||
|
||||
var themeContext = {
|
||||
var defaultContext = {
|
||||
page: {
|
||||
title: "Node-RED",
|
||||
favicon: "favicon.ico"
|
||||
@@ -30,6 +31,7 @@ var themeContext = {
|
||||
}
|
||||
};
|
||||
|
||||
var themeContext = clone(defaultContext);
|
||||
var themeSettings = null;
|
||||
|
||||
function serveFile(app,baseUrl,file) {
|
||||
@@ -51,6 +53,9 @@ module.exports = {
|
||||
init: function(settings) {
|
||||
var i;
|
||||
var url;
|
||||
themeContext = clone(defaultContext);
|
||||
themeSettings = null;
|
||||
|
||||
if (settings.editorTheme) {
|
||||
var theme = settings.editorTheme;
|
||||
themeSettings = {};
|
||||
|
Reference in New Issue
Block a user