@@ -2130,26 +2131,29 @@ async function stopCapture() {
function updateCaptureButton() {
const btn = el('capture-btn');
const newCapture = el('new-capture-btn');
- btn.classList.remove('stop', 'connect');
+ btn.classList.remove('stop', 'connect', 'disabled');
const captureOff = STATE.captureMode === 'disabled' && STATE.serverAvailable;
newCapture.style.display = captureOff ? 'none' : '';
- if (captureOff) {
- btn.style.display = 'none';
- return;
- }
- if (STATE.sessionViewId && !STATE.captureActive) {
- btn.style.display = 'none';
- return;
- }
btn.style.display = '';
if (!STATE.serverAvailable) {
btn.textContent = t('Connect to server');
btn.classList.add('connect');
+ btn.disabled = false;
+ btn.title = '';
+ } else if (captureOff) {
+ btn.textContent = t('Start Capture');
+ btn.classList.add('disabled');
+ btn.disabled = true;
+ btn.title = t('Capture is disabled — only pre-captured traces (saved sessions / PCAP import) are available.');
} else if (STATE.captureActive) {
btn.textContent = t('Stop Capture');
btn.classList.add('stop');
+ btn.disabled = false;
+ btn.title = '';
} else {
btn.textContent = t('Start Capture');
+ btn.disabled = false;
+ btn.title = '';
}
}
@@ -2518,7 +2522,7 @@ function onFilterChange() {
}
// ──────────────────── Versioning ────────────────────
-const PWA_VERSION = '1.22.3';
+const PWA_VERSION = '1.22.4';
const MIN_SERVER_VERSION = '1.0.0';
function parseVersion(v) {
diff --git a/frontend/sw.js b/frontend/sw.js
index f157ed8..54f8515 100644
--- a/frontend/sw.js
+++ b/frontend/sw.js
@@ -1,4 +1,4 @@
-const CACHE = 'simtrace-analyser-v35';
+const CACHE = 'simtrace-analyser-v36';
const PRECACHE = [
'index.html',
diff --git a/pyproject.toml b/pyproject.toml
index b776388..066ba47 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "setuptools.backends._legacy:_Backend"
[project]
name = "simtrace2-pysniff"
-version = "1.22.3"
+version = "1.22.4"
description = "Python-based sniffing tool for SIMtrace2 hardware (SIM card communication sniffer)"
readme = {file = "README.md", content-type = "text/markdown"}
license = {text = "GPL-2.0-or-later"}
diff --git a/simtrace2_pysniff/__init__.py b/simtrace2_pysniff/__init__.py
index ba9090d..9edbc99 100644
--- a/simtrace2_pysniff/__init__.py
+++ b/simtrace2_pysniff/__init__.py
@@ -6,7 +6,7 @@ from .gsmtap import GsmtapSender, GsmtapReceiver
from .pcap import PcapWriter
from .dump import FileDumper, format_message
-__version__ = '1.22.3'
+__version__ = '1.22.4'
__all__ = [
'SniffSession',
'DeviceDisconnected',
diff --git a/tests/test_pcap_import.py b/tests/test_pcap_import.py
index e03d1d0..d66f3b6 100644
--- a/tests/test_pcap_import.py
+++ b/tests/test_pcap_import.py
@@ -224,7 +224,7 @@ class TestImportEndpoint(unittest.TestCase):
class TestVersion(unittest.TestCase):
def test_package_version(self):
from simtrace2_pysniff import __version__
- self.assertEqual(__version__, '1.22.3')
+ self.assertEqual(__version__, '1.22.4')
def test_status_includes_version(self):
import os