diff --git a/src/App.js b/src/App.js index 59cd4c0..84959a6 100644 --- a/src/App.js +++ b/src/App.js @@ -2,7 +2,7 @@ import React, { useState, useEffect, useRef, useMemo } from 'react'; import { initializeApp } from 'firebase/app'; import { getAuth, signInAnonymously, onAuthStateChanged, signInWithCustomToken } from 'firebase/auth'; import { getFirestore, doc, setDoc, getDoc, getDocs, collection, onSnapshot, updateDoc, deleteDoc, query, writeBatch } from 'firebase/firestore'; -import { PlusCircle, Users, Swords, Trash2, Eye, Edit3, Save, XCircle, ChevronsUpDown, UserCheck, UserX, HeartCrack, HeartPulse, Zap, EyeOff, ExternalLink, AlertTriangle, Play as PlayIcon, Pause as PauseIcon, SkipForward as SkipForwardIcon, StopCircle as StopCircleIcon, Users2, Dices } from 'lucide-react'; // ImageIcon removed +import { PlusCircle, Users, Swords, Trash2, Eye, Edit3, Save, XCircle, ChevronsUpDown, UserCheck, UserX, HeartCrack, HeartPulse, Zap, EyeOff, ExternalLink, AlertTriangle, Play as PlayIcon, Pause as PauseIcon, SkipForward as SkipForwardIcon, StopCircle as StopCircleIcon, Users2, Dices } from 'lucide-react'; // --- Firebase Configuration --- const firebaseConfig = { @@ -214,7 +214,7 @@ function App() { {!isAuthReady && !error &&

Authenticating...

} ); @@ -354,7 +354,8 @@ function AdminView({ userId }) { } // --- CreateCampaignForm, CharacterManager, EncounterManager, CreateEncounterForm, ParticipantManager, EditParticipantModal, InitiativeControls, DisplayView, Modal, Icons --- -// These components are identical to the previous version (v0.1.28) and are included below for completeness. +// The rest of the components are identical to the previous version (v0.1.28) and are included below for completeness. +// Only ParticipantManager and DisplayView have minor changes for monster color. function CreateCampaignForm({ onCreate, onCancel }) { const [name, setName] = useState(''); @@ -733,10 +734,10 @@ function ParticipantManager({ encounter, encounterPath, campaignCharacters }) { setMonsterInitMod(e.target.value)} className="mt-1 w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-md shadow-sm focus:outline-none focus:ring-sky-500 focus:border-sky-500 sm:text-sm text-white" />
- - setMaxHp(e.target.value)} className="mt-1 w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-md shadow-sm focus:outline-none focus:ring-sky-500 focus:border-sky-500 sm:text-sm text-white" /> + + setMaxHp(e.target.value)} className="mt-1 w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-md shadow-sm focus:outline-none focus:ring-sky-500 focus:border-sky-500 sm:text-sm text-white" />
-
+
{/* Aligned with input bottom */} setIsNpc(e.target.checked)} className="h-4 w-4 text-indigo-600 border-gray-300 rounded focus:ring-indigo-500" />
@@ -751,7 +752,7 @@ function ParticipantManager({ encounter, encounterPath, campaignCharacters }) { {campaignCharacters.map(c => )}
-
+
{/* Spans 2 cols to align with monster layout's 2nd row if needed */} setMaxHp(e.target.value)} className="mt-1 w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-md shadow-sm focus:outline-none focus:ring-sky-500 focus:border-sky-500 sm:text-sm text-white" />
@@ -775,7 +776,7 @@ function ParticipantManager({ encounter, encounterPath, campaignCharacters }) { const isCurrentTurn = encounter.isStarted && p.id === encounter.currentTurnParticipantId; const isDraggable = (!encounter.isStarted || encounter.isPaused) && tiedInitiatives.includes(Number(p.initiative)); const participantDisplayType = p.type === 'monster' ? (p.isNpc ? 'NPC' : 'Monster') : 'Character'; - let bgColor = p.type === 'character' ? 'bg-sky-800' : (p.isNpc ? 'bg-slate-600' : 'bg-red-800'); + let bgColor = p.type === 'character' ? 'bg-sky-800' : (p.isNpc ? 'bg-slate-600' : 'bg-[#8e351c]'); // Custom hex for monster if (isCurrentTurn && !encounter.isPaused) bgColor = 'bg-green-600'; return ( @@ -982,12 +983,7 @@ function DisplayView() { {participantsToRender.length === 0 && isStarted &&

No active participants.

}
{participantsToRender.map(p => { - let participantBgColor = 'bg-red-700'; // Default for monster - if (p.type === 'character') { - participantBgColor = 'bg-sky-700'; - } else if (p.isNpc) { // Monster that is an NPC - participantBgColor = 'bg-slate-700'; // Muted gray for NPC - } + let participantBgColor = p.type === 'monster' ? (p.isNpc ? 'bg-slate-700' : 'bg-[#8e351c]') : 'bg-sky-700'; if (p.id === currentTurnParticipantId && isStarted && !isPaused) { participantBgColor = 'bg-green-700 ring-4 ring-green-400 scale-105'; } else if (isPaused && p.id === currentTurnParticipantId) { @@ -997,7 +993,7 @@ function DisplayView() { return (
-

{p.name}{p.id === currentTurnParticipantId && isStarted && !isPaused && (Current)}

+

{p.name}{p.id === currentTurnParticipantId && isStarted && !isPaused && (Current)}

{/* Ensure monster text is white with new bg */} Init: {p.initiative}