feat: toolkit parameters in three columns + one access row (v3.6.50)

The SIM/UICC Toolkit parameters grid is grid-cols-3 now: the 12 narrow
fields (priority, timers, text length, menus, first pos/id, last pos/id,
channels, MSL, TAR, access domain) fit in four clean rows, Max services
keeps its own row (it was a lone half-row in the 2-column layout) and the
file-access group is one col-span-3 row: File system access (full) ·
ADF.USIM access (full) · ADF AID (hex) + From card.

The ADF AID cell is its own rc-tk-adfaid-row; the whole group is wrapped
in rc-tk-access-row, which updateRcTkMode hides in SIM/CA mode (hiding
only the old checkbox rows would leave the AID field behind).

grid-cols-3/col-span-3 were already compiled (no Tailwind rebuild); the
html test pins the 3-column grid and the spanning access row with its
three cells, the JS guard pins the CA/EA visibility.

sw cache simple-v323; tests: 540 Python / 689 Node.
This commit is contained in:
2026-09-30 08:20:13 +03:00
parent 80c26f14f2
commit be411a7b4b
6 changed files with 45 additions and 22 deletions
+22 -19
View File
@@ -780,7 +780,7 @@
</select>
<div id="rc-tk-mode-hint" class="hidden mt-1 text-xs text-blue-700 dark:text-blue-300"></div>
</div>
<div class="grid grid-cols-2 gap-x-3 gap-y-2 text-sm">
<div class="grid grid-cols-3 gap-x-3 gap-y-2 text-sm">
<div>
<label class="block mb-1 text-xs font-medium text-gray-700 dark:text-slate-300" data-l10n="Priority (0 = RFU)">Priority (0 = RFU)</label>
<input id="rc-tk-priority" oninput="updateStkParamsHex()" type="number" min="0" max="255" value="255" class="font-mono w-full border border-gray-300 dark:border-slate-600 text-xs rounded px-2 py-1.5 dark:bg-slate-800">
@@ -840,21 +840,25 @@
<label class="block mb-1 text-xs font-medium text-gray-700 dark:text-slate-300" data-l10n="Max services">Max services</label>
<input id="rc-tk-services" oninput="updateStkParamsHex()" type="number" min="0" max="255" value="0" class="font-mono w-full border border-gray-300 dark:border-slate-600 text-xs rounded px-2 py-1.5 dark:bg-slate-800">
</div>
<div id="rc-tk-fsaccess-row" class="col-span-2">
<label class="flex items-center gap-2 text-xs font-medium text-gray-700 dark:text-slate-300">
<input id="rc-tk-fsaccess" type="checkbox" onchange="updateStkParamsHex()" class="rounded border-gray-300 dark:border-slate-600 dark:bg-slate-800">
<span data-l10n="File system access (full)">File system access (full)</span>
</label>
</div>
<div id="rc-tk-adfaccess-row" class="col-span-2">
<label class="flex items-center gap-2 text-xs font-medium text-gray-700 dark:text-slate-300">
<input id="rc-tk-adfaccess" type="checkbox" onchange="updateStkParamsHex()" class="rounded border-gray-300 dark:border-slate-600 dark:bg-slate-800">
<span data-l10n="ADF.USIM access (full)">ADF.USIM access (full)</span>
</label>
<label class="block mb-1 mt-1 text-xs text-gray-500 dark:text-slate-400" data-l10n="ADF AID (hex)">ADF AID (hex)</label>
<div class="flex items-center gap-2">
<input id="rc-tk-adfaid" oninput="updateStkParamsHex()" value="A0000000871002" maxlength="32" class="font-mono flex-1 border border-gray-300 dark:border-slate-600 text-xs rounded px-2 py-1 dark:bg-slate-800">
<button type="button" id="rc-tk-adfaid-from-card" data-needs="card" onclick="ramAdfAidFromCard()" class="px-2 py-1 text-xs rounded border border-gray-300 dark:border-slate-600 hover:bg-gray-200 dark:hover:bg-slate-700 text-gray-700 dark:text-slate-300 whitespace-nowrap disabled:opacity-40 disabled:cursor-not-allowed" data-l10n="From card">From card</button>
<div id="rc-tk-access-row" class="col-span-3 flex items-center gap-4">
<div id="rc-tk-fsaccess-row" class="flex items-center">
<label class="flex items-center gap-2 text-xs font-medium text-gray-700 dark:text-slate-300">
<input id="rc-tk-fsaccess" type="checkbox" onchange="updateStkParamsHex()" class="rounded border-gray-300 dark:border-slate-600 dark:bg-slate-800">
<span data-l10n="File system access (full)">File system access (full)</span>
</label>
</div>
<div id="rc-tk-adfaccess-row" class="flex items-center">
<label class="flex items-center gap-2 text-xs font-medium text-gray-700 dark:text-slate-300">
<input id="rc-tk-adfaccess" type="checkbox" onchange="updateStkParamsHex()" class="rounded border-gray-300 dark:border-slate-600 dark:bg-slate-800">
<span data-l10n="ADF.USIM access (full)">ADF.USIM access (full)</span>
</label>
</div>
<div id="rc-tk-adfaid-row" class="flex-1 min-w-0">
<label class="block mb-1 text-xs text-gray-500 dark:text-slate-400" data-l10n="ADF AID (hex)">ADF AID (hex)</label>
<div class="flex items-center gap-2">
<input id="rc-tk-adfaid" oninput="updateStkParamsHex()" value="A0000000871002" maxlength="32" class="font-mono flex-1 border border-gray-300 dark:border-slate-600 text-xs rounded px-2 py-1 dark:bg-slate-800">
<button type="button" id="rc-tk-adfaid-from-card" data-needs="card" onclick="ramAdfAidFromCard()" class="px-2 py-1 text-xs rounded border border-gray-300 dark:border-slate-600 hover:bg-gray-200 dark:hover:bg-slate-700 text-gray-700 dark:text-slate-300 whitespace-nowrap disabled:opacity-40 disabled:cursor-not-allowed" data-l10n="From card">From card</button>
</div>
</div>
</div>
</div>
@@ -1745,7 +1749,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 = '3.6.49';
const SIMPLE_VERSION = '3.6.50';
document.getElementById('app-version').textContent = 'v' + SIMPLE_VERSION;
// ===== Tab switching =====
@@ -2630,8 +2634,7 @@ function updateRcTkMode() {
const isSim = document.getElementById('rc-tk-mode').value === 'ca';
document.getElementById('rc-tk-ad-row').style.display = isSim ? '' : 'none';
document.getElementById('rc-tk-services-row').style.display = isSim ? 'none' : '';
document.getElementById('rc-tk-fsaccess-row').style.display = isSim ? 'none' : '';
document.getElementById('rc-tk-adfaccess-row').style.display = isSim ? 'none' : '';
document.getElementById('rc-tk-access-row').style.display = isSim ? 'none' : '';
}
// The install form's checkbox grants (privileges, toolkit enable, file
+1 -1
View File
@@ -1,4 +1,4 @@
const CACHE = 'simple-v322';
const CACHE = 'simple-v323';
const URLS = [
'index.html',
'help.html',
+12
View File
@@ -492,3 +492,15 @@ test('the RAM operation modal is wide enough for the step lines', () => {
assert.ok(m, 'RAM op modal not found');
assert.ok(m[1].includes('max-w-3xl'), 'the modal was widened to fit the step lines: ' + m[1]);
});
test('the toolkit parameters grid is three columns with the access row last', () => {
// 12 narrow fields fit in 4 rows (the MSL select makes a 13th cell, so
// the file-access group spans the full width as its own last row) - v3.6.50
const grid = /<div class="grid grid-cols-3 gap-x-3 gap-y-2 text-sm">[\s\S]*?id="rc-tk-access-row"/.exec(html);
assert.ok(grid, 'toolkit grid must be 3 columns with the access row in it');
const row = /<div id="rc-tk-access-row" class="col-span-3 flex items-center gap-4">([\s\S]*?)<\/div>\s*<\/div>/.exec(html);
assert.ok(row, 'the access row spans the grid width');
for (const id of ['rc-tk-fsaccess-row', 'rc-tk-adfaccess-row', 'rc-tk-adfaid-row']) {
assert.ok(row[1].includes(id), id + ' must sit in the access row');
}
});
+8
View File
@@ -892,3 +892,11 @@ test('the expanded-details checkbox is a sticky preference', () => {
assert.strictEqual(store['simple_ram_expanded'], '0'); // ticking stores it
delete globalThis.localStorage;
});
test('SIM toolkit mode hides the UICC file-access row', () => {
// the file-access group (checkboxes + ADF AID) is one spanning row now:
// it must follow the CA/EA visibility (v3.6.50)
const src = extractFunc(html, 'updateRcTkMode');
assert.ok(src.includes('rc-tk-access-row'),
'the access row must follow the CA/EA visibility');
});
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "pysim-simple-server"
version = "3.6.49"
version = "3.6.50"
description = "HTTP REST server wrapping pysim for the SIMple PWA"
requires-python = ">=3.8"
# pysim is a git-only dependency installed explicitly by setup.bat/setup.sh.
+1 -1
View File
@@ -31,7 +31,7 @@ from osmocom.tlv import BER_TLV_IE
from osmocom.utils import rpad
VERSION = '3.6.49'
VERSION = '3.6.50'
MAX_ENVELOPE_SEGMENTS = 5 # max SMS segments for outgoing C-APDU in ENVELOPE