From 2e37492c261652d68f96f5cc5c022e147288e912 Mon Sep 17 00:00:00 2001 From: kambereBr Date: Mon, 6 Jan 2025 03:23:19 +0200 Subject: [PATCH] [ENH] Add toggle for new MeshCentral UI in settings and in top headbar of the modern UI --- public/styles/style-bootstrap.css | 9 ++++++++- views/default3.handlebars | 33 +++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/public/styles/style-bootstrap.css b/public/styles/style-bootstrap.css index f69c9e68..3d30e5fe 100644 --- a/public/styles/style-bootstrap.css +++ b/public/styles/style-bootstrap.css @@ -2870,7 +2870,7 @@ nav .lbbuttonsel2 { width: 28px; } -.viewSelector3 { +.viewSelector3, .uiSelector7 { margin-left: 2px; margin-top: 2px; background: url(../images/views.png) -56px 0px; @@ -2970,6 +2970,13 @@ nav .lbbuttonsel2 { background-color: #AAA; } +.uiSelector_end { + width: 32px; + height: 32px; + float: left; + margin: 3px; +} + .uiSelectorSel { background-color: #BBB; opacity: 0.8; diff --git a/views/default3.handlebars b/views/default3.handlebars index a09a622e..bc949b72 100644 --- a/views/default3.handlebars +++ b/views/default3.handlebars @@ -153,6 +153,17 @@ + +
+ + + + + +
+ +
+
+
+
+
+
 
@@ -2685,6 +2702,22 @@ QV('body', true); } + function saveUserInterfaceMode() { + var nUiViewMode = 0; + if (Q('ui1').checked) { nUiViewMode = 1; } + putstore('uiViewMode', nUiViewMode); + } + + function toggleBootstrapUIMode() { + if (xxdialogMode) return; + var uiViewMode = getstore('uiViewMode', '0'); + var x = '
'; + x += '
'; + setModalContent('xxAddAgent', 'User Interface', x); + showModal('xxAddAgentModal', 'idx_dlgOkButton', saveUserInterfaceMode); + QV('uiMenu', false); + } + function getNodeFromId(id) { if (nodes != null) { for (var i in nodes) { if (nodes[i]._id == id) return nodes[i]; } } return null; } function reload() { var x = window.location.href;