working
This commit is contained in:
65
index.html.rej
Normal file
65
index.html.rej
Normal file
@@ -0,0 +1,65 @@
|
||||
--- index.html
|
||||
+++ index.html
|
||||
@@ -262,6 +263,7 @@
|
||||
const playerListEditor = document.getElementById('player-list-editor');
|
||||
const addPlayerFormBtn = document.getElementById('add-player-form-btn'); // <<<< ENSURED DEFINITION
|
||||
const shufflePlayersBtn = document.getElementById('shuffle-players-btn');
|
||||
+ const allTimersPlayerListEl = document.getElementById('all-timers-player-list');
|
||||
const reversePlayersBtn = document.getElementById('reverse-players-btn');
|
||||
const addEditPlayerForm = document.getElementById('add-edit-player-form');
|
||||
const playerFormTitle = document.getElementById('player-form-title');
|
||||
@@ -670,6 +671,11 @@
|
||||
function updateGameModeUI() {
|
||||
if (gameMode === 'allTimersRunning') {
|
||||
gameModeBtn.textContent = 'Stop All Timers';
|
||||
+ // Update the all timers player list
|
||||
+ renderAllTimersPlayerList();
|
||||
+ allTimersPlayerListEl.style.display = 'block';
|
||||
+ } else {
|
||||
+ allTimersPlayerListEl.style.display = 'none';
|
||||
let anyTimerRunning = Object.values(playerTimers).some(id => id !== null);
|
||||
if (anyTimerRunning) {
|
||||
appContainer.classList.add('pulsating-background');
|
||||
@@ -702,6 +708,26 @@
|
||||
}
|
||||
|
||||
// --- Player Management ---
|
||||
+ function renderAllTimersPlayerList() {
|
||||
+ allTimersPlayerListEl.innerHTML = '';
|
||||
+ const activePlayers = players.filter(p => !p.isSkipped && playerTimers[p.id] !== null);
|
||||
+ activePlayers.forEach(player => {
|
||||
+ const entry = document.createElement('div');
|
||||
+ entry.className = 'all-timers-player-entry';
|
||||
+ entry.textContent = `${player.name} (${formatTime(player.currentTime)})`;
|
||||
+ allTimersPlayerListEl.appendChild(entry);
|
||||
+ });
|
||||
+ }
|
||||
+
|
||||
+ function updateAllTimersPlayerList() {
|
||||
+ renderAllTimersPlayerList();
|
||||
+ }
|
||||
+
|
||||
+ function clearAllTimersPlayerList() {
|
||||
+ allTimersPlayerListEl.innerHTML = '';
|
||||
+ }
|
||||
+
|
||||
+
|
||||
function renderPlayerManagementList() {
|
||||
playerListEditor.innerHTML = '';
|
||||
if (players.length === 0) {
|
||||
@@ -1040,6 +1066,7 @@
|
||||
}
|
||||
|
||||
// --- Initialization ---
|
||||
+
|
||||
function init() {
|
||||
initAudio();
|
||||
loadState();
|
||||
@@ -1048,6 +1075,7 @@
|
||||
navigator.serviceWorker.register('sw.js')
|
||||
.then(reg => console.log('SW registered:', reg))
|
||||
.catch(err => console.error('SW registration failed:', err));
|
||||
+
|
||||
}
|
||||
}
|
||||
init();
|
||||
Reference in New Issue
Block a user