From 8c37797a6ad554f813d7aea353af5c1766b73720 Mon Sep 17 00:00:00 2001 From: hobbyquaker Date: Fri, 24 May 2019 21:21:03 +0200 Subject: [PATCH] node-red editor themes, add midnight-red theme --- .../node-red-themes/midnight-red/midnight.css | 988 ++++++++++++++++++ .../midnight-red/theme-tomorrow.js | 864 +++++++++++++++ addon_files/redmatic/www/js/script.js | 24 + addon_files/redmatic/www/settings.html | 12 + update.sh | 1 + update_themes.sh | 11 + 6 files changed, 1900 insertions(+) create mode 100644 addon_files/redmatic/lib/node-red-themes/midnight-red/midnight.css create mode 100644 addon_files/redmatic/lib/node-red-themes/midnight-red/theme-tomorrow.js create mode 100755 update_themes.sh diff --git a/addon_files/redmatic/lib/node-red-themes/midnight-red/midnight.css b/addon_files/redmatic/lib/node-red-themes/midnight-red/midnight.css new file mode 100644 index 00000000..70726743 --- /dev/null +++ b/addon_files/redmatic/lib/node-red-themes/midnight-red/midnight.css @@ -0,0 +1,988 @@ +/* + midnight-red - https://github.com/bonanitech/midnight-red +*/ + +.breadcrumb { + background-color: #434954; +} + +.breadcrumb>li { + text-shadow: 0 1px 0 #444; +} + +.debug-filter-box { + background-color: #383C45; + border-bottom-color: #2E333A; +} + +.debug-message { + border-bottom-color: #383C45; + border-left-color: #383C45; + border-right-color: #383C45; +} + +.debug-message-element { + color: #EDEDED; +} + +.debug-message-meta { + background-color: #434954; + color: #EDEDED; +} + +.debug-message-name { + color: #EDEDED; +} + +.debug-message-object-handle { + color: #bbb; +} + +.debug-message-object-key { + color: #EDEDED; +} + +.debug-message-payload { + background-color: #434954; +} + +.debug-message-row:hover { + background-color: #434954; +} + +.debug-message-tools .editor-button-small i.fa-terminal { + color: #EDEDED !important; +} + +.debug-message-tools .editor-button-small i.fa-terminal:hover { + color: #4d4c4c !important; +} + +.debug-message-type-meta { + color: #bbb; +} + +.debug-message-type-number { + color: #2C92D5; +} + +.debug-message-type-string { + color: orange; +} + +.debug-message-type-string:hover { + color: #b72828; +} + +.dropdown-menu { + background-color: #434954; + border-color: #2E333A; +} + +.dropdown-menu>li>a { + color: #EDEDED; +} + +.editor-button { + background-color: #434954; + border-color: #2E333A; + color: #EDEDED !important; +} + +.editor-button:not(.disabled):not(:disabled):hover i.fa-terminal { + color: #666 !important; + background-color: #ddd; +} + +.editor-tray { + background-color: #434954; + border-bottom-color: #2E333A; + border-left-color: #2E333A; +} + +.editor-tray-breadcrumbs li { + color: #EDEDED; +} + +.editor-tray-footer { + background-color: #434954; + border-top-color: #2E333A; +} + +.editor-tray-header { + background-color: #383C45; + border-bottom-color: #2E333A; +} + +.editor-tray-resize-handle { + background-color: #434954; + border-left-color: #2E333A; +} + +.editor-tray-resize-handle.editor-tray-resize-maximised { + background-color: #434954; +} + +.editor-tray-titlebar { + border-bottom-color: #2E333A; +} + +.editor-tray-toolbar button.leftButton { + color: #444 !important; +} + +.editor-tray-toolbar button { + border-color: #2E333A; + color: #444 !important; + background-color: #fff; +} + +.form-row { + color: #EDEDED; +} + +.form-row label { + color: #EDEDED; +} + +.form-row label:hover { + color: #666; +} + +.form-tips { + background-color: #434954; + border-color: #2E333A; + color: #EDEDED; +} + +.horizontal { + stroke: #383C45; +} + +.innerCanvas>rect { + fill: #434954; +} + +.innerCanvas>rect.lasso { + fill: rgba(20, 125, 255, 0.1); +} + +.keyboard-shortcut-list-header { + border-bottom-color: #2E333A; +} + +.link_background { + stroke: #383C45; +} + +.link_outline { + stroke: #383C45; +} + +.node { + stroke: #383C45; +} + +.node_label { + color: #383C45; +} + +.node-dialog-view-diff-headers div { + background-color: #434954; + border-color: #2E333A; + border-left-color: #2E333A; + border-top-color: #2E333A; + color: #EDEDED; +} + +.node-dialog-view-diff-headers div:last-child { + border-right-color: #2E333A; + color: #EDEDED; +} + +.node-dialog-view-diff-panel .node-dialog-view-diff-diff li { + background-color: #383C45; +} + +.node-diff-element .debug-message-row:hover { + background-color: #f3f3f3; +} + +.node-diff-node-description { + color: #aaa; +} + +.node-diff-node-entry td, +.node-diff-node-entry th { + border-left-color: #2E333A; + border-top-color: #2E333A; +} + +.node-diff-node-entry tr:hover { + color: #222; +} + +.node-diff-node-entry-cell { + border-left-color: #2E333A; +} + +.node-diff-node-entry-header:hover { + color: #666; +} + +.node-diff-node-entry-properties { + color: #aaa; +} + +.node-diff-node-entry:first-child { + border-top-color: #2E333A; +} + +.node-diff-node-entry:not(:last-child) { + border-bottom-color: #2E333A; +} + +.node-diff-node-unchanged .node-diff-status { + color: #aaa; +} + +.node-diff-property-cell.node-diff-node-changed { + background-color: #434954; +} + +.node-diff-tab { + background-color: #434954; + border-color: #2E333A; + color: #EDEDED; +} + +.node-diff-tab-title:hover { + color: #666; +} + +.node-help .node-info-header { + color: #EDEDED; +} + +.node-help { + background-color: #434954; + color: #EDEDED; +} + +.node-help dl.message-properties { + border-color: #2E333A; +} + +.node-help dl.message-properties>dt .property-type { + color: #999; +} + +.node-help dl.message-properties>dt { + color: orange; +} + +.node-help ol.node-ports li { + border-color: #2E333A; +} + +.node-info { + border-color: #2E333A; +} + +.node-info-tips { + color: #EDEDED; + border-top-color: #2E333A; + background-color: #434954; +} + +.node-input-markdown-panel-preview { + border-color: #2E333A; +} + +.node-input-markdown-editor #dialog-form .red-ui-panel:last-child { + background-color: #434954; +} + +.node_status_label { + fill: #DEDEDE; + stroke: #EDEDED; +} + +.node-text-diff table.node-text-diff-content { + border-color: #2E333A; +} + +.node-text-diff table.node-text-diff-content td.lineno { + background-color: #434954; +} + +.node-text-diff table.node-text-diff-content tr.node-text-diff-commit-header td .commit-summary { + border-top-color: #2E333A; +} + +.node-text-diff table.node-text-diff-content tr.node-text-diff-commit-header td { + background-color: #434954; + color: #EDEDED; +} + +.node-text-diff table.node-text-diff-content tr.node-text-diff-file-header td { + background-color: #383C45; + color: #EDEDED; +} + +.node-text-diff table.node-text-diff-content tr.node-text-diff-header>td:not(.flow-diff) { + border-bottom-color: #2E333A; + border-top-color: #2E333A; +} + +.node-text-editor { + border-color: #2E333A; +} + +.node-text-editor-container { + border-color: #2E333A; +} + +.notification { + background-color: #434954; + color: #EDEDED; +} + +.palette_label { + color: #383C45; +} + +.palette_node { + border-color: #383C45; +} + +.palette-button { + background-color: #434954; + border-color: #2E333A; + color: #EDEDED !important; +} + +.palette-category { + border-bottom-color: #2E333A; +} + +.palette-content { + background-color: #434954; +} + +.palette-header { + background-color: #383C45; + color: #EDEDED; +} + +.palette-header:hover { + background-color: #999 !important; +} + +.palette-module-meta { + color: #EDEDED; +} + +.palette-search { + background-color: #383C45; + border-bottom-color: #2E333A; +} + +.palette-spinner { + background-color: #434954; +} + +.projects-branch-list .red-ui-editableList { + border-color: #2E333A; +} + +.projects-branch-list .red-ui-editableList .red-ui-editableList-container li { + background-color: #2E333A; +} + +.projects-branch-list .red-ui-searchBox-container { + border-top-color: #2E333A; + border-left-color: #2E333A; + border-right-color: #2E333A; +} + +.projects-dialog-list .red-ui-editableList-container { + background-color: #434954; +} + +.projects-dialog-list-dialog { + background-color: #434954; + border-color: #2E333A; +} + +.projects-dialog-list-dialog .projects-dialog-list-dialog-header { + background-color: #383C45; +} + +.projects-dialog-list-entry .entry-icon { + color: #EDEDED; +} + +.projects-dialog-project-list-container { + border-color: #2E333A; +} + +.projects-dialog-project-list-entry .projects-dialog-project-list-entry-current { + color: #222; +} + +.projects-dialog-project-list-entry .projects-dialog-project-list-entry-name { + color: #222; +} + +.projects-dialog-project-list-entry { + background-color: #434954; + border-left-color: #999; + border-right-color: #999; +} + +.projects-dialog-project-list-entry.projects-list-entry-current:not(.selectable) { + background-color: #434954; +} + +.projects-dialog-project-list-entry.selected { + background-color: #434954; + border-left-color: #999; + border-right-color: #999; +} + +.projects-dialog-ssh-key-list .projects-dialog-ssh-key-header:hover { + color: #222; +} + +.projects-dialog-spinner { + background-color: #434954; +} + +.projects-dialog-spinner.projects-dialog-spinner-sidebar { + background-color: #434954; +} + +.projects-dialog-spinner.projects-version-control-spinner-sidebar { + background-color: #434954; +} + +.projects-dialog-screen-start button.editor-button { + border-color: #2E333A; +} + +.projects-dialog-screen-start button.editor-button i { + color: #EDEDED; +} + +.projects-dialog-screen-start .projects-dialog-screen-start-hero { + color: #EDEDED; +} + +.projects-dialog-screen-start .projects-dialog-screen-start-hero h1 { + color: #2E333A; +} + +.projects-edit-form form .form-row label { + color: #222; +} + +.red-ui-editableList-border .red-ui-editableList-header { + border-bottom-color: #2E333A; +} + +.red-ui-editableList-border { + border-color: #2E333A; +} + +.red-ui-editableList-container li .red-ui-editableList-item-handle { + color: #222; +} + +.red-ui-editableList-container li { + background-color: #434954; + border-bottom-color: #2E333A; +} + +.red-ui-icon-list-module { + background-color: #383C45; + color: #EDEDED; +} + +.red-ui-icon-meta { + border-top-color: #2E333A; +} + +.red-ui-icon-meta span { + color: #EDEDED; +} + +.red-ui-icon-picker { + background-color: #434954; + border-color: #2E333A; +} + +.red-ui-panels-separator { + border-top-color: #2E333A; + border-bottom-color: #2E333A; + background-color: #434954; +} + +.red-ui-panels.red-ui-panels-horizontal .red-ui-panels-separator { + border-left-color: #2E333A; + border-right-color: #2E333A; +} + +.red-ui-search { + background-color: #434954; + border-color: #2E333A; +} + +.red-ui-search-container { + border-bottom-color: #2E333A; +} + +.red-ui-search-result { + border-left-color: #434954; + border-right-color: #434954; + color: #EDEDED; +} + +.red-ui-search-result-node { + background-color: #434954; + border-color: #2E333A; +} + +.red-ui-search-result-node-label { + color: #EDEDED; +} + +.red-ui-search-result:hover .red-ui-search-result-node-label { + color: #222; +} + +.red-ui-search-results-container .red-ui-editableList-container { + background-color: #434954; +} + +.red-ui-search-results-container { + background-color: #434954; +} + +.red-ui-searchBox-container .red-ui-searchBox-resultCount { + background-color: #434954; + color: #222; +} + +.red-ui-searchBox-container input { + background-color: #434954; +} + +.red-ui-stack .palette-category { + background-color: #434954; +} + +.red-ui-stack { + background-color: #434954; +} + +.red-ui-tab-button { + background-color: #434954; + border-bottom-color: #2E333A; +} + +.red-ui-tab-button a { + background-color: #434954; + border-bottom-color: #2E333A; + border-color: #2E333A; +} + +.red-ui-tab-close { + background-color: #383C45; + color: #aaa; +} + +.red-ui-tab-link-buttons { + background-color: #434954; + border-bottom-color: #2E333A; +} + +.red-ui-tab-link-buttons a.red-ui-tab-link-button-menu { + background-color: #383C45; + border-color: #2E333A; +} + +.red-ui-tab-link-buttons a.red-ui-tab-link-button:not(.active) { + background-color: #383C45; + border-color: #2E333A; +} + +.red-ui-tab-link-buttons a.selected:not(.disabled):not(:disabled) { + background-color: #434954; + border-color: #2E333A; + color: #EDEDED !important; +} + +.red-ui-tabs { + background-color: #434954; +} + +.red-ui-tabs ul { + border-bottom-color: #2E333A; +} + +.red-ui-tabs ul li { + background-color: #383C45; + border-color: #2E333A; +} + +.red-ui-tabs ul li a.red-ui-tab-label { + color: #EDEDED; +} + +.red-ui-tabs ul li.active { + background-color: #434954; + border-bottom-color: #434954; + border-color: #2E333A; +} + +.red-ui-tabs ul li.active a { + color: #EDEDED; +} + +.red-ui-tabs ul li.active a.red-ui-tab-close { + background-color: #434954; +} + +.red-ui-tabs.red-ui-tabs-add.red-ui-tabs-scrollable { + background-color: #434954; +} + +.red-ui-tabs.red-ui-tabs-vertical { + background-color: #434954; + border-right-color: #2E333A; +} + +.red-ui-tabs.red-ui-tabs-vertical ul li { + border-color: #2E333A; +} + +.red-ui-tabs.red-ui-tabs-vertical ul li:last-child { + border-bottom-color: #2E333A; +} + +.red-ui-tabs.red-ui-tabs-vertical ul li:not(:first-child) { + border-top-color: #2E333A; +} + +.red-ui-tabs.red-ui-tabs-vertical ul li.active { + border-right-color: #434954; +} + +.red-ui-type-search .red-ui-search-result-separator { + border-bottom-color: #2E333A; +} + +.red-ui-typedInput-container { + border-color: #2E333A; +} + +.red-ui-typedInput-options a:focus { + color: #222; +} + +.red-ui-typedInput-options a:hover { + color: #222; +} + +.sidebar-footer-button { + background-color: #434954; + border-color: #2E333A; + color: #EDEDED !important; +} + +.sidebar-header { + background-color: #383C45; + border-bottom-color: #2E333A; +} + +.sidebar-version-control-commit-sha { + color: #ff7f0e; +} + +.sidebar-node-config { + background-color: #434954; +} + +.sidebar-version-control .red-ui-editableList-container { + background-color: #434954; +} + +.sidebar-version-control .red-ui-editableList-container li { + background-color: #434954; +} + +.sidebar-version-control-branch-list-entry { + background-color: #434954; + border-left-color: #2E333A; + border-right-color: #2E333A; + color: #EDEDED; +} + +.sidebar-version-control-branch-list-entry:not(.input-error):hover { + background-color: #f3f3f3; + color: #666; +} + +.sidebar-version-control-change-entry.node-info-none { + background-color: #434954; +} + +.sidebar-version-control-change-header { + background-color: #434954; + border-bottom-color: #2E333A; + border-top-color: #2E333A; + color: #aaa; +} + +.sidebar-version-control-commit-entry:hover .sidebar-version-control-commit-subject { + color: #222; +} + +.sidebar-version-control-commit-subject { + color: #EDEDED; +} + +.sidebar-version-control-slide-box { + background-color: #434954; +} + +.sidebar-version-control-slide-box.sidebar-version-control-slide-box-bottom { + border-top-color: #2E333A; +} + +.sidebar-version-control-slide-box.sidebar-version-control-slide-box-top { + background-color: #434954; + border-bottom-color: #2E333A; + border-left-color: #2E333A; + border-right-color: #2E333A; + color: #EDEDED; +} + +.ui-dialog .ui-dialog-titlebar { + background-color: #383C45; + border-bottom-color: #2E333A; +} + +.ui-dialog { + background-color: #434954; + border-color: #2E333A; +} + +.ui-spinner { + border-color: #2E333A; +} + +.ui-spinner-input { + background-color: #434954; +} + +.ui-widget textarea { + background-color: #434954 !important; +} + +.ui-widget-content { + background: #434954; + border-color: #2E333A; +} + +.ui-widget-content a { + color: #EDEDED; +} + +.ui-widget-header { + color: #EDEDED; +} + +.uneditable-input, +div[contenteditable="true"], +input[type="color"], +input[type="date"], +input[type="datetime-local"], +input[type="datetime"], +input[type="email"], +input[type="month"], +input[type="number"], +input[type="password"], +input[type="search"], +input[type="tel"], +input[type="text"], +input[type="time"], +input[type="url"], +input[type="week"], +textarea { + background-color: #383C45; + border-color: #2E333A; + color: #EDEDED; +} + +.vertical { + stroke: #383C45; +} + +.workspace-footer-button { + background-color: #434954; + border-color: #2E333A; + color: #EDEDED !important; +} + +.workspace-footer-button-toggle, +.workspace-footer-button-toggle.single { + background-color: #434954; + border-color: #2E333A; + color: #EDEDED !important; +} + +.workspace-footer-button-toggle:not(.disabled):not(:disabled):focus { + color: #EDEDED !important; +} + +#chart { + background-color: #434954; +} + +#halt_if_help { + color: #EDEDED; +} + +#node-input-link-container { + background-color: #434954; +} + +#palette { + background-color: #434954; + border-color: #2E333A; +} + +#palette-editor .expanded .palette-module-set-button { + color: #888 !important; +} + +#palette-editor .palette-editor-toolbar { + background-color: #383C45; + border-bottom-color: #2E333A; + color: #EDEDED; +} + +#palette-editor .palette-module-more { + background-color: #383C45; +} + +#palette-editor .palette-module-set { + border-color: #2E333A; +} + +#palette-editor .palette-module-type { + color: #EDEDED; +} + +#palette-editor .red-ui-editableList-container { + background-color: #434954; +} + +#palette-editor .red-ui-editableList-container li .disabled { + background-color: #383C45; +} + +#palette-footer { + background-color: #434954; + border-top-color: #2E333A; +} + +#project-settings-tab-deps .palette-module-unknown { + border: 1px dashed #aaa; + background-color: #434954; +} + +#sidebar { + background-color: #434954; + border-color: #2E333A; +} + +#sidebar-footer { + background-color: #434954; + border-top-color: #2E333A; +} + +#sidebar-separator { + background-color: #434954; +} + +#user-settings-tabs-content h3:not(:first-child) { + border-top-color: #2E333A; +} + +#workspace { + border-color: #2E333A; +} + +#workspace-footer { + background-color: #434954; + border-top-color: #2E333A; +} + +#workspace-tabs:not(.workspace-focussed) li.red-ui-tab.active a { + color: #ccc; +} + +#workspace-toolbar { + background-color: #434954; + border-bottom-color: #2E333A; + color: #aaa; +} + +#workspace-toolbar .spinner-value { + background-color: #434954; +} + +a:hover, +a:focus { + color: #EDEDED; + text-decoration: underline; +} + +body { + background-color: #434954; + color: #222; +} + +div.projects-dialog-ssh-public-key pre { + border-color: #2E333A; +} + +label { + color: #EDEDED; +} + +li.selected .red-ui-search-result-node-label { + color: #222; +} + +table.node-info tr:not(.blank) { + border-bottom-color: #2E333A; + border-top-color: #2E333A; +} + +table.node-info tr:not(.blank) td:first-child { + background-color: #383C45; + border-right-color: #2E333A; + color: #EDEDED; +} + +table.node-info tr:not(.blank) td:last-child { + color: #EDEDED; +} + +table.node-info tr.blank a { + color: #EDEDED; +} \ No newline at end of file diff --git a/addon_files/redmatic/lib/node-red-themes/midnight-red/theme-tomorrow.js b/addon_files/redmatic/lib/node-red-themes/midnight-red/theme-tomorrow.js new file mode 100644 index 00000000..7a52c47f --- /dev/null +++ b/addon_files/redmatic/lib/node-red-themes/midnight-red/theme-tomorrow.js @@ -0,0 +1,864 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + midnight-red/theme-tomorrow.js at master · bonanitech/midnight-red · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Skip to content +
+ + + + + + + + +
+ +
+ + +
+ +
+ + + +
+
+
+ + + + + + + + + + + +
+
+ + + + + + + + Permalink + + + + + +
+ + +
+ + Branch: + master + + + + + + + +
+ +
+ + Find file + + + Copy path + +
+
+ + +
+ + Find file + + + Copy path + +
+
+ + + + +
+
+ + + + + Fix header link + + + + ef754e2 + Mar 12, 2019 + +
+ +
+
+ + 1 contributor + + +
+ +

+ Users who have contributed to this file +

+
+ +
+
+
+
+ + + + + + +
+ +
+ +
+ 2 lines (2 sloc) + + 2.56 KB +
+ +
+ +
+ Raw + Blame + History +
+ + +
+ + + +
+
+
+ + + +
+ + + + + + + + + + +
// midnight-red - https://github.com/bonanitech/midnight-red
ace.define("ace/theme/tomorrow",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-tomorrow",t.cssText=".ace-tomorrow .ace_gutter {background: #3c414b;color: #EDEDED}.ace-tomorrow .ace_print-margin {width: 1px;background: #f6f6f6}.ace-tomorrow {background-color: #434954;color: #EDEDED}.ace-tomorrow .ace_cursor {color: #AEAFAD}.ace-tomorrow .ace_marker-layer .ace_selection {background: #D6D6D6}.ace-tomorrow.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #434954;}.ace-tomorrow .ace_marker-layer .ace_step {background: rgb(255, 255, 0)}.ace-tomorrow .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #D1D1D1}.ace-tomorrow .ace_marker-layer .ace_active-line {background: #434954}.ace-tomorrow .ace_gutter-active-line {background-color : #3c414b}.ace-tomorrow .ace_marker-layer .ace_selected-word {border: 1px solid #D6D6D6}.ace-tomorrow .ace_invisible {color: #D1D1D1}.ace-tomorrow .ace_keyword,.ace-tomorrow .ace_meta,.ace-tomorrow .ace_storage,.ace-tomorrow .ace_storage.ace_type,.ace-tomorrow .ace_support.ace_type {color: #8959A8}.ace-tomorrow .ace_keyword.ace_operator {color: #3E999F}.ace-tomorrow .ace_constant.ace_character,.ace-tomorrow .ace_constant.ace_language,.ace-tomorrow .ace_constant.ace_numeric,.ace-tomorrow .ace_keyword.ace_other.ace_unit,.ace-tomorrow .ace_support.ace_constant,.ace-tomorrow .ace_variable.ace_parameter {color: #F5871F}.ace-tomorrow .ace_constant.ace_other {color: #666969}.ace-tomorrow .ace_invalid {color: #434954;background-color: #C82829}.ace-tomorrow .ace_invalid.ace_deprecated {color: #434954;background-color: #8959A8}.ace-tomorrow .ace_fold {background-color: #4271AE;border-color: #EDEDED}.ace-tomorrow .ace_entity.ace_name.ace_function,.ace-tomorrow .ace_support.ace_function,.ace-tomorrow .ace_variable {color: #4271AE}.ace-tomorrow .ace_support.ace_class,.ace-tomorrow .ace_support.ace_type {color: #C99E00}.ace-tomorrow .ace_heading,.ace-tomorrow .ace_markup.ace_heading,.ace-tomorrow .ace_string {color: #718C00}.ace-tomorrow .ace_entity.ace_name.ace_tag,.ace-tomorrow .ace_entity.ace_other.ace_attribute-name,.ace-tomorrow .ace_meta.ace_tag,.ace-tomorrow .ace_string.ace_regexp,.ace-tomorrow .ace_variable {color: #C82829}.ace-tomorrow .ace_comment {color: #8E908C}.ace-tomorrow .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bdu3f/BwAlfgctduB85QAAAABJRU5ErkJggg==) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)})
+ + + +
+ +
+ + + +
+ + +
+ + +
+
+ + + +
+ +
+ +
+
+ + +
+ + + + + + +
+ + + You can’t perform that action at this time. +
+ + + + + + + + + + + + + + +
+ + + + diff --git a/addon_files/redmatic/www/js/script.js b/addon_files/redmatic/www/js/script.js index 13911abf..f1d71df2 100644 --- a/addon_files/redmatic/www/js/script.js +++ b/addon_files/redmatic/www/js/script.js @@ -30,6 +30,7 @@ $(document).ready(() => { const $staticauthSet = $('#staticauth-set'); const $projects = $('#projects'); + const $theme = $('#theme'); const $backup = $('#backup'); const $alertSaved = $('#alert-saved'); @@ -376,6 +377,14 @@ $(document).ready(() => { $projects.prop('disabled', true); } + if (config.editorTheme.page) { + switch (config.editorTheme.page.css) { + case '/usr/local/addons/redmatic/lib/node-red-themes/midnight-red/midnight.css': + $theme.val('midnight-red'); + break; + } + } + // Migration from 1.x to 2.x if (config.contextStorage.default && config.contextStorage.default.module === 'localfilesystem') { config.contextStorage.default.module = 'file'; @@ -421,6 +430,21 @@ $(document).ready(() => { } }); + $theme.change(() => { + switch ($theme.val()) { + case 'midnight-red': + config.editorTheme.page = { + css: '/usr/local/addons/redmatic/lib/node-red-themes/midnight-red/midnight.css', + scripts: '/usr/local/addons/redmatic/lib/node-red-themes/midnight-red//theme-tomorrow.js' + }; + break; + + default: + delete config.editorTheme.page; + } + save(); + }); + $contextStorageDefault.change(() => { if (!config.contextStorage) { config.contextStorage = {}; diff --git a/addon_files/redmatic/www/settings.html b/addon_files/redmatic/www/settings.html index e52ae415..ba680a6d 100644 --- a/addon_files/redmatic/www/settings.html +++ b/addon_files/redmatic/www/settings.html @@ -168,6 +168,18 @@ +
+
+
+ + +
+
+
+
diff --git a/update.sh b/update.sh index 47b6b222..5207a4d2 100755 --- a/update.sh +++ b/update.sh @@ -12,6 +12,7 @@ cd $BUILD_DIR/addon_files/redmatic/www $BUILD_DIR/node_modules/.bin/ncu -u cd $BUILD_DIR +./update_themes.sh node update_package.js node update_nodejs.js node update_readme.js diff --git a/update_themes.sh b/update_themes.sh new file mode 100755 index 00000000..57dcd428 --- /dev/null +++ b/update_themes.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +BUILD_DIR=`cd ${0%/*} && pwd -P` +THEMES_DIR=$BUILD_DIR/addon_files/redmatic/lib/node-red-themes + +echo "update theme bonanitech/midnight-red" +mkdir -p $THEMES_DIR/midnight-red +curl --silent --show-error -o $THEMES_DIR/midnight-red/midnight.css https://raw.githubusercontent.com/bonanitech/midnight-red/master/midnight.css +curl --silent --show-error -o $THEMES_DIR/midnight-red/theme-tomorrow.js https://github.com/bonanitech/midnight-red/blob/master/theme-tomorrow.js + +git add $THEMES_DIR