ui: network-monitor status on its own line + Refresh translation (v2.7.3)

The location line in the Phone-tab network monitor grew too long once the
status was appended (e.g. "262-01 · Germany · Telekom · Guest (roaming)
 PLMN not allowed").  netStateRender now keeps the identity
(mcc-mnc · country · operator) on the first line and renders the status
elements (roaming tag + forbidden badge) in a block span on a second line;
a location without a status still renders on one line.

Also add the missing Russian translation for the monitor's Refresh button
(t() fell back to English): 'Refresh': 'Обновить'.

- frontend/index.html: two-line location render, LANG_RU Refresh, 2.7.3
- frontend/tests/netstate.test.js: pins the block-span layout and the
  one-line no-status case
- sw.js cache simple-v206; version trio 2.7.3
This commit is contained in:
2026-09-20 13:34:21 +03:00
parent 6bea10bb5b
commit cd802d965e
5 changed files with 22 additions and 6 deletions
+6 -3
View File
@@ -1414,7 +1414,7 @@
// ===== Version =====
// Single source of truth for the PWA version: shown in the header and used
// by the server version check in pysimConnect().
const SIMPLE_VERSION = '2.7.2';
const SIMPLE_VERSION = '2.7.3';
document.getElementById('app-version').textContent = 'v' + SIMPLE_VERSION;
// ===== Tab switching =====
@@ -12643,11 +12643,13 @@ function netStateRender(state) {
const loc = state && state.network ? state.network.location : null;
const locEl = document.getElementById('netstate-location');
if (loc) {
const statuses = [];
if (loc.roaming) statuses.push(esc(t(NET_STATE_ROAMING[loc.roaming] || loc.roaming)));
if (loc.rejected) statuses.push('<span class="text-red-500">⛔ ' + esc(t('PLMN not allowed')) + '</span>');
let h = '<span class="font-mono">' + esc(loc.mcc + '-' + loc.mnc) + '</span>';
if (loc.country) h += ' · ' + esc(loc.country);
if (loc.operator) h += ' · ' + esc(loc.operator);
if (loc.roaming) h += ' · ' + esc(t(NET_STATE_ROAMING[loc.roaming] || loc.roaming));
if (loc.rejected) h += ' <span class="text-red-500">⛔ ' + esc(t('PLMN not allowed')) + '</span>';
if (statuses.length) h += '<span class="block">' + statuses.join(' · ') + '</span>';
locEl.innerHTML = h;
} else {
locEl.innerHTML = '<span class="text-gray-400"></span>';
@@ -12949,6 +12951,7 @@ const LANG_RU = {
'pySim command line': 'Командная строка pySim',
'Raw APDU': 'Отправка APDU',
'Read': 'Прочитать',
'Refresh': 'Обновить',
'Save': 'Сохранить',
'Raw': 'Данные как на карте',
'Decoded': 'Декодированные данные',