mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Support for disabled categories in sidebar config
This commit is contained in:
parent
71f8de94b0
commit
5d1fa49045
@ -52,6 +52,7 @@ RED.sidebar.config = (function() {
|
|||||||
if (label) {
|
if (label) {
|
||||||
lockIcon = $('<span style="margin-right: 5px"><i class="fa fa-lock"/></span>').appendTo(header)
|
lockIcon = $('<span style="margin-right: 5px"><i class="fa fa-lock"/></span>').appendTo(header)
|
||||||
lockIcon.toggle(!!isLocked)
|
lockIcon.toggle(!!isLocked)
|
||||||
|
$('<span class="red-ui-sidebar-config-category-disabled-icon" style="margin-right: 5px"><i class="fa fa-ban"/></span>').appendTo(header)
|
||||||
$('<span class="red-ui-palette-node-config-label"/>').text(label).appendTo(header);
|
$('<span class="red-ui-palette-node-config-label"/>').text(label).appendTo(header);
|
||||||
} else {
|
} else {
|
||||||
$('<span class="red-ui-palette-node-config-label" data-i18n="sidebar.config.'+name+'">').appendTo(header);
|
$('<span class="red-ui-palette-node-config-label" data-i18n="sidebar.config.'+name+'">').appendTo(header);
|
||||||
@ -251,6 +252,8 @@ RED.sidebar.config = (function() {
|
|||||||
if (!validList[id]) {
|
if (!validList[id]) {
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
delete categories[id];
|
delete categories[id];
|
||||||
|
} else if (RED.nodes.workspace(id)) {
|
||||||
|
$(this).toggleClass("red-ui-sidebar-config-category-disabled", RED.nodes.workspace(id).disabled);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
var globalConfigNodes = [];
|
var globalConfigNodes = [];
|
||||||
|
@ -14,6 +14,25 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
.red-ui-sidebar-config-category-disabled-icon {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.red-ui-sidebar-config-category-disabled {
|
||||||
|
.red-ui-sidebar-config-tray-header {
|
||||||
|
font-style: italic;
|
||||||
|
color: var(--red-ui-tab-text-color-disabled-inactive) !important;
|
||||||
|
.red-ui-sidebar-config-category-disabled-icon {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.red-ui-sidebar-node-config-list {
|
||||||
|
.red-ui-palette-node-config {
|
||||||
|
@extend .red-ui-palette-node-config-disabled;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.red-ui-sidebar-node-config {
|
.red-ui-sidebar-node-config {
|
||||||
position: relative;
|
position: relative;
|
||||||
background: var(--red-ui-secondary-background);
|
background: var(--red-ui-secondary-background);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user