diff --git a/frontend/index.html b/frontend/index.html index 903602e..b5c2010 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1641,25 +1641,25 @@
PIN/ADM
-
- - +
+ +
-
- - +
+ +
-
- - +
+ +
-
- - +
+ +
-
- - +
+ +

All codes are optional

@@ -1675,21 +1675,17 @@ -
- The first three rows are the fixed role TARs; add further TARs as needed. - -
-

Each TAR carries its MSL (Minimum SPI1) — the card checks it before the security processing (TS 102 226 8.2.1.3.2.4); the packet SPI1 is derived from it.

+ +

The first three rows are the fixed role TARs; add further TARs as needed.

+

Each TAR carries its MSL (Minimum SPI1) — the card checks it before the security processing (TS 102 226 8.2.1.3.2.4); the packet SPI1 is derived from it.

SCP80 (GSM 03.48, ETSI TS 102 225) -
- OTA keysets — each with its own number and counter - -
+ OTA keysets — each with its own number and counter
-

KIc and KID must carry the same keyset number (their high nibble) in the range 01-0F — TS 102 225 A.2; each keyset has its own counter on the card (Annex A.1).

+ +

KIc and KID must carry the same keyset number (their high nibble) in the range 01-0F — TS 102 225 A.2; each keyset has its own counter on the card (Annex A.1).

SCP81 (HTTP OTA) @@ -11901,14 +11897,14 @@ const CARDS_TAR_ROLE_DESC = { function cardsTarRowHtml(e, i) { const cls = 'border border-gray-300 dark:border-slate-600 text-sm rounded px-2 py-1.5 dark:bg-slate-800 font-mono'; const role = CARDS_TAR_ROLES[i] || ''; - let cells = '' + - ''; + let cells = '' + + ''; if (role) { cells += '' + esc(CARDS_TAR_ROLE_DESC[role] || '') + '' + - ''; + ''; } else { - cells += '' + - ''; + cells += '' + + ''; } return '' + cells + ''; } diff --git a/frontend/sw.js b/frontend/sw.js index 3dbc281..71b8107 100644 --- a/frontend/sw.js +++ b/frontend/sw.js @@ -1,4 +1,4 @@ -const CACHE = 'simple-v363'; +const CACHE = 'simple-v364'; const URLS = [ 'index.html', 'help.html', diff --git a/frontend/tests/cards_form.test.js b/frontend/tests/cards_form.test.js index 40c45e4..3199906 100644 --- a/frontend/tests/cards_form.test.js +++ b/frontend/tests/cards_form.test.js @@ -532,6 +532,13 @@ test('packing without a selected preset uses the spec default TAR', () => { assert.strictEqual(els['sp-tar'].value, '000000'); }); +test('the TAR row values are left-aligned like the headers', () => { + const out = cardsTarRowHtml({ tar: 'AF4D01', msl: '0A', desc: 'x' }, 3); + assert.doesNotMatch(out, /text-center/); + assert.match(out, / { const els = setup(); cardsTarRowsRender([{ tar: 'AF4D01', msl: '0A', desc: 'one' }, diff --git a/frontend/tests/html.test.js b/frontend/tests/html.test.js index 1135446..65197d9 100644 --- a/frontend/tests/html.test.js +++ b/frontend/tests/html.test.js @@ -183,13 +183,25 @@ test('the PIN/ADM and TAR fieldsets share one responsive row', () => { assert.match(row, /data-l10n="TAR"/); assert.match(row, /class="[^"]*rounded p-3 lg:w-56 shrink-0"/); assert.match(row, /class="[^"]*rounded p-3 flex-1 min-w-0"/); - // the codes are a vertical list, label above each input - assert.match(row, /class="space-y-2"[\s\S]*?for="cards-pin1"[\s\S]*?id="cards-pin1"/); + // the codes are one-line rows: label left, input right + assert.match(row, /class="flex items-center gap-2"[\s\S]*?for="cards-pin1"[\s\S]*?id="cards-pin1"/); + assert.match(row, /for="cards-pin1"[^>]*class="w-10 shrink-0/); // the hint is the short form assert.match(row, /data-l10n="All codes are optional"/); assert.ok(!row.includes('not consumed yet'), 'the long codes hint is gone'); }); +test('the Add TAR / Add keyset buttons sit below their lists, green', () => { + assert.match(html, /onclick="cardsTarAdd\(\)" class="[^"]*bg-emerald-600[^"]*"/); + assert.match(html, /onclick="cardsKeysetAdd\(\)" class="[^"]*bg-emerald-600[^"]*"/); + assert.ok(html.indexOf('id="cards-tars"') < html.indexOf('onclick="cardsTarAdd()"'), + 'Add TAR must follow the TAR list'); + assert.ok(html.indexOf('id="cards-keysets"') < html.indexOf('onclick="cardsKeysetAdd()"'), + 'Add keyset must follow the keyset list'); + assert.ok(html.indexOf('onclick="cardsKeysetAdd()"') > html.indexOf('data-l10n="OTA keysets'), + 'the keyset label stays above the list'); +}); + test('the Cards tab splits the preset list and the editor into views', () => { assert.match(html, /id="cards-list-view"/); assert.match(html, /id="cards-editor-view" class="hidden"/);