fix actions modal popup and icon changes

Signed-off-by: si458 <simonsmith5521@gmail.com>

si458 committed Nov 10, 2024 at 22:27 UTC 911d987a84cf431065f473447ff82f06b420d063
1 file changed +9 -5
views/default3.handlebars
+9 -5
@@ -9517,6 +9517,7 @@
9517 if (op == 100) {
9518 // Device wake
9519 meshserver.send({ action: 'wakedevices', nodeids: [currentNode._id] });
9520 + return true;
9521 } else if (op == 103) {
9522 // Send MQTT Message
9523 p10showSendMqttMsgDialog([currentNode._id]);
@@ -9569,10 +9570,13 @@
9570 } else if ((op == 400) || (op == 401)) {
9571 // Flash / vibrate
9572 meshserver.send({ action: 'poweraction', nodeids: [currentNode._id], actiontype: parseInt(op), time: parseInt(Q('d2devicetime').value) });
9573 + return true;
9574 } else {
9575 // Power operation
9576 meshserver.send({ action: 'poweraction', nodeids: [currentNode._id], actiontype: parseInt(op) });
9577 + return true;
9578 }
9579 + return false;
9580 }
9581
9582 function deviceActionOneClickRecovery() {
@@ -18664,9 +18668,9 @@
18668 dateHeader = printDate(time);
18669 x += '<table class="table table-hover p3eventsTable" cellpadding=0 cellspacing=0><tr><td colspan=4 class=DevSt>' + dateHeader + '</td></tr>';
18670 }
18667 - var icon = 'si3';
18668 - if (event.etype == 'user') icon = 'm2';
18669 - if (event.etype == 'server') icon = 'si3';
18671 + var icon = 'fa-mobile-screen';
18672 + if (event.etype == 'user') icon = 'fa-user';
18673 + if (event.etype == 'server') icon = 'fa-server';
18674
18675 var msg;
18676 if ((event.msgid == null) || (eventsMessageId[event.msgid] == null)) {
@@ -18699,8 +18703,8 @@
18703 } else if (event.guestname) {
18704 msg = '<span title="' + "This is a guest sharing session" + '">' + EscapeHtml(event.guestname) + '</span> &rarr; ' + msg;
18705 }
18702 - if (event.etype == 'relay' || event.action == 'relaylog') icon = 'relayIcon16';
18703 - x += '<tr onclick=showEventDetails(' + event.h + ',3) onmouseover=eventMouseHover(this,1) onmouseout=eventMouseHover(this,0) style=cursor:pointer><td style=width:18px><div class=' + icon + '></div></td><td class=g1>&nbsp;</td><td class=style10>' + printTime(time) + ' - ' + msg + '</td></tr><tr></tr>';
18706 + if (event.etype == 'relay' || event.action == 'relaylog') icon = 'fa-arrow-right-arrow-left';
18707 + x += '<tr onclick=showEventDetails(' + event.h + ',3) onmouseover=eventMouseHover(this,1) onmouseout=eventMouseHover(this,0) style=cursor:pointer><td style=width:18px><i class="fa-solid ' + icon + '"></i></td><td class=g1>&nbsp;</td><td class=style10>' + printTime(time) + ' - ' + msg + '</td></tr><tr></tr>';
18708 }
18709 }
18710 if (dateHeader != null) x += '</table>';