Newest Main page regreshing. Updated calculator. Removed unused stuff.
This commit is contained in:
@@ -620,37 +620,47 @@
|
||||
color: #333 !important;
|
||||
box-shadow: none !important;
|
||||
border: 2px solid #ddd !important;
|
||||
padding: 20px;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 8px !important;
|
||||
padding: 16px 20px !important;
|
||||
margin-bottom: 16px;
|
||||
overflow: visible !important;
|
||||
position: static !important;
|
||||
}
|
||||
|
||||
.results-header::before {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.results-header * {
|
||||
position: static !important;
|
||||
z-index: auto !important;
|
||||
}
|
||||
|
||||
.header-logo {
|
||||
height: 60px !important;
|
||||
max-width: 160px !important;
|
||||
display: block !important;
|
||||
height: 50px !important;
|
||||
max-width: 140px !important;
|
||||
background-color: transparent !important;
|
||||
padding: 0 !important;
|
||||
border: none !important;
|
||||
filter: none !important;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.results-title {
|
||||
font-size: 24pt !important;
|
||||
font-weight: bold !important;
|
||||
color: #333 !important;
|
||||
text-shadow: none !important;
|
||||
backdrop-filter: none !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.results-subtitle {
|
||||
font-size: 14pt !important;
|
||||
color: #666 !important;
|
||||
.results-title {
|
||||
font-size: 20pt !important;
|
||||
font-weight: bold !important;
|
||||
color: #111 !important;
|
||||
text-shadow: none !important;
|
||||
margin-bottom: 15px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.results-subtitle {
|
||||
font-size: 11pt !important;
|
||||
color: #555 !important;
|
||||
text-shadow: none !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.results-meta {
|
||||
@@ -658,14 +668,14 @@
|
||||
}
|
||||
|
||||
.meta-number {
|
||||
color: #333 !important;
|
||||
font-size: 14pt !important;
|
||||
color: #111 !important;
|
||||
text-shadow: none !important;
|
||||
font-size: 16pt !important;
|
||||
}
|
||||
|
||||
.meta-label {
|
||||
font-size: 9pt !important;
|
||||
color: #666 !important;
|
||||
font-size: 10pt !important;
|
||||
}
|
||||
|
||||
.podium-section {
|
||||
@@ -707,9 +717,10 @@
|
||||
<div class="navbar-title">🏆 <span data-i18n="tournament.tournament_results">Tournament Results</span></div>
|
||||
</div>
|
||||
<div class="navbar-controls">
|
||||
<a href="/" class="nav-btn">📺 <span data-i18n="navigation.dashboard">Dashboard</span></a>
|
||||
<button class="nav-btn" onclick="exportResultsJSON()">💾 <span data-i18n="general.export">Export JSON</span></button>
|
||||
<button class="nav-btn" onclick="printResults()">🖨️ <span data-i18n="general.print">Print</span></button>
|
||||
<button class="nav-btn" id="btnTvView" onclick="toggleTvView()" title="Preklopi pogled na TV zaslonu">📺</button>
|
||||
<a href="/" class="nav-btn">✕</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1048,6 +1059,55 @@
|
||||
window.print();
|
||||
}
|
||||
});
|
||||
|
||||
// ── TV VIEW TOGGLE ────────────────────────────────────────────────────────
|
||||
const isTvDisplay = new URLSearchParams(window.location.search).get('tv') === '1';
|
||||
let currentTvView = 'results';
|
||||
|
||||
function updateTvViewBtn(view) {
|
||||
currentTvView = view;
|
||||
const btn = document.getElementById('btnTvView');
|
||||
if (!btn) return;
|
||||
btn.style.background = (view === 'results') ? '#28a745' : '';
|
||||
btn.style.color = (view === 'results') ? 'white' : '';
|
||||
btn.style.borderColor= (view === 'results') ? '#1e7e34' : '';
|
||||
}
|
||||
|
||||
async function toggleTvView() {
|
||||
const newView = currentTvView === 'results' ? 'cameras' : 'results';
|
||||
try {
|
||||
await fetch('/api/tv/view', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ view: newView })
|
||||
});
|
||||
updateTvViewBtn(newView);
|
||||
if (isTvDisplay && newView === 'cameras') {
|
||||
window.location.href = '/';
|
||||
}
|
||||
} catch (e) { console.error(e); }
|
||||
}
|
||||
|
||||
// Poll to stay in sync and follow back-redirect when in TV mode
|
||||
let lastResultsStateHash = null;
|
||||
setInterval(async () => {
|
||||
if (document.visibilityState !== 'visible') return;
|
||||
try {
|
||||
const r = await fetch('/api/dashboard/state');
|
||||
if (!r.ok) return;
|
||||
const d = await r.json();
|
||||
updateTvViewBtn(d.tv_view || 'cameras');
|
||||
if (isTvDisplay && d.tv_view !== 'results') {
|
||||
if (d.tv_view === 'draft' && d.tournament_active) {
|
||||
window.location.href = '/tournament/draft?tv=1';
|
||||
} else {
|
||||
window.location.href = '/';
|
||||
}
|
||||
}
|
||||
} catch (e) {}
|
||||
}, 3000);
|
||||
|
||||
fetch('/api/dashboard/state').then(r => r.json()).then(d => updateTvViewBtn(d.tv_view || 'cameras')).catch(() => {});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user