diff --git a/src/App.js b/src/App.js index be46dd2..15c75f4 100644 --- a/src/App.js +++ b/src/App.js @@ -1505,6 +1505,17 @@ function ParticipantManager({ encounter, encounterPath, campaignCharacters }) { function InitiativeControls({ campaignId, encounter, encounterPath }) { const [showEndConfirm, setShowEndConfirm] = useState(false); + const { data: activeDisplayData } = useFirestoreDocument(getPath.activeDisplay()); + const hidePlayerHp = activeDisplayData?.hidePlayerHp ?? true; + + const handleToggleHidePlayerHp = async () => { + if (!db) return; + try { + await setDoc(doc(db, getPath.activeDisplay()), { hidePlayerHp: !hidePlayerHp }, { merge: true }); + } catch (err) { + console.error("Error toggling hidePlayerHp:", err); + } + }; const handleStartEncounter = async () => { if (!db || !encounter.participants || encounter.participants.length === 0) { @@ -1676,6 +1687,22 @@ function InitiativeControls({ campaignId, encounter, encounterPath }) { > )} + + {/* Display Settings */} +