From be411a7b4b2c91a1e99abb86f114c82e7a14e872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D1=82=D0=BE=D0=BD=20=D0=A2=D1=80=D0=BE=D1=88?= =?UTF-8?q?=D0=B8=D0=BD?= Date: Wed, 30 Sep 2026 08:20:13 +0300 Subject: [PATCH] feat: toolkit parameters in three columns + one access row (v3.6.50) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- frontend/index.html | 41 +++++++++++++++++++---------------- frontend/sw.js | 2 +- frontend/tests/html.test.js | 12 ++++++++++ frontend/tests/ram.test.js | 8 +++++++ pyproject.toml | 2 +- pysim_simple_server/server.py | 2 +- 6 files changed, 45 insertions(+), 22 deletions(-) diff --git a/frontend/index.html b/frontend/index.html index ec9ee54..a61fd86 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -780,7 +780,7 @@ -
+
@@ -840,21 +840,25 @@
-
- -
-
- - -
- - +
+
+ +
+
+ +
+
+ +
+ + +
@@ -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 diff --git a/frontend/sw.js b/frontend/sw.js index 7783d17..be246fa 100644 --- a/frontend/sw.js +++ b/frontend/sw.js @@ -1,4 +1,4 @@ -const CACHE = 'simple-v322'; +const CACHE = 'simple-v323'; const URLS = [ 'index.html', 'help.html', diff --git a/frontend/tests/html.test.js b/frontend/tests/html.test.js index 8c22435..dd9c9a9 100644 --- a/frontend/tests/html.test.js +++ b/frontend/tests/html.test.js @@ -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 = /
[\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 = /
([\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'); + } +}); diff --git a/frontend/tests/ram.test.js b/frontend/tests/ram.test.js index 702fb48..8dd7f26 100644 --- a/frontend/tests/ram.test.js +++ b/frontend/tests/ram.test.js @@ -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'); +}); diff --git a/pyproject.toml b/pyproject.toml index f8c9bfc..702a002 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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. diff --git a/pysim_simple_server/server.py b/pysim_simple_server/server.py index 3801880..c803860 100644 --- a/pysim_simple_server/server.py +++ b/pysim_simple_server/server.py @@ -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