fix: dashcam mobile shows filename, RPM/fuel/throttle don't append unit when disconnected
- yaris.css: split mobile rules by list ID — video-list shows thumb+actions, dashcam-file-list shows dash-col-file+actions; thead display:none !important - yaris.js: check data !== '-' before appending rpm/°C/% units so disconnected state shows — instead of '- rpm' Co-authored-by: Copilot <[email protected]>
This commit is contained in:
+4
-4
@@ -161,22 +161,22 @@ socket.on('obd_speed', function (data) {
|
||||
|
||||
socket.on('obd_rpm', function (data) {
|
||||
const el = document.getElementById('obd-rpm');
|
||||
if (el) el.textContent = data != null ? data + ' rpm' : '—';
|
||||
if (el) el.textContent = (data != null && data !== '-') ? data + ' rpm' : '—';
|
||||
});
|
||||
|
||||
socket.on('obd_coolant_temp', function (data) {
|
||||
const el = document.getElementById('obd-coolant');
|
||||
if (el) el.textContent = data != null ? data + ' °C' : '—';
|
||||
if (el) el.textContent = (data != null && data !== '-') ? data + ' °C' : '—';
|
||||
});
|
||||
|
||||
socket.on('obd_fuel_level', function (data) {
|
||||
const el = document.getElementById('obd-fuel');
|
||||
if (el) el.textContent = data != null ? data + ' %' : '—';
|
||||
if (el) el.textContent = (data != null && data !== '-') ? data + ' %' : '—';
|
||||
});
|
||||
|
||||
socket.on('obd_throttle', function (data) {
|
||||
const el = document.getElementById('obd-throttle');
|
||||
if (el) el.textContent = data != null ? data + ' %' : '—';
|
||||
if (el) el.textContent = (data != null && data !== '-') ? data + ' %' : '—';
|
||||
});
|
||||
|
||||
socket.on('obd_error', function (data) {
|
||||
|
||||
Reference in New Issue
Block a user