fix mobile modern ui buttons
Signed-off-by: si458 <simonsmith5521@gmail.com>
si458 committed
May 27, 2026 at 22:51 UTC
ab8a885de6f2ab596a3baad2e1bb4dd29c7d9d40
2 files changed
+10
-11
public/styles/style-bootstrap.css
-1
@@ -4334,7 +4334,6 @@ body.is-mobile #deskarea4 {
4334
flex-wrap: nowrap !important;
4335
overflow-x: auto !important;
4336
-webkit-overflow-scrolling: touch;
4337
- font-size: 12px;
4337
}
4338
4339
/* Keyboard shortcut selector: constrain width on mobile so it doesn't
views/default3.handlebars
+10
-10
@@ -9072,21 +9072,21 @@
9072
if (((meshrights & (4 + 8 + 64 + 262144)) != 0) && (node.mtype < 3) && ((node.agent == null) || (node.agent.id != 34))) { x += '<input type=button class="btn btn-primary btn-sm me-2 mb-2" value="' + "Actions" + '" title="' + "Perform power actions on the device" + '" onclick=deviceActionFunction() />'; }
9073
x += '<input type=button class="btn btn-primary btn-sm me-2 mb-2" value="' + "Notes" + '" title="' + "View notes about this device" + '" onclick=showNotes(' + ((meshrights & 128) == 0) + ',"' + encodeURIComponentEx(node._id) + '") />';
9074
x += '<input type=button class="btn btn-primary btn-sm me-2 mb-2" value="' + "Log Event" + '" title="' + "Write an event for this device" + '" onclick=writeDeviceEvent("' + encodeURIComponentEx(node._id) + '") />';
9075
- if ((node.mtype == 2) && (connectivity & 1) && ((meshrights & 131072) != 0)) { x += '<input type=button class="btn btn-primary btn-sm me-2" cmenu=deskPreConfigScriptContextMenu value="' + "Run" + '" title="' + "Run commands on this device" + '" onclick=runDeviceCmd("' + encodeURIComponentEx(node._id) + '") />'; }
9075
+ if ((node.mtype == 2) && (connectivity & 1) && ((meshrights & 131072) != 0)) { x += '<input type=button class="btn btn-primary btn-sm me-2 mb-2" cmenu=deskPreConfigScriptContextMenu value="' + "Run" + '" title="' + "Run commands on this device" + '" onclick=runDeviceCmd("' + encodeURIComponentEx(node._id) + '") />'; }
9076
if (node.mtype != 4) {
9077
- if ((meshrights & 8) && (connectivity & 1) && ((meshrights & 16384) != 0) || ((node.pmt == 1) && ((features2 & 2) != 0))) { x += '<input type=button class="btn btn-primary btn-sm me-2" value="' + "Message" + '" title="' + "Display a text message on the remote device" + '" onclick=deviceMessageFunction() />'; }
9077
+ if ((meshrights & 8) && (connectivity & 1) && ((meshrights & 16384) != 0) || ((node.pmt == 1) && ((features2 & 2) != 0))) { x += '<input type=button class="btn btn-primary btn-sm me-2 mb-2" value="' + "Message" + '" title="' + "Display a text message on the remote device" + '" onclick=deviceMessageFunction() />'; }
9078
//if ((connectivity & 1) && (meshrights & 8) && (node.agent.id < 5)) { x += '<input type=button value=Toast title="' + "Display a text message of the remote device" + '" onclick=deviceToastFunction() />'; }
9079
- if ((meshrights & 8) && (connectivity & 1) && ((meshrights & 16384) != 0) || ((node.pmt == 1) && ((features2 & 2) != 0))) { x += '<input type=button class="btn btn-primary btn-sm me-2" value="' + "Chat" + '" title="' + "Open chat window to this computer" + '" onclick=deviceChat(event) />'; }
9079
+ if ((meshrights & 8) && (connectivity & 1) && ((meshrights & 16384) != 0) || ((node.pmt == 1) && ((features2 & 2) != 0))) { x += '<input type=button class="btn btn-primary btn-sm me-2 mb-2" value="' + "Chat" + '" title="' + "Open chat window to this computer" + '" onclick=deviceChat(event) />'; }
9080
if ((serverinfo != null) && (serverinfo.altmessenging != null) && (meshrights & 8) && (connectivity & 1)) {
9081
for (var i in serverinfo.altmessenging) {
9082
var am = serverinfo.altmessenging[i];
9083
if ((am.type == null) || (am.type == 'device')) {
9084
- x += '<input type=button class="btn btn-primary btn-sm me-2" value="' + EscapeHtml(serverinfo.altmessenging[i].name) + '" onclick=altDeviceChat(event,' + i + ') />';
9084
+ x += '<input type=button class="btn btn-primary btn-sm me-2 mb-2" value="' + EscapeHtml(serverinfo.altmessenging[i].name) + '" onclick=altDeviceChat(event,' + i + ') />';
9085
}
9086
}
9087
}
9088
if ((serverinfo.guestdevicesharing !== false) && (node.agent != null) && (node.agent.caps & 3) && (connectivity & 1) && ((meshrights & 0x80008) == 0x80008) && ((meshrights == 0xFFFFFFFF) || ((meshrights & 0x1000) == 0))) {
9089
- x += '<input type=button class="btn btn-primary btn-sm me-2" value="' + "Share" + '" title="' + "Create a link to share this device with a guest" + '" onclick=showShareDevice() />';
9089
+ x += '<input type=button class="btn btn-primary btn-sm me-2 mb-2" value="' + "Share" + '" title="' + "Create a link to share this device with a guest" + '" onclick=showShareDevice() />';
9090
QV('DeskGuestShareButton', true);
9091
} else {
9092
QV('DeskGuestShareButton', false);
@@ -9095,12 +9095,12 @@
9095
if ((node.mtype == 4) && (connectivity & 1)) {
9096
if (node.porttype == 'PDU') {
9097
if (node.pwr == 1) {
9098
- if (meshrights & 0x40000) { x += '<input type=button class="btn btn-primary btn-sm me-2" value="' + "Turn off" + '" title="' + "Turn off" + '" onclick=setIpPduState(0) />'; }
9098
+ if (meshrights & 0x40000) { x += '<input type=button class="btn btn-primary btn-sm me-2 mb-2" value="' + "Turn off" + '" title="' + "Turn off" + '" onclick=setIpPduState(0) />'; }
9099
} else if (node.pwr == 8) {
9100
- if (meshrights & 0x40) { x += '<input type=button class="btn btn-primary btn-sm me-2" value="' + "Turn on" + '" title="' + "Turn on" + '" onclick=setIpPduState(1) />'; }
9100
+ if (meshrights & 0x40) { x += '<input type=button class="btn btn-primary btn-sm me-2 mb-2" value="' + "Turn on" + '" title="' + "Turn on" + '" onclick=setIpPduState(1) />'; }
9101
}
9102
} else {
9103
- if (meshrights & 8) { x += '<input type=button class="btn btn-primary btn-sm me-2" value="' + "Remote Control" + '" title="' + "Remote Control" + '" onclick=openIpKvmRemoteControl("' + encodeURIComponentEx(node._id) + '") />'; }
9103
+ if (meshrights & 8) { x += '<input type=button class="btn btn-primary btn-sm me-2 mb-2" value="' + "Remote Control" + '" title="' + "Remote Control" + '" onclick=openIpKvmRemoteControl("' + encodeURIComponentEx(node._id) + '") />'; }
9104
}
9105
}
9106
@@ -9108,7 +9108,7 @@
9108
if ((customui != null) && (customui.devicebuttons != null)) {
9109
for (var i in customui.devicebuttons) {
9110
if ((customui.devicebuttons[i].showif == null) || ((mesh != null) && (customui.devicebuttons[i].showif == mesh._id)) || (customui.devicebuttons[i].showif == currentNode._id)) {
9111
- x += '<input id="cui:' + i + '" type="button" class="btn btn-primary btn-sm me-2" value="' + customui.devicebuttons[i].name + '" onclick=customUIAction(event,"devicebuttons") /> ';
9111
+ x += '<input id="cui:' + i + '" type="button" class="btn btn-primary btn-sm me-2 mb-2" value="' + customui.devicebuttons[i].name + '" onclick=customUIAction(event,"devicebuttons") /> ';
9112
}
9113
}
9114
}
@@ -9335,7 +9335,7 @@
9335
// Show user device permissions
9336
x = '';
9337
if (meshrights & 7) {
9338
- x += '<button class="btn btn-primary btn-sm me-2" onclick="return p20showAddMeshUserDialog(5)" style=cursor:pointer;margin-right:10px><i class="fa-solid fa-circle-plus"></i> ' + "Add User" + '</button>';
9338
+ x += '<button class="btn btn-primary btn-sm me-2 mb-2" onclick="return p20showAddMeshUserDialog(5)" style=cursor:pointer;margin-right:10px><i class="fa-solid fa-circle-plus"></i> ' + "Add User" + '</button>';
9339
if (usergroups != null) {
9340
var userGroupCount = 0, newUserGroup = false;
9341
for (var i in usergroups) {