Merge pull request #98 from accius/Modular-Staging

Modular staging
pull/103/head
accius 1 day ago committed by GitHub
commit a3f753c0dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -67,6 +67,13 @@ LAYOUT=modern
# Only uncomment if you have your own proxy running
# DXSPIDER_PROXY_URL=https://your-dxspider-proxy.com
# DX Cluster source: auto | proxy | hamqth | dxspider
# auto = tries proxy first, then HamQTH, then direct telnet
# proxy = use DX Spider Proxy (set DXSPIDER_PROXY_URL above)
# hamqth = HamQTH CSV feed (HTTP, works everywhere)
# dxspider = direct telnet to DX Spider nodes (works locally/Pi)
# DX_CLUSTER_SOURCE=auto
# OpenWeatherMap API key (for local weather display)
# Get a free key at https://openweathermap.org/api
# OPENWEATHER_API_KEY=your_api_key_here

@ -225,6 +225,9 @@ else
CHROME_CMD="chromium-browser"
fi
# Trap Ctrl+Q to exit kiosk cleanly
trap 'pkill -f "chromium.*kiosk"; exit 0' SIGTERM SIGINT
$CHROME_CMD \
--kiosk \
--noerrdialogs \
@ -237,7 +240,17 @@ $CHROME_CMD \
--overscroll-history-navigation=0 \
--disable-pinch \
--incognito \
http://localhost:3000
http://localhost:3000 &
CHROME_PID=$!
echo "OpenHamClock kiosk running (PID: $CHROME_PID)"
echo "Exit methods:"
echo " - Alt+F4 (close Chromium)"
echo " - Ctrl+Alt+T (open terminal, then: pkill -f kiosk)"
echo " - SSH in and run: pkill -f kiosk.sh"
wait $CHROME_PID
EOF
chmod +x "$INSTALL_DIR/kiosk.sh"
@ -339,7 +352,14 @@ print_summary() {
if [ "$KIOSK_MODE" = true ]; then
echo -e " ${GREEN}Kiosk Mode:${NC} Enabled"
echo " OpenHamClock will auto-start on boot in fullscreen"
echo " To disable: rm ~/.config/autostart/openhamclock-kiosk.desktop"
echo ""
echo -e " ${YELLOW}Exit kiosk:${NC}"
echo " Alt+F4 Close Chromium"
echo " Ctrl+Alt+T Open terminal (then: pkill -f kiosk)"
echo " SSH: pkill -f kiosk.sh"
echo ""
echo -e " ${YELLOW}Disable auto-start:${NC}"
echo " rm ~/.config/autostart/openhamclock-kiosk.desktop"
echo ""
fi

@ -148,7 +148,7 @@ const CONFIG = {
// DX Cluster settings
spotRetentionMinutes: parseInt(process.env.SPOT_RETENTION_MINUTES) || jsonConfig.dxCluster?.spotRetentionMinutes || 30,
dxClusterSource: jsonConfig.dxCluster?.source || 'auto',
dxClusterSource: process.env.DX_CLUSTER_SOURCE || jsonConfig.dxCluster?.source || 'auto',
// API keys (don't expose to frontend)
_openWeatherApiKey: process.env.OPENWEATHER_API_KEY || '',
@ -983,7 +983,7 @@ let dxSpiderCache = { spots: [], timestamp: 0 };
const DXSPIDER_CACHE_TTL = 90000; // 90 seconds cache - reduces reconnection frequency
app.get('/api/dxcluster/spots', async (req, res) => {
const source = (req.query.source || 'auto').toLowerCase();
const source = (req.query.source || CONFIG.dxClusterSource || 'auto').toLowerCase();
// Helper function for HamQTH (HTTP-based, works everywhere)
async function fetchHamQTH() {

@ -89,7 +89,7 @@ export const useDXCluster = (source = 'auto', filters = {}) => {
useEffect(() => {
const fetchData = async () => {
try {
const response = await fetch('/api/dxcluster/spots');
const response = await fetch(`/api/dxcluster/spots?source=${encodeURIComponent(source)}`);
if (response.ok) {
const newSpots = await response.json();

@ -14,20 +14,20 @@ const API_URL = '/api/wsjtx';
const DECODES_URL = '/api/wsjtx/decodes';
// Generate or retrieve persistent session ID
// NOTE: Kept short (8 chars) intentionally — long UUIDs in query strings
// trigger false positives in Bitdefender and similar security software
function getSessionId() {
const KEY = 'ohc-wsjtx-session';
const generate = () => Math.random().toString(36).substring(2, 10);
try {
let id = localStorage.getItem(KEY);
if (id && id.length >= 16) return id;
// Generate a random ID
id = (typeof crypto !== 'undefined' && crypto.randomUUID)
? crypto.randomUUID()
: Math.random().toString(36).substring(2) + Date.now().toString(36) + Math.random().toString(36).substring(2);
if (id && id.length >= 8) return id;
id = generate();
localStorage.setItem(KEY, id);
return id;
} catch {
// Fallback for privacy browsers that block localStorage
return Math.random().toString(36).substring(2) + Date.now().toString(36) + Math.random().toString(36).substring(2);
return generate();
}
}

Loading…
Cancel
Save

Powered by TurnKey Linux.