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
This commit is contained in:
+8
-1
@@ -18,7 +18,7 @@
|
||||
<div class="max-w-7xl mx-auto px-6 py-2">
|
||||
|
||||
<div class="flex items-center justify-between mb-3">
|
||||
<h1 class="text-2xl font-bold text-heading">OTAMan <span id="slogan" class="text-sm font-normal text-gray-500 dark:text-slate-400 ml-2" data-l10n="SIM OTA with a Human Face">SIM OTA with a Human Face</span> <span class="text-xs text-gray-400 dark:text-slate-500 ml-1">v1.9.7</span></h1>
|
||||
<h1 class="text-2xl font-bold text-heading">OTAMan <span id="slogan" class="text-sm font-normal text-gray-500 dark:text-slate-400 ml-2" data-l10n="SIM OTA with a Human Face">SIM OTA with a Human Face</span> <span class="text-xs text-gray-400 dark:text-slate-500 ml-1">v1.9.8</span></h1>
|
||||
<div class="flex items-center gap-4">
|
||||
<button id="install-btn" 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" style="display:none">INSTALL PWA [for offline use]</button>
|
||||
<a href="https://github.com/anttro/otaman" target="_blank" class="text-xs text-gray-400 hover:text-gray-600 dark:text-slate-500 dark:hover:text-slate-300">github</a>
|
||||
@@ -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;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
const CACHE = 'otaman-v18';
|
||||
const CACHE = 'otaman-v19';
|
||||
const URLS = [
|
||||
'index.html',
|
||||
'help.html',
|
||||
|
||||
Reference in New Issue
Block a user