pull/37/head
accius 2 days ago
parent 54287f1a4b
commit 14f9539eb4

@ -50,6 +50,19 @@
background: none; background: none;
padding: 5px 0; 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 { .note {
font-size: 0.9rem; font-size: 0.9rem;
color: #888; color: #888;
@ -60,22 +73,20 @@
<body> <body>
<div class="container"> <div class="container">
<h1>📻 OpenHamClock</h1> <h1>📻 OpenHamClock</h1>
<p>The frontend needs to be built before running.</p> <p>The modular frontend needs to be built first.</p>
<a href="/index-monolithic.html" class="button">Use Classic Version Instead</a>
<p style="margin-top: 30px;">Or build the modular version:</p>
<div class="command"> <div class="command">
<code>npm install</code> <code>npm install</code>
<code>npm run build</code> <code>npm run build</code>
<code>npm start</code> <code>npm start</code>
</div> </div>
<p>Or use the quick start:</p>
<div class="command">
<code>npm install && npm start</code>
</div>
<p class="note"> <p class="note">
If you're seeing this page, the build step was skipped.<br> The classic version works without building.<br>
Running <code>npm start</code> should auto-build if needed. The modular version requires Node.js 18+ to build.
</p> </p>
</div> </div>
</body> </body>

@ -16,11 +16,11 @@ const PSKReporterPanel = ({ callsign, onShowOnMap }) => {
rxCount, rxCount,
stats, stats,
loading, loading,
error,
lastUpdate, lastUpdate,
refresh refresh
} = usePSKReporter(callsign, { } = usePSKReporter(callsign, {
minutes: timeWindow, minutes: timeWindow,
direction: 'both',
enabled: callsign && callsign !== 'N0CALL' enabled: callsign && callsign !== 'N0CALL'
}); });

@ -1,10 +1,10 @@
/** /**
* usePSKReporter Hook * 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. * 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'; import { useState, useEffect, useCallback } from 'react';
@ -43,7 +43,6 @@ export const usePSKReporter = (callsign, options = {}) => {
const [rxReports, setRxReports] = useState([]); const [rxReports, setRxReports] = useState([]);
const [loading, setLoading] = useState(true); const [loading, setLoading] = useState(true);
const [error, setError] = useState(null); const [error, setError] = useState(null);
const [rateLimited, setRateLimited] = useState(false);
const [lastUpdate, setLastUpdate] = useState(null); const [lastUpdate, setLastUpdate] = useState(null);
const fetchData = useCallback(async () => { const fetchData = useCallback(async () => {
@ -90,7 +89,6 @@ export const usePSKReporter = (callsign, options = {}) => {
setTxReports(processedTx); setTxReports(processedTx);
setRxReports(processedRx); setRxReports(processedRx);
setRateLimited(data.tx?.rateLimited || data.rx?.rateLimited || false);
setLastUpdate(new Date()); setLastUpdate(new Date());
// Check for errors in response // Check for errors in response
@ -139,7 +137,8 @@ export const usePSKReporter = (callsign, options = {}) => {
stats, stats,
loading, loading,
error, error,
rateLimited, connected: false, // HTTP mode - not real-time connected
source: 'http',
lastUpdate, lastUpdate,
refresh: fetchData refresh: fetchData
}; };

Loading…
Cancel
Save

Powered by TurnKey Linux.