From 14f9539eb4d6a54f5dd222d1b6cb1b558048a1a9 Mon Sep 17 00:00:00 2001 From: accius Date: Mon, 2 Feb 2026 16:06:52 -0500 Subject: [PATCH] fix psk --- public/index.html | 27 +++++++++++++++++++-------- src/components/PSKReporterPanel.jsx | 2 +- src/hooks/usePSKReporter.js | 11 +++++------ 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/public/index.html b/public/index.html index 8d6a48c..8df06fb 100644 --- a/public/index.html +++ b/public/index.html @@ -50,6 +50,19 @@ background: none; padding: 5px 0; } + a.button { + display: inline-block; + background: #4ade80; + color: #1a1a2e; + padding: 12px 24px; + border-radius: 6px; + text-decoration: none; + font-weight: bold; + margin: 20px 0; + } + a.button:hover { + background: #22c55e; + } .note { font-size: 0.9rem; color: #888; @@ -60,22 +73,20 @@

📻 OpenHamClock

-

The frontend needs to be built before running.

+

The modular frontend needs to be built first.

+ + Use Classic Version Instead +

Or build the modular version:

npm install npm run build npm start
-

Or use the quick start:

-
- npm install && npm start -
-

- If you're seeing this page, the build step was skipped.
- Running npm start should auto-build if needed. + The classic version works without building.
+ The modular version requires Node.js 18+ to build.

diff --git a/src/components/PSKReporterPanel.jsx b/src/components/PSKReporterPanel.jsx index 2bbb0a7..b0c11f0 100644 --- a/src/components/PSKReporterPanel.jsx +++ b/src/components/PSKReporterPanel.jsx @@ -16,11 +16,11 @@ const PSKReporterPanel = ({ callsign, onShowOnMap }) => { rxCount, stats, loading, + error, lastUpdate, refresh } = usePSKReporter(callsign, { minutes: timeWindow, - direction: 'both', enabled: callsign && callsign !== 'N0CALL' }); diff --git a/src/hooks/usePSKReporter.js b/src/hooks/usePSKReporter.js index f685ee0..225201d 100644 --- a/src/hooks/usePSKReporter.js +++ b/src/hooks/usePSKReporter.js @@ -1,10 +1,10 @@ /** * usePSKReporter Hook - * Fetches PSKReporter data showing where your signal is being received + * Fetches PSKReporter data showing where your digital mode signals are being received * * Uses HTTP API with server-side caching to respect PSKReporter rate limits. - * For real-time updates, connect directly to mqtt.pskreporter.info:1886 (wss) - * Topic: pskr/filter/v2/+/+/YOURCALL/# + * + * For real-time MQTT updates, see mqtt.pskreporter.info (requires mqtt.js library) */ import { useState, useEffect, useCallback } from 'react'; @@ -43,7 +43,6 @@ export const usePSKReporter = (callsign, options = {}) => { const [rxReports, setRxReports] = useState([]); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); - const [rateLimited, setRateLimited] = useState(false); const [lastUpdate, setLastUpdate] = useState(null); const fetchData = useCallback(async () => { @@ -90,7 +89,6 @@ export const usePSKReporter = (callsign, options = {}) => { setTxReports(processedTx); setRxReports(processedRx); - setRateLimited(data.tx?.rateLimited || data.rx?.rateLimited || false); setLastUpdate(new Date()); // Check for errors in response @@ -139,7 +137,8 @@ export const usePSKReporter = (callsign, options = {}) => { stats, loading, error, - rateLimited, + connected: false, // HTTP mode - not real-time connected + source: 'http', lastUpdate, refresh: fetchData };