Frontend-Update: dynamischer Host, Lade-Overlay, Footer entfernt, klickbare Team-Panel
- API-Host dynamisch vom Seiten-URI abgeleitet (nicht mehr hardcoded) - Lade-Overlay mit Spinner beim Start und bei Verbindungsproblemen - Footer/Rundenverlauf entfernt, Scoreboard füllt jetzt die ganze Seite - Team-Panels sind klickbar (Single-Click = Punkt, Double-Click = nächste Runde) - Verbindungszustand mit grünem/rotem Dot angezeigt - CSS neu strukturiert, Duplikate entfernt
This commit is contained in:
+277
-421
@@ -1,405 +1,276 @@
|
|||||||
/**
|
/* ========================================
|
||||||
* goSportpunktetafel – Frontend JavaScript
|
goSportpunktetafel – Frontend App
|
||||||
*
|
Dynamischer API-Host, Lade-Overlay, Team-Panel-Klicks
|
||||||
* Verbindet sich mit der Go-HTTP-API (Polling + WebSocket-Fallback)
|
======================================== */
|
||||||
* und aktualisiert die Anzeige in Echtzeit.
|
|
||||||
*/
|
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// ========================================
|
// ========================================
|
||||||
// Konfiguration
|
// Konfiguration – dynamischer Host
|
||||||
// ========================================
|
// ========================================
|
||||||
|
|
||||||
const CONFIG = {
|
const CONFIG = {
|
||||||
apiBase: 'http://localhost:3000',
|
// Hole Host und Port vom aktuellen Seiten-URI
|
||||||
pollingInterval: 2000, // ms
|
apiBase: `${window.location.protocol}//${window.location.host}`,
|
||||||
wsUrl: 'ws://localhost:3000/ws',
|
wsBase: `${window.location.protocol === 'https:' ? 'wss:' : 'ws:'}//${window.location.host}`,
|
||||||
wsReconnectDelay: 3000, // ms
|
pollInterval: 2000,
|
||||||
wsMaxReconnectDelay: 30000,
|
reconnectInterval: 5000,
|
||||||
|
maxReconnectAttempts: 20,
|
||||||
};
|
};
|
||||||
|
|
||||||
// ========================================
|
|
||||||
// DOM-Elemente
|
// DOM-Elemente
|
||||||
// ========================================
|
|
||||||
const dom = {
|
const dom = {
|
||||||
redScore: document.getElementById('red-score'),
|
redScore: null,
|
||||||
greenScore: document.getElementById('green-score'),
|
greenScore: null,
|
||||||
roundDisplay: document.getElementById('round-display'),
|
roundDisplay: null,
|
||||||
redPoints: document.getElementById('red-points'),
|
redPoints: null,
|
||||||
greenPoints: document.getElementById('green-points'),
|
greenPoints: null,
|
||||||
roundsList: document.getElementById('rounds-list'),
|
roundsList: null,
|
||||||
errorBanner: document.getElementById('error-banner'),
|
resetBtn: null,
|
||||||
errorMessage: document.getElementById('error-message'),
|
confirmDialog: null,
|
||||||
resetBtn: document.getElementById('reset-btn'),
|
confirmReset: null,
|
||||||
fullscreenToggle: document.getElementById('fullscreen-toggle'),
|
cancelReset: null,
|
||||||
statusDot: document.getElementById('status-dot'),
|
fullscreenToggle: null,
|
||||||
statusText: document.getElementById('status-text'),
|
statusDot: null,
|
||||||
confirmDialog: document.getElementById('confirm-dialog'),
|
statusText: null,
|
||||||
cancelReset: document.getElementById('cancel-reset'),
|
errorBanner: null,
|
||||||
confirmReset: document.getElementById('confirm-reset'),
|
errorMessage: null,
|
||||||
redPanel: document.getElementById('red-panel'),
|
loadingOverlay: null,
|
||||||
greenPanel: document.getElementById('green-panel'),
|
redPanel: null,
|
||||||
|
greenPanel: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
// ========================================
|
|
||||||
// State
|
// State
|
||||||
// ========================================
|
|
||||||
let state = {
|
let state = {
|
||||||
current_round: 0,
|
|
||||||
red_score: 0,
|
red_score: 0,
|
||||||
green_score: 0,
|
green_score: 0,
|
||||||
|
current_round: 1,
|
||||||
rounds: [],
|
rounds: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
// Vorheriger State für Flash-Animation
|
|
||||||
let prevState = { ...state };
|
|
||||||
|
|
||||||
// Polling / WebSocket
|
|
||||||
let pollingTimer = null;
|
let pollingTimer = null;
|
||||||
let ws = null;
|
let ws = null;
|
||||||
let wsReconnectTimer = null;
|
|
||||||
let wsReconnectAttempts = 0;
|
let wsReconnectAttempts = 0;
|
||||||
let isConnected = false;
|
let connected = false;
|
||||||
let useWebSocket = false;
|
let resetting = false;
|
||||||
|
|
||||||
// ========================================
|
// ========================================
|
||||||
// API-Funktionen
|
// DOM-Initialisierung
|
||||||
// ========================================
|
// ========================================
|
||||||
|
|
||||||
/**
|
function initDom() {
|
||||||
* State von der API abrufen
|
dom.redScore = document.getElementById('red-score');
|
||||||
*/
|
dom.greenScore = document.getElementById('green-score');
|
||||||
async function fetchState() {
|
dom.roundDisplay = document.getElementById('round-display');
|
||||||
try {
|
dom.redPoints = document.getElementById('red-points');
|
||||||
const response = await fetch(`${CONFIG.apiBase}/api/state`, {
|
dom.greenPoints = document.getElementById('green-points');
|
||||||
method: 'GET',
|
dom.roundsList = document.getElementById('rounds-list');
|
||||||
headers: { 'Accept': 'application/json' },
|
dom.resetBtn = document.getElementById('reset-btn');
|
||||||
});
|
dom.confirmDialog = document.getElementById('confirm-dialog');
|
||||||
|
dom.confirmReset = document.getElementById('confirm-reset');
|
||||||
if (!response.ok) {
|
dom.cancelReset = document.getElementById('cancel-reset');
|
||||||
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
dom.fullscreenToggle = document.getElementById('fullscreen-toggle');
|
||||||
}
|
dom.statusDot = document.getElementById('status-dot');
|
||||||
|
dom.statusText = document.getElementById('status-text');
|
||||||
const data = await response.json();
|
dom.errorBanner = document.getElementById('error-banner');
|
||||||
return data;
|
dom.errorMessage = document.getElementById('error-message');
|
||||||
} catch (error) {
|
dom.loadingOverlay = document.getElementById('loading-overlay');
|
||||||
console.error('Fehler beim Abrufen des States:', error);
|
dom.redPanel = document.getElementById('red-panel');
|
||||||
return null;
|
dom.greenPanel = document.getElementById('green-panel');
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Punkt für ein Team verbuchen
|
|
||||||
*/
|
|
||||||
async function postScore(team) {
|
|
||||||
try {
|
|
||||||
const response = await fetch(`${CONFIG.apiBase}/api/score?team=${team}`, {
|
|
||||||
method: 'POST',
|
|
||||||
headers: { 'Content-Type': 'application/json' },
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!response.ok) {
|
|
||||||
throw new Error(`HTTP ${response.status}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
return await response.json();
|
|
||||||
} catch (error) {
|
|
||||||
console.error(`Fehler bei /api/score?team=${team}:`, error);
|
|
||||||
showError(`Punkt für ${team} fehlgeschlagen`);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Nächste Runde
|
|
||||||
*/
|
|
||||||
async function postNext() {
|
|
||||||
try {
|
|
||||||
const response = await fetch(`${CONFIG.apiBase}/api/next`, {
|
|
||||||
method: 'POST',
|
|
||||||
headers: { 'Content-Type': 'application/json' },
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!response.ok) {
|
|
||||||
throw new Error(`HTTP ${response.status}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
return await response.json();
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Fehler bei /api/next:', error);
|
|
||||||
showError('Nächste Runde fehlgeschlagen');
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reset
|
|
||||||
*/
|
|
||||||
async function postReset() {
|
|
||||||
try {
|
|
||||||
const response = await fetch(`${CONFIG.apiBase}/api/reset`, {
|
|
||||||
method: 'POST',
|
|
||||||
headers: { 'Content-Type': 'application/json' },
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!response.ok) {
|
|
||||||
throw new Error(`HTTP ${response.status}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
return await response.json();
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Fehler bei /api/reset:', error);
|
|
||||||
showError('Reset fehlgeschlagen');
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ========================================
|
// ========================================
|
||||||
// UI-Aktualisierung
|
// Lade-Overlay
|
||||||
// ========================================
|
// ========================================
|
||||||
|
|
||||||
/**
|
function showLoading(show) {
|
||||||
* State in der UI anzeigen
|
if (show) {
|
||||||
*/
|
dom.loadingOverlay.classList.remove('hidden');
|
||||||
function renderState(newState) {
|
|
||||||
const wasConnected = isConnected;
|
|
||||||
|
|
||||||
// State aktualisieren
|
|
||||||
prevState = { ...state };
|
|
||||||
state = { ...newState };
|
|
||||||
|
|
||||||
// Red Score
|
|
||||||
const redScoreEl = dom.redScore;
|
|
||||||
const redScoreStr = String(newState.red_score);
|
|
||||||
if (redScoreEl.textContent !== redScoreStr) {
|
|
||||||
redScoreEl.textContent = redScoreStr;
|
|
||||||
|
|
||||||
// Flash-Animation wenn sich der Score geändert hat
|
|
||||||
if (prevState.red_score !== newState.red_score) {
|
|
||||||
triggerFlash(dom.redPanel, 'flash-red');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Green Score
|
|
||||||
const greenScoreEl = dom.greenScore;
|
|
||||||
const greenScoreStr = String(newState.green_score);
|
|
||||||
if (greenScoreEl.textContent !== greenScoreStr) {
|
|
||||||
greenScoreEl.textContent = greenScoreStr;
|
|
||||||
|
|
||||||
if (prevState.green_score !== newState.green_score) {
|
|
||||||
triggerFlash(dom.greenPanel, 'flash-green');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Round Display
|
|
||||||
const totalRounds = Math.max(state.rounds.length, state.current_round);
|
|
||||||
if (totalRounds > 0) {
|
|
||||||
dom.roundDisplay.textContent = `Runde ${state.current_round} von ${totalRounds}`;
|
|
||||||
} else {
|
} else {
|
||||||
dom.roundDisplay.textContent = 'Bereit';
|
dom.loadingOverlay.classList.add('hidden');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Letzte Punkte Anzeige (aus letzter abgeschlossener Runde)
|
|
||||||
if (newState.rounds && newState.rounds.length > 0) {
|
|
||||||
const lastRound = newState.rounds[newState.rounds.length - 1];
|
|
||||||
if (lastRound) {
|
|
||||||
const redPts = lastRound.Red || lastRound.red_score || 0;
|
|
||||||
const greenPts = lastRound.Green || lastRound.green_score || 0;
|
|
||||||
dom.redPoints.textContent = `Letzte: ${redPts}`;
|
|
||||||
dom.greenPoints.textContent = `Letzte: ${greenPts}`;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
dom.redPoints.textContent = 'Punkte: 0';
|
|
||||||
dom.greenPoints.textContent = 'Punkte: 0';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rundenverlauf
|
|
||||||
renderRoundHistory(newState.rounds || []);
|
|
||||||
|
|
||||||
// Verbindung status aktualisieren
|
|
||||||
if (!wasConnected && newState !== null) {
|
|
||||||
isConnected = true;
|
|
||||||
updateConnectionStatus(true);
|
|
||||||
hideError();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Rundenverlauf rendern
|
|
||||||
*/
|
|
||||||
function renderRoundHistory(rounds) {
|
|
||||||
const container = dom.roundsList;
|
|
||||||
container.innerHTML = '';
|
|
||||||
|
|
||||||
rounds.forEach(function (round, index) {
|
|
||||||
const tile = document.createElement('div');
|
|
||||||
tile.className = 'round-tile';
|
|
||||||
tile.setAttribute('role', 'listitem');
|
|
||||||
tile.setAttribute('data-round', index + 1);
|
|
||||||
|
|
||||||
// Runde als aktiv markieren wenn es die aktuelle ist
|
|
||||||
if (index + 1 === state.current_round) {
|
|
||||||
tile.classList.add('active');
|
|
||||||
}
|
|
||||||
|
|
||||||
const roundNum = document.createElement('span');
|
|
||||||
roundNum.className = 'round-num';
|
|
||||||
roundNum.textContent = `R${index + 1}`;
|
|
||||||
|
|
||||||
const scoreRed = document.createElement('span');
|
|
||||||
scoreRed.className = 'score-red';
|
|
||||||
scoreRed.textContent = round.Red || round.red_score || 0;
|
|
||||||
|
|
||||||
const separator = document.createTextNode(' : ');
|
|
||||||
|
|
||||||
const scoreGreen = document.createElement('span');
|
|
||||||
scoreGreen.className = 'score-green';
|
|
||||||
scoreGreen.textContent = round.Green || round.green_score || 0;
|
|
||||||
|
|
||||||
tile.appendChild(roundNum);
|
|
||||||
tile.appendChild(scoreRed);
|
|
||||||
tile.appendChild(separator);
|
|
||||||
tile.appendChild(scoreGreen);
|
|
||||||
|
|
||||||
container.appendChild(tile);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Zum letzten Element scrollen
|
|
||||||
requestAnimationFrame(function () {
|
|
||||||
container.scrollLeft = container.scrollWidth;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Flash-Animation für Score-Update
|
|
||||||
*/
|
|
||||||
function triggerFlash(panel, animationClass) {
|
|
||||||
// Alte Animation entfernen
|
|
||||||
panel.classList.remove(animationClass);
|
|
||||||
|
|
||||||
// Reflow erzwingen
|
|
||||||
void panel.offsetWidth;
|
|
||||||
|
|
||||||
// Neue Animation starten
|
|
||||||
panel.classList.add(animationClass);
|
|
||||||
|
|
||||||
// Animation nach Ablauf entfernen
|
|
||||||
panel.addEventListener('animationend', function handler() {
|
|
||||||
panel.classList.remove(animationClass);
|
|
||||||
panel.removeEventListener('animationend', handler);
|
|
||||||
}, { once: true });
|
|
||||||
|
|
||||||
// Fallback: Timeout nach Animation
|
|
||||||
setTimeout(function () {
|
|
||||||
panel.classList.remove(animationClass);
|
|
||||||
}, 500);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ========================================
|
// ========================================
|
||||||
// Fehler & Status
|
// Verbindungszustand
|
||||||
// ========================================
|
// ========================================
|
||||||
|
|
||||||
function showError(message) {
|
function updateConnectionStatus(connected, error) {
|
||||||
dom.errorMessage.textContent = message;
|
dom.statusDot.classList.remove('connected', 'disconnected');
|
||||||
dom.errorBanner.classList.remove('hidden');
|
|
||||||
|
|
||||||
// Nach 5 Sekunden automatisch ausblenden
|
|
||||||
setTimeout(hideError, 5000);
|
|
||||||
}
|
|
||||||
|
|
||||||
function hideError() {
|
|
||||||
dom.errorBanner.classList.add('hidden');
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateConnectionStatus(connected) {
|
|
||||||
if (connected) {
|
if (connected) {
|
||||||
dom.statusDot.className = 'status-dot connected';
|
dom.statusDot.classList.add('connected');
|
||||||
dom.statusText.textContent = useWebSocket ? 'Echtzeit' : 'Verbunden';
|
dom.statusText.textContent = 'Verbunden';
|
||||||
} else {
|
} else {
|
||||||
dom.statusDot.className = 'status-dot disconnected';
|
dom.statusDot.classList.add('disconnected');
|
||||||
dom.statusText.textContent = 'Getrennt';
|
dom.statusText.textContent = error || 'Getrennt';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (connected && dom.errorBanner && !dom.errorBanner.classList.contains('hidden')) {
|
||||||
|
dom.errorBanner.classList.add('hidden');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ========================================
|
// ========================================
|
||||||
// WebSocket
|
// API – State abfragen
|
||||||
// ========================================
|
// ========================================
|
||||||
|
|
||||||
function connectWebSocket() {
|
function fetchState() {
|
||||||
// Falls bereits verbunden, nichts tun
|
return fetch(`${CONFIG.apiBase}/api/state`)
|
||||||
if (ws && (ws.readyState === WebSocket.CONNECTING || ws.readyState === WebSocket.OPEN)) {
|
.then(function (response) {
|
||||||
return;
|
if (!response.ok) {
|
||||||
}
|
throw new Error(`HTTP ${response.status}`);
|
||||||
|
}
|
||||||
|
return response.json();
|
||||||
|
})
|
||||||
|
.then(function (data) {
|
||||||
|
updateConnectionStatus(true, null);
|
||||||
|
return data;
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
updateConnectionStatus(false, error.message);
|
||||||
|
return null;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
// ========================================
|
||||||
ws = new WebSocket(CONFIG.wsUrl);
|
// API – Score aktualisieren
|
||||||
} catch (e) {
|
// ========================================
|
||||||
console.warn('WebSocket nicht verfügbar, nutze Polling:', e);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ws.onopen = function () {
|
function postScore(team) {
|
||||||
console.log('WebSocket verbunden');
|
return fetch(`${CONFIG.apiBase}/api/score?team=${team}`, {
|
||||||
useWebSocket = true;
|
method: 'POST',
|
||||||
isConnected = true;
|
})
|
||||||
wsReconnectAttempts = 0;
|
.then(function (response) {
|
||||||
updateConnectionStatus(true);
|
if (!response.ok) {
|
||||||
hideError();
|
throw new Error(`HTTP ${response.status}`);
|
||||||
};
|
|
||||||
|
|
||||||
ws.onmessage = function (event) {
|
|
||||||
try {
|
|
||||||
const data = JSON.parse(event.data);
|
|
||||||
renderState(data);
|
|
||||||
} catch (e) {
|
|
||||||
console.error('Fehler beim Verarbeiten der WebSocket-Nachricht:', e);
|
|
||||||
}
|
}
|
||||||
};
|
return response.json();
|
||||||
|
})
|
||||||
ws.onclose = function (event) {
|
.catch(function (error) {
|
||||||
console.log(`WebSocket geschlossen (${event.code})`);
|
updateConnectionStatus(false, error.message);
|
||||||
useWebSocket = false;
|
console.error('Score update failed:', error);
|
||||||
isConnected = false;
|
});
|
||||||
updateConnectionStatus(false);
|
|
||||||
scheduleWebSocketReconnect();
|
|
||||||
};
|
|
||||||
|
|
||||||
ws.onerror = function () {
|
|
||||||
console.warn('WebSocket-Fehler');
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function scheduleWebSocketReconnect() {
|
// ========================================
|
||||||
if (wsReconnectTimer) {
|
// API – Nächste Runde
|
||||||
clearTimeout(wsReconnectTimer);
|
// ========================================
|
||||||
|
|
||||||
|
function postNext() {
|
||||||
|
return fetch(`${CONFIG.apiBase}/api/next`, {
|
||||||
|
method: 'POST',
|
||||||
|
})
|
||||||
|
.then(function (response) {
|
||||||
|
if (!response.ok) {
|
||||||
|
throw new Error(`HTTP ${response.status}`);
|
||||||
|
}
|
||||||
|
return response.json();
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
updateConnectionStatus(false, error.message);
|
||||||
|
console.error('Next round failed:', error);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// ========================================
|
||||||
|
// API – Reset
|
||||||
|
// ========================================
|
||||||
|
|
||||||
|
function postReset() {
|
||||||
|
return fetch(`${CONFIG.apiBase}/api/reset`, {
|
||||||
|
method: 'POST',
|
||||||
|
})
|
||||||
|
.then(function (response) {
|
||||||
|
if (!response.ok) {
|
||||||
|
throw new Error(`HTTP ${response.status}`);
|
||||||
|
}
|
||||||
|
return response.json();
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
updateConnectionStatus(false, error.message);
|
||||||
|
console.error('Reset failed:', error);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// ========================================
|
||||||
|
// UI – Update
|
||||||
|
// ========================================
|
||||||
|
|
||||||
|
function updateUI(data) {
|
||||||
|
var red = data.red_score || 0;
|
||||||
|
var green = data.green_score || 0;
|
||||||
|
var round = data.current_round || 0;
|
||||||
|
var rounds = data.rounds || [];
|
||||||
|
|
||||||
|
// Verhindere unnötige DOM-Updates
|
||||||
|
if (dom.redScore.textContent === String(red) &&
|
||||||
|
dom.greenScore.textContent === String(green) &&
|
||||||
|
dom.roundDisplay.textContent === `Runde ${round} von ${rounds.length || 0}`) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Exponentieller Backoff mit Maximalwert
|
// Scores aktualisieren
|
||||||
const delay = Math.min(
|
updateScore(dom.redScore, red, 'flash-red');
|
||||||
CONFIG.wsReconnectDelay * Math.pow(2, wsReconnectAttempts),
|
updateScore(dom.greenScore, green, 'flash-green');
|
||||||
CONFIG.wsMaxReconnectDelay
|
|
||||||
);
|
|
||||||
|
|
||||||
wsReconnectAttempts++;
|
dom.redPoints.textContent = `Punkte: ${red}`;
|
||||||
console.log(`WebSocket-Wiederverbindung in ${delay}ms (Versuch ${wsReconnectAttempts})`);
|
dom.greenPoints.textContent = `Punkte: ${green}`;
|
||||||
|
dom.roundDisplay.textContent = `Runde ${round} von ${rounds.length || 0}`;
|
||||||
|
}
|
||||||
|
|
||||||
wsReconnectTimer = setTimeout(function () {
|
function updateScore(element, value, flashClass) {
|
||||||
connectWebSocket();
|
var newValue = String(value);
|
||||||
}, delay);
|
if (element.textContent !== newValue) {
|
||||||
|
element.textContent = newValue;
|
||||||
|
element.classList.remove(flashClass);
|
||||||
|
// Force reflow
|
||||||
|
void element.offsetWidth;
|
||||||
|
element.classList.add(flashClass);
|
||||||
|
setTimeout(function () {
|
||||||
|
element.classList.remove(flashClass);
|
||||||
|
}, 400);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ========================================
|
||||||
|
// Reset-Dialog
|
||||||
|
// ========================================
|
||||||
|
|
||||||
|
function showResetConfirm() {
|
||||||
|
dom.confirmDialog.classList.remove('hidden');
|
||||||
|
resetting = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function hideResetConfirm() {
|
||||||
|
dom.confirmDialog.classList.add('hidden');
|
||||||
|
resetting = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function executeReset() {
|
||||||
|
hideResetConfirm();
|
||||||
|
postReset().then(function () {
|
||||||
|
poll();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// ========================================
|
// ========================================
|
||||||
// Polling
|
// Polling
|
||||||
// ========================================
|
// ========================================
|
||||||
|
|
||||||
|
function poll() {
|
||||||
|
return fetchState().then(function (data) {
|
||||||
|
if (data) {
|
||||||
|
state = data;
|
||||||
|
updateUI(data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function startPolling() {
|
function startPolling() {
|
||||||
stopPolling();
|
stopPolling();
|
||||||
|
pollingTimer = setInterval(poll, CONFIG.pollInterval);
|
||||||
// Sofortigen ersten Abruf
|
|
||||||
poll();
|
|
||||||
|
|
||||||
pollingTimer = setInterval(poll, CONFIG.pollingInterval);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function stopPolling() {
|
function stopPolling() {
|
||||||
@@ -409,15 +280,54 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function poll() {
|
// ========================================
|
||||||
const data = await fetchState();
|
// WebSocket
|
||||||
if (data) {
|
// ========================================
|
||||||
renderState(data);
|
|
||||||
} else {
|
function connectWebSocket() {
|
||||||
if (!useWebSocket) {
|
if (ws && (ws.readyState === WebSocket.OPEN || ws.readyState === WebSocket.CONNECTING)) {
|
||||||
updateConnectionStatus(false);
|
return;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var wsUrl = `${CONFIG.wsBase}/ws`;
|
||||||
|
console.log('[ws] Verbinden mit', wsUrl);
|
||||||
|
ws = new WebSocket(wsUrl);
|
||||||
|
|
||||||
|
ws.onopen = function () {
|
||||||
|
console.log('[ws] Verbindung geöffnet');
|
||||||
|
connected = true;
|
||||||
|
wsReconnectAttempts = 0;
|
||||||
|
updateConnectionStatus(true, null);
|
||||||
|
};
|
||||||
|
|
||||||
|
ws.onmessage = function (event) {
|
||||||
|
try {
|
||||||
|
var data = JSON.parse(event.data);
|
||||||
|
state = data;
|
||||||
|
updateUI(data);
|
||||||
|
} catch (e) {
|
||||||
|
console.error('[ws] Fehler beim Verarbeiten:', e);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
ws.onclose = function (event) {
|
||||||
|
console.log('[ws] Verbindung geschlossen:', event.code);
|
||||||
|
connected = false;
|
||||||
|
updateConnectionStatus(false, 'Verbindung beendet');
|
||||||
|
|
||||||
|
// Erneut versuchen (maximal 20x)
|
||||||
|
if (wsReconnectAttempts < CONFIG.maxReconnectAttempts) {
|
||||||
|
wsReconnectAttempts++;
|
||||||
|
console.log(`[ws] Erneuter Verbindungsversuch in ${CONFIG.reconnectInterval / 1000}s (${wsReconnectAttempts}/${CONFIG.maxReconnectAttempts})`);
|
||||||
|
setTimeout(connectWebSocket, CONFIG.reconnectInterval);
|
||||||
|
} else {
|
||||||
|
console.error('[ws] Maximale Wiederverbindungsversuche erreicht');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
ws.onerror = function (error) {
|
||||||
|
console.error('[ws] Fehler:', error);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// ========================================
|
// ========================================
|
||||||
@@ -427,45 +337,19 @@
|
|||||||
function toggleFullscreen() {
|
function toggleFullscreen() {
|
||||||
if (!document.fullscreenElement) {
|
if (!document.fullscreenElement) {
|
||||||
document.documentElement.requestFullscreen().catch(function (err) {
|
document.documentElement.requestFullscreen().catch(function (err) {
|
||||||
console.warn('Vollbild konnte nicht aktiviert werden:', err);
|
console.error('[fullscreen] Fehler:', err);
|
||||||
showError('Vollbild nicht verfügbar');
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
document.exitFullscreen().catch(function (err) {
|
document.exitFullscreen();
|
||||||
console.warn('Vollbild konnte nicht deaktiviert werden:', err);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateFullscreenButton() {
|
function updateFullscreenButton() {
|
||||||
const isFullscreen = !!document.fullscreenElement;
|
if (dom.fullscreenToggle) {
|
||||||
dom.fullscreenToggle.title = isFullscreen ? 'Vollbild verlassen (F11)' : 'Vollbild aktivieren (F11)';
|
if (document.fullscreenElement || document.webkitFullscreenElement) {
|
||||||
}
|
dom.fullscreenToggle.title = 'Vollbild verlassen (F11)';
|
||||||
|
} else {
|
||||||
// ========================================
|
dom.fullscreenToggle.title = 'Vollbild (F11)';
|
||||||
// Reset-Dialog
|
|
||||||
// ========================================
|
|
||||||
|
|
||||||
function showResetConfirm() {
|
|
||||||
dom.confirmDialog.classList.remove('hidden');
|
|
||||||
// Fokus auf Bestätigungs-Button setzen
|
|
||||||
setTimeout(function () {
|
|
||||||
dom.confirmReset.focus();
|
|
||||||
}, 100);
|
|
||||||
}
|
|
||||||
|
|
||||||
function hideResetConfirm() {
|
|
||||||
dom.confirmDialog.classList.add('hidden');
|
|
||||||
}
|
|
||||||
|
|
||||||
async function executeReset() {
|
|
||||||
hideResetConfirm();
|
|
||||||
const result = await postReset();
|
|
||||||
if (result) {
|
|
||||||
// State neu laden
|
|
||||||
const data = await fetchState();
|
|
||||||
if (data) {
|
|
||||||
renderState(data);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -475,30 +359,7 @@
|
|||||||
// ========================================
|
// ========================================
|
||||||
|
|
||||||
function handleKeyboard(event) {
|
function handleKeyboard(event) {
|
||||||
// Nicht verarbeiten wenn Dialog offen ist (außer Escape)
|
var key = event.key;
|
||||||
if (!dom.confirmDialog.classList.contains('hidden')) {
|
|
||||||
if (event.key === 'Escape') {
|
|
||||||
hideResetConfirm();
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Esc: Reset-Dialog öffnen
|
|
||||||
if (event.key === 'Escape') {
|
|
||||||
event.preventDefault();
|
|
||||||
showResetConfirm();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// F11: Vollbild
|
|
||||||
if (event.key === 'F11') {
|
|
||||||
// Browser macht das normalerweise selbst, aber wir können den Button aktualisieren
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Buchstabentasten (case-insensitive)
|
|
||||||
const key = event.key.toUpperCase();
|
|
||||||
|
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case 'R':
|
case 'R':
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
@@ -520,10 +381,16 @@
|
|||||||
// ========================================
|
// ========================================
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
|
initDom();
|
||||||
|
showLoading(true);
|
||||||
|
|
||||||
// Event Listener
|
// Event Listener
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
// Initialen State laden
|
// Initialen State laden
|
||||||
poll();
|
poll().then(function () {
|
||||||
|
// Sobald erster Poll erfolgreich war, Overlay ausblenden
|
||||||
|
showLoading(false);
|
||||||
|
});
|
||||||
|
|
||||||
// Polling starten
|
// Polling starten
|
||||||
startPolling();
|
startPolling();
|
||||||
@@ -553,7 +420,7 @@
|
|||||||
// Tastatur-Shortcuts
|
// Tastatur-Shortcuts
|
||||||
document.addEventListener('keydown', handleKeyboard);
|
document.addEventListener('keydown', handleKeyboard);
|
||||||
|
|
||||||
// Touch-Bereiche für Score-Updates (große Touch-Targets)
|
// Single-click auf Team-Panel = Punkt hinzufügen
|
||||||
dom.redPanel.addEventListener('click', function () {
|
dom.redPanel.addEventListener('click', function () {
|
||||||
postScore('red');
|
postScore('red');
|
||||||
});
|
});
|
||||||
@@ -562,29 +429,18 @@
|
|||||||
postScore('green');
|
postScore('green');
|
||||||
});
|
});
|
||||||
|
|
||||||
// Double-click für nächste Runde
|
// Double-click für nächste Runde
|
||||||
dom.redPanel.addEventListener('dblclick', function (event) {
|
dom.redPanel.addEventListener('dblclick', function (event) {
|
||||||
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
postNext();
|
postNext();
|
||||||
});
|
});
|
||||||
|
|
||||||
dom.greenPanel.addEventListener('dblclick', function (event) {
|
dom.greenPanel.addEventListener('dblclick', function (event) {
|
||||||
event.stopPropagation();
|
event.preventDefault();
|
||||||
postNext();
|
event.stopPropagation();
|
||||||
});
|
postNext();
|
||||||
|
});
|
||||||
// Verbindung prüfen
|
|
||||||
const testPoll = setInterval(function () {
|
|
||||||
fetchState().then(function (data) {
|
|
||||||
if (data) {
|
|
||||||
clearInterval(testPoll);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}, 1000);
|
|
||||||
|
|
||||||
setTimeout(function () {
|
|
||||||
clearInterval(testPoll);
|
|
||||||
}, 10000);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -69,18 +69,17 @@
|
|||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<!-- Round History -->
|
|
||||||
<footer class="round-history">
|
|
||||||
<div id="rounds-list" class="rounds-list" role="list" aria-label="Rundenverlauf">
|
|
||||||
<!-- Dynamically populated -->
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
<!-- Connection Status -->
|
<!-- Connection Status -->
|
||||||
<div id="connection-status" class="connection-status">
|
<div id="connection-status" class="connection-status">
|
||||||
<span class="status-dot" id="status-dot"></span>
|
<span class="status-dot" id="status-dot"></span>
|
||||||
<span id="status-text">Verbinde…</span>
|
<span id="status-text">Verbinde…</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Loading Overlay -->
|
||||||
|
<div id="loading-overlay" class="loading-overlay hidden">
|
||||||
|
<div class="loading-spinner"></div>
|
||||||
|
<p class="loading-text">Verbinde mit Scoreboard…</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Reset Confirmation Dialog -->
|
<!-- Reset Confirmation Dialog -->
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ body {
|
|||||||
/* ---------- Fullscreen Container ---------- */
|
/* ---------- Fullscreen Container ---------- */
|
||||||
.fullscreen-container {
|
.fullscreen-container {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-rows: auto auto 1fr auto auto;
|
grid-template-rows: auto 1fr;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
height: 100dvh;
|
height: 100dvh;
|
||||||
max-width: 100vw;
|
max-width: 100vw;
|
||||||
@@ -189,8 +189,9 @@ body {
|
|||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
gap: 0;
|
gap: 0;
|
||||||
padding: 16px;
|
padding: 0;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------- Team Panel ---------- */
|
/* ---------- Team Panel ---------- */
|
||||||
@@ -200,10 +201,14 @@ body {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 20px 16px;
|
padding: 20px 16px;
|
||||||
border-radius: var(--border-radius-lg);
|
border-radius: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
transition: box-shadow var(--transition-speed);
|
transition: box-shadow var(--transition-speed);
|
||||||
|
cursor: pointer;
|
||||||
|
user-select: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.team-panel::before {
|
.team-panel::before {
|
||||||
@@ -215,30 +220,37 @@ body {
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.team-panel:hover::before {
|
||||||
|
opacity: 0.08;
|
||||||
|
}
|
||||||
|
|
||||||
|
.team-panel:active::before {
|
||||||
|
opacity: 0.15;
|
||||||
|
}
|
||||||
|
|
||||||
|
.team-panel:active {
|
||||||
|
transform: scale(0.99);
|
||||||
|
}
|
||||||
|
|
||||||
/* Red Team */
|
/* Red Team */
|
||||||
.red-team {
|
.red-team {
|
||||||
background: var(--team-red-bg);
|
background: var(--team-red-bg);
|
||||||
border: 2px solid var(--team-red-dim);
|
border-right: 2px solid var(--border-color);
|
||||||
border-right: 1px solid var(--border-color);
|
border-radius: 0;
|
||||||
border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.red-team::before {
|
.red-team::before {
|
||||||
background: linear-gradient(135deg, var(--team-red) 0%, transparent 60%);
|
background: linear-gradient(135deg, var(--team-red) 0%, transparent 60%);
|
||||||
opacity: 0.05;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Green Team */
|
/* Green Team */
|
||||||
.green-team {
|
.green-team {
|
||||||
background: var(--team-green-bg);
|
background: var(--team-green-bg);
|
||||||
border: 2px solid var(--team-green-dim);
|
border-radius: 0;
|
||||||
border-left: 1px solid var(--border-color);
|
|
||||||
border-radius: 0 var(--border-radius-lg) var(--border-radius-lg) 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.green-team::before {
|
.green-team::before {
|
||||||
background: linear-gradient(225deg, var(--team-green) 0%, transparent 60%);
|
background: linear-gradient(225deg, var(--team-green) 0%, transparent 60%);
|
||||||
opacity: 0.05;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Color bar on top */
|
/* Color bar on top */
|
||||||
@@ -299,13 +311,13 @@ body {
|
|||||||
/* ---------- Flash Animation for Score Updates ---------- */
|
/* ---------- Flash Animation for Score Updates ---------- */
|
||||||
@keyframes scoreFlashRed {
|
@keyframes scoreFlashRed {
|
||||||
0% { transform: scale(1); color: var(--text-primary); }
|
0% { transform: scale(1); color: var(--text-primary); }
|
||||||
30% { transform: scale(1.12); color: #fff; }
|
30% { transform: scale(1.15); color: #fff; }
|
||||||
100% { transform: scale(1); color: var(--text-primary); }
|
100% { transform: scale(1); color: var(--text-primary); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes scoreFlashGreen {
|
@keyframes scoreFlashGreen {
|
||||||
0% { transform: scale(1); color: var(--text-primary); }
|
0% { transform: scale(1); color: var(--text-primary); }
|
||||||
30% { transform: scale(1.12); color: #fff; }
|
30% { transform: scale(1.15); color: #fff; }
|
||||||
100% { transform: scale(1); color: var(--text-primary); }
|
100% { transform: scale(1); color: var(--text-primary); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -317,77 +329,40 @@ body {
|
|||||||
animation: scoreFlashGreen 0.4s ease-out;
|
animation: scoreFlashGreen 0.4s ease-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------- Round History ---------- */
|
/* ---------- Loading Spinner ---------- */
|
||||||
.round-history {
|
.loading-overlay {
|
||||||
background: var(--bg-secondary);
|
position: fixed;
|
||||||
border-top: 1px solid var(--border-color);
|
inset: 0;
|
||||||
padding: 8px 12px;
|
z-index: 2000;
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rounds-list {
|
|
||||||
display: flex;
|
|
||||||
gap: 6px;
|
|
||||||
overflow-x: auto;
|
|
||||||
overflow-y: hidden;
|
|
||||||
padding: 4px 0;
|
|
||||||
scroll-behavior: smooth;
|
|
||||||
-webkit-overflow-scrolling: touch;
|
|
||||||
scrollbar-width: thin;
|
|
||||||
scrollbar-color: var(--border-color) transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rounds-list::-webkit-scrollbar {
|
|
||||||
height: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rounds-list::-webkit-scrollbar-track {
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rounds-list::-webkit-scrollbar-thumb {
|
|
||||||
background: var(--border-color);
|
|
||||||
border-radius: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Round Tile */
|
|
||||||
.round-tile {
|
|
||||||
flex-shrink: 0;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 4px;
|
background: var(--bg-primary);
|
||||||
padding: 6px 10px;
|
gap: 24px;
|
||||||
min-width: 60px;
|
}
|
||||||
border-radius: var(--border-radius);
|
|
||||||
font-size: 13px;
|
.loading-overlay.hidden {
|
||||||
font-weight: 600;
|
display: none;
|
||||||
font-variant-numeric: tabular-nums;
|
}
|
||||||
border: 1px solid var(--border-color);
|
|
||||||
background: var(--bg-tertiary);
|
.loading-spinner {
|
||||||
|
width: 64px;
|
||||||
|
height: 64px;
|
||||||
|
border: 4px solid var(--border-color);
|
||||||
|
border-top-color: var(--accent-gold);
|
||||||
|
border-radius: 50%;
|
||||||
|
animation: spin 1s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes spin {
|
||||||
|
to { transform: rotate(360deg); }
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-text {
|
||||||
|
font-size: 16px;
|
||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
white-space: nowrap;
|
font-weight: 500;
|
||||||
}
|
|
||||||
|
|
||||||
.round-tile.active {
|
|
||||||
border-color: var(--accent-gold);
|
|
||||||
background: rgba(255, 204, 0, 0.1);
|
|
||||||
color: var(--accent-gold);
|
|
||||||
box-shadow: 0 0 8px rgba(255, 204, 0, 0.15);
|
|
||||||
}
|
|
||||||
|
|
||||||
.round-tile .score-red {
|
|
||||||
color: var(--team-red);
|
|
||||||
}
|
|
||||||
|
|
||||||
.round-tile .score-green {
|
|
||||||
color: var(--team-green);
|
|
||||||
}
|
|
||||||
|
|
||||||
.round-tile .round-num {
|
|
||||||
color: var(--text-muted);
|
|
||||||
font-size: 11px;
|
|
||||||
margin-right: 2px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------- Connection Status ---------- */
|
/* ---------- Connection Status ---------- */
|
||||||
@@ -538,20 +513,6 @@ body {
|
|||||||
.reset-btn {
|
.reset-btn {
|
||||||
padding: 8px 10px;
|
padding: 8px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scoreboard {
|
|
||||||
padding: 10px 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.team-panel {
|
|
||||||
padding: 14px 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.round-tile {
|
|
||||||
min-width: 52px;
|
|
||||||
padding: 5px 8px;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Large screens / tablets */
|
/* Large screens / tablets */
|
||||||
@@ -560,20 +521,6 @@ body {
|
|||||||
padding: 12px 32px;
|
padding: 12px 32px;
|
||||||
min-height: 72px;
|
min-height: 72px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scoreboard {
|
|
||||||
padding: 32px 48px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.round-history {
|
|
||||||
padding: 12px 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.round-tile {
|
|
||||||
min-width: 72px;
|
|
||||||
padding: 8px 14px;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Landscape mobile */
|
/* Landscape mobile */
|
||||||
@@ -595,16 +542,6 @@ body {
|
|||||||
.team-panel {
|
.team-panel {
|
||||||
padding: 10px 8px;
|
padding: 10px 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.round-history {
|
|
||||||
padding: 4px 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.round-tile {
|
|
||||||
min-width: 48px;
|
|
||||||
padding: 3px 6px;
|
|
||||||
font-size: 11px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------- Prefers reduced motion ---------- */
|
/* ---------- Prefers reduced motion ---------- */
|
||||||
|
|||||||
Reference in New Issue
Block a user