86 lines
3.7 KiB
Diff
86 lines
3.7 KiB
Diff
--- a/index.html
|
|
+++ b/index.html
|
|
@@ -144,6 +144,7 @@
|
|
<div id="player-list-editor">
|
|
<!-- Player entries will be dynamically added here -->
|
|
</div>
|
|
+ <div id="all-timers-player-list"></div>
|
|
<div class="player-form-buttons">
|
|
<button id="add-player-form-btn">Add New Player</button>
|
|
<button id="shuffle-players-btn">Shuffle Order</button>
|
|
@@ -261,6 +262,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');
|
|
@@ -669,6 +670,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');
|
|
@@ -701,6 +707,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) {
|
|
@@ -1039,6 +1065,7 @@
|
|
}
|
|
|
|
// --- Initialization ---
|
|
+
|
|
function init() {
|
|
initAudio();
|
|
loadState();
|
|
@@ -1047,6 +1074,7 @@
|
|
navigator.serviceWorker.register('sw.js')
|
|
.then(reg => console.log('SW registered:', reg))
|
|
.catch(err => console.error('SW registration failed:', err));
|
|
+
|
|
}
|
|
}
|
|
init();
|
|
--- a/README.md
|
|
+++ b/README.md
|
|
@@ -104,6 +104,10 @@
|
|
* **All Timers Running Mode:**
|
|
* All active player timers run simultaneously.
|
|
* Enter by clicking "All Timers Mode" (starts all timers).
|
|
+ * **All Timers Player List:** A list of all players with running timers is displayed in the "Next Player" area. Players are removed from the list as their timers pause.
|
|
+ * The focused player on the top is a first player with a running timer.
|
|
+ * The list is updated dynamically as timers start and stop.
|
|
+
|
|
* Tap Current Player's area to pause/resume their *own* timer.
|
|
* Swipe Up to change which active player is "in focus" in the Current Player display.
|
|
* Focused player can tap their area to pause their *own* timer. Any player can use their "Pass Turn / My Pause" hotkey to pause their *own* timer.
|