From 269ad51f7e2160b99d5c65c7d993e21f60df4ddd 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: Tue, 25 Aug 2026 00:11:56 +0300 Subject: [PATCH] SP page: por_ok syncs the selected card preset's counter; v1.9.8 When a secured packet is accepted (por_ok) and a card is selected in the SP-page card dropdown, the new normalized counter is written back into that preset (cards[].cntr), persisted via cardsSave() and reflected in the presets table via cardsRender(). Placeholder option and unselected state are skipped. Form bump + preset sync happen in the same okPor block, so form and stored preset always climb together. Version 1.9.7 -> 1.9.8 everywhere; SW cache otaman-v18 -> otaman-v19 --- docs/api.md | 2 +- frontend/index.html | 9 ++++++++- frontend/sw.js | 2 +- pyproject.toml | 2 +- pysim_otaman_server/server.py | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/docs/api.md b/docs/api.md index a28e21e..e0648d0 100644 --- a/docs/api.md +++ b/docs/api.md @@ -54,7 +54,7 @@ Returns server version for compatibility checking. **Example response:** ```json -{"version": "1.9.7"} +{"version": "1.9.8"} ``` ### `GET /api/status` diff --git a/frontend/index.html b/frontend/index.html index 49efd97..f694a5b 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -18,7 +18,7 @@
-

OTAMan SIM OTA with a Human Face v1.9.7

+

OTAMan SIM OTA with a Human Face v1.9.8

github @@ -4116,6 +4116,13 @@ async function pysimSendOta() { cntrEl.value = ((parseInt(cntrEl.value, 16) || 0) + 1) .toString(16).toUpperCase().padStart(10, '0').slice(-10); document.getElementById('sp-result').value = ''; + // keep the selected card preset in sync with the new counter (v1.9.8) + const selIdx = parseInt(document.getElementById('sp-card-sel').value, 10); + if (!isNaN(selIdx) && cards[selIdx]) { + cards[selIdx].cntr = cntrEl.value; + cardsSave(); + cardsRender(); + } } } sendResultEl.textContent = msg; diff --git a/frontend/sw.js b/frontend/sw.js index 8c69078..91bae7f 100644 --- a/frontend/sw.js +++ b/frontend/sw.js @@ -1,4 +1,4 @@ -const CACHE = 'otaman-v18'; +const CACHE = 'otaman-v19'; const URLS = [ 'index.html', 'help.html', diff --git a/pyproject.toml b/pyproject.toml index 16e428c..a45e534 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "pysim-otaman-server" -version = "1.9.7" +version = "1.9.8" description = "HTTP REST server wrapping pysim for the OTAMan PWA" requires-python = ">=3.8" # pysim is a git-only dependency installed explicitly by setup.bat/setup.sh. diff --git a/pysim_otaman_server/server.py b/pysim_otaman_server/server.py index d343beb..c6fa9e9 100644 --- a/pysim_otaman_server/server.py +++ b/pysim_otaman_server/server.py @@ -18,7 +18,7 @@ from osmocom.construct import GsmOrUcs2Adapter from osmocom.tlv import BER_TLV_IE -VERSION = '1.9.7' +VERSION = '1.9.8' # Static file serving (the PWA lives in /frontend, served by this server