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:
@@ -106,12 +106,25 @@ test('netStateRender paints the service badge, location and rows', () => {
|
||||
assert.ok(els['netstate-location'].innerHTML.includes('Germany'));
|
||||
assert.ok(els['netstate-location'].innerHTML.includes('Guest (roaming)'));
|
||||
assert.ok(els['netstate-location'].innerHTML.includes('PLMN not allowed'));
|
||||
assert.ok(els['netstate-location'].innerHTML.includes(
|
||||
'Telekom<span class="block">Guest (roaming) · <span class="text-red-500">⛔ PLMN not allowed</span></span>'));
|
||||
assert.ok(!els['netstate-location'].innerHTML.includes('Telekom · '));
|
||||
assert.strictEqual(els['netstate-area'].textContent, 'LAI 6CD7');
|
||||
assert.ok(els['netstate-body'].innerHTML.includes('EF.IMSI'));
|
||||
assert.ok(els['netstate-body'].innerHTML.includes('262011234567890'));
|
||||
assert.ok(els['netstate-body'].innerHTML.includes('>write<'));
|
||||
});
|
||||
|
||||
test('netStateRender keeps the location on one line when there is no status', () => {
|
||||
const els = setup();
|
||||
decoder({});
|
||||
netStateRender({ service: { state: 'normal' }, files: {},
|
||||
network: { location: { mcc: '262', mnc: '01', country: 'Germany',
|
||||
operator: 'Telekom', area: 'LAI', lac: '6CD7' } } });
|
||||
assert.strictEqual(els['netstate-location'].innerHTML,
|
||||
'<span class="font-mono">262-01</span> · Germany · Telekom');
|
||||
});
|
||||
|
||||
test('netStateRender shows Undefined until something is simulated', () => {
|
||||
const els = setup();
|
||||
decoder({});
|
||||
|
||||
Reference in New Issue
Block a user