From aa7767f37cb91aeb6f3511c03877c92c9e3dfe62 Mon Sep 17 00:00:00 2001 From: si458 Date: Mon, 28 Oct 2024 13:35:43 +0000 Subject: [PATCH] fix menu bar and swap icons in bootstrap Signed-off-by: si458 --- views/default3.handlebars | 119 +++++++++++++++++++++----------------- 1 file changed, 65 insertions(+), 54 deletions(-) diff --git a/views/default3.handlebars b/views/default3.handlebars index 607ef88b..9f7593c4 100644 --- a/views/default3.handlebars +++ b/views/default3.handlebars @@ -429,40 +429,47 @@ -
-
- - - - - - - - - - -
-
- {{!-- --}} + - - {{!-- --}}
+
+ + + + + + + + + + +
+
- + + - +
'; @@ -5125,7 +5130,7 @@ r += '
'; if ((view == 1) || (view == 2) || (view == 3) || (view == 5)) { var collapsed = CollapsedGroups['pwr:' + pwr]; - r += ''; // Collapse action + r += ''; // Collapse action } r += '' + PowerStateStr2(node.pwr) + '
'; @@ -5201,12 +5206,12 @@ if (view == 2) { r += '
'; var collapsed = CollapsedGroups['tag:' + encodeURIComponentEx(i)]; - r += ''; // Collapse action + r += ''; // Collapse action r += '' + groupCount[i] + ' node' + ((groupCount[i] > 1) ? 's' : '') + '' + EscapeHtml(i).split('|').join(' → ').split('**INDV*~*DEVS**').join('' + "Individual Devices" + '') + '
' + groups[i]; } else { r += '
' + format(((groupCount[i] > 1) ? '{0} nodes' : '{0} node'), groupCount[i]) + ''; var collapsed = CollapsedGroups['tag:' + encodeURIComponentEx(i)]; - r += ''; // Collapse action + r += ''; // Collapse action r += '' + EscapeHtml(i).split('|').join(' → ').split('**INDV*~*DEVS**').join('' + "Individual Devices" + '') + '
'; r += '
' + groups[i] + '
'; // Open collapse div } @@ -5241,7 +5246,7 @@ // Collapsing header & start collapsing area deviceHeaderId2++; var collapsed = CollapsedGroups[mesh._id]; - r += ''; // Collapse action + r += ''; // Collapse action r += '' + EscapeHtml(mesh.name) + ''; r += getMeshActions(mesh, meshrights); @@ -5827,7 +5832,13 @@ if (x) { delete CollapsedGroups[id2]; } else { CollapsedGroups[id2] = true; } QV('DevxCol' + id, x); } - Q('DevxColImg' + id).src = x ? 'images/c2.png' : 'images/c1.png'; + if (x) { + QC('DevxColImg' + id).remove('fa-chevron-right'); + QC('DevxColImg' + id).add('fa-chevron-down'); + } else { + QC('DevxColImg' + id).remove('fa-chevron-down'); + QC('DevxColImg' + id).add('fa-chevron-right'); + } putstore('_collapse', JSON.stringify(CollapsedGroups)); updateCollapseAllButton(); onDevicesScrollEx(); @@ -9645,7 +9656,7 @@ // Add the language and timezone of the browser to the server so the server can localize the time correctly. var tz = ''; try { tz = '&tz=' + encodeURIComponentEx(Intl.DateTimeFormat().resolvedOptions().timeZone); } catch (ex) { } - QH('p10html2', '' + x + '
' + "Day" + '' + "7 Day Power State" + '
'); + QH('p10html2', '' + x + '
' + "Day" + '' + "7 Day Power State" + '
'); } // Return a color for the given power state @@ -16853,7 +16864,7 @@ if (userdomain != '') { username += ', ' + userdomain + ''; } } - if ((user.otpsecret > 0) || (user.otphkeys > 0) || ((user.otpekey == 1) && (features & 0x00800000)) || ((user.phone != null) && (features & 0x04000000))) { username += ' '; } + if ((user.otpsecret > 0) || (user.otphkeys > 0) || ((user.otpekey == 1) && (features & 0x00800000)) || ((user.phone != null) && (features & 0x04000000))) { username += ' '; } if (user.phone != null) { username += ' '; } if ((user.siteadmin != null) && ((user.siteadmin & 32) != 0) && (user.siteadmin != 0xFFFFFFFF)) { username += ' '; } if ((user.msghandle != null) && (features2 & 0x02000000)) { username += ' '; } @@ -18039,7 +18050,7 @@ } if ((features2 & 0x02000000) || (user.msghandle != null)) { // If user messaging is enabled on the server or user has a messaging handle - x += addDeviceAttribute("Messaging", ' ' + (user.msghandle ? user.msghandle : ('' + "None" + '')) + ' '); + x += addDeviceAttribute("Messaging", ' ' + (user.msghandle ? user.msghandle : ('' + "None" + '')) + ' '); } // Display features @@ -18111,7 +18122,7 @@ if (user.otpdev > 0) { factors.push("Device Push"); } if ((user.phone != null) && (features & 0x04000000)) { factors.push("SMS"); } if ((user.msghandle != null) && (features2 & 0x04000000)) { factors.push("Messaging"); } - x += addDeviceAttribute("Security", ' ' + factors.join(', ')); + x += addDeviceAttribute("Security", ' ' + factors.join(', ')); } x += '
';