ui: the keyset row's remove button uses the red action style
The ✕ in the Cards keyset editor was a neutral bordered button with only a red hover; it now matches the preset list's Remove (bg-red-600 text-white, hover bg-red-700), keeping the glyph and the "Remove keyset" tooltip. keysets.test.js guards the red style. sw cache simple-v345.
This commit is contained in:
+1
-1
@@ -11404,7 +11404,7 @@ function cardsKeysetRowHtml(ks, i) {
|
|||||||
'<input id="cards-ks-' + i + '-kic-key" class="flex-1 ' + cls + '" placeholder="KIc key (hex)" value="' + esc(ks.kicKey || '') + '">' +
|
'<input id="cards-ks-' + i + '-kic-key" class="flex-1 ' + cls + '" placeholder="KIc key (hex)" value="' + esc(ks.kicKey || '') + '">' +
|
||||||
'<input id="cards-ks-' + i + '-kid-key" class="flex-1 ' + cls + '" placeholder="KID key (hex)" value="' + esc(ks.kidKey || '') + '">' +
|
'<input id="cards-ks-' + i + '-kid-key" class="flex-1 ' + cls + '" placeholder="KID key (hex)" value="' + esc(ks.kidKey || '') + '">' +
|
||||||
'<input id="cards-ks-' + i + '-cntr" class="w-24 ' + cls + '" maxlength="10" placeholder="Counter" value="' + esc(ks.cntr || '') + '">' +
|
'<input id="cards-ks-' + i + '-cntr" class="w-24 ' + cls + '" maxlength="10" placeholder="Counter" value="' + esc(ks.cntr || '') + '">' +
|
||||||
'<button type="button" onclick="cardsKeysetRemove(' + i + ')" class="px-2 py-1 text-xs rounded border border-gray-300 dark:border-slate-600 hover:bg-red-100 dark:hover:bg-red-900/40" title="' + esc(t('Remove keyset')) + '">\u2715</button>' +
|
'<button type="button" onclick="cardsKeysetRemove(' + i + ')" class="px-2 py-1 text-xs rounded bg-red-600 text-white hover:bg-red-700" title="' + esc(t('Remove keyset')) + '">\u2715</button>' +
|
||||||
'</div>';
|
'</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
const CACHE = 'simple-v344';
|
const CACHE = 'simple-v345';
|
||||||
const URLS = [
|
const URLS = [
|
||||||
'index.html',
|
'index.html',
|
||||||
'help.html',
|
'help.html',
|
||||||
|
|||||||
@@ -111,6 +111,8 @@ test('the Cards form wires the keyset editor', () => {
|
|||||||
assert.match(html, /onclick="cardsKeysetAdd\(\)"/);
|
assert.match(html, /onclick="cardsKeysetAdd\(\)"/);
|
||||||
assert.match(html, /oninput="cardsKeysetKvnUpdate\(/);
|
assert.match(html, /oninput="cardsKeysetKvnUpdate\(/);
|
||||||
assert.match(html, /data-l10n="Add keyset"/);
|
assert.match(html, /data-l10n="Add keyset"/);
|
||||||
|
// the remove button is the red action style, like the preset list's Remove
|
||||||
|
assert.match(html, /cardsKeysetRemove\(' \+ i \+ '\)" class="[^"]*bg-red-600 text-white/);
|
||||||
// the keyset rows are built with the KIc/KID/key/counter inputs
|
// the keyset rows are built with the KIc/KID/key/counter inputs
|
||||||
assert.match(html, /cards-ks-' \+ i \+ '-kic-key/);
|
assert.match(html, /cards-ks-' \+ i \+ '-kic-key/);
|
||||||
assert.match(html, /cards-ks-' \+ i \+ '-cntr/);
|
assert.match(html, /cards-ks-' \+ i \+ '-cntr/);
|
||||||
|
|||||||
Reference in New Issue
Block a user