v3.11.0 editor polish: keyset editor as a header table, in sync with TAR
The keyset rows were a stack of flex divs with no column labels. They are now a fixed-layout table like the TAR table: a thead with # (keyset number, with its tooltip), KIc, KID, KIc key, KID key, Counter and the action column, and <tr> rows of py-1 px-2 cells with w-full inputs (the columns drive the widths: 40/56/56 px, the two key columns split the remainder, 112 px for the 10-digit counter). Ids and behaviour are unchanged (the number span still toggles its red flag, the inputs keep their handlers). Guards: html.test.js checks the keyset table headers and tbody; cards_form.test.js checks the row markup. sw cache simple-v366. Tests: 665 Python + 788 frontend green; the whole inline PWA script syntax-checked.
This commit is contained in:
@@ -152,6 +152,12 @@ test('the card editor groups its fields into labelled fieldsets', () => {
|
||||
// the keyset editor and the PSK pair stay as implemented
|
||||
assert.match(scp80, /id="cards-keysets"/);
|
||||
assert.match(scp80, /onclick="cardsKeysetAdd\(\)"/);
|
||||
// ... and mirror the TAR table: a fixed-layout table with headers
|
||||
assert.match(scp80, /<table class="w-full table-fixed text-sm mb-2">/);
|
||||
assert.match(scp80, /<tbody id="cards-keysets">/);
|
||||
for (const h of ['KIc', 'KID', 'KIc key', 'KID key', 'Counter']) {
|
||||
assert.match(scp80, new RegExp('>' + h + '</th>'));
|
||||
}
|
||||
assert.match(scp81, /id="cards-psk-id"/);
|
||||
assert.match(scp81, /id="cards-psk-key"/);
|
||||
// the PSK explanation lives inside the SCP81 group, not outside it
|
||||
|
||||
Reference in New Issue
Block a user