diff --git a/public/index.html b/public/index.html index 74a893c..f945035 100644 --- a/public/index.html +++ b/public/index.html @@ -12,7 +12,7 @@ - + TTRPG Initiative Tracker diff --git a/src/App.js b/src/App.js index e60667a..ad7b14a 100644 --- a/src/App.js +++ b/src/App.js @@ -44,7 +44,7 @@ if (typeof document !== 'undefined') { // CONSTANTS // ============================================================================ -const APP_VERSION = 'v0.2.2'; +const APP_VERSION = 'v0.2.4'; const DEFAULT_MAX_HP = 10; const DEFAULT_INIT_MOD = 0; const MONSTER_DEFAULT_INIT_MOD = 2; @@ -225,10 +225,10 @@ function Modal({ onClose, title, children }) { return (
-
+

{title}

-
@@ -243,16 +243,16 @@ function ConfirmationModal({ isOpen, onClose, onConfirm, title, message }) { return (
-
+

{title || "Confirm Action"}

-

{message || "Are you sure you want to proceed?"}

+

{message || "Are you sure you want to proceed?"}

@@ -270,7 +270,7 @@ function ConfirmationModal({ isOpen, onClose, onConfirm, title, message }) { function LoadingSpinner({ message = "Loading..." }) { return ( -
+

{message}

@@ -279,7 +279,7 @@ function LoadingSpinner({ message = "Loading..." }) { function ErrorDisplay({ message, critical = false }) { return ( -
+

{critical ? 'Configuration Error' : 'Error'}

@@ -306,7 +306,7 @@ function CreateCampaignForm({ onCreate, onCancel }) { return (
-
-
@@ -363,7 +363,7 @@ function CreateEncounterForm({ onCreate, onCancel }) { return (
-
@@ -379,13 +379,13 @@ function CreateEncounterForm({ onCreate, onCancel }) { @@ -416,40 +416,40 @@ function EditParticipantModal({ participant, onClose, onSave }) {
- + setName(e.target.value)} - className="mt-1 block w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-md shadow-sm focus:outline-none focus:ring-amber-600 focus:border-amber-600 sm:text-sm text-white" + className="mt-1 block w-full px-3 py-2 bg-stone-800 border border-stone-700 rounded-md shadow-sm focus:outline-none focus:ring-amber-600 focus:border-amber-600 sm:text-sm text-white" />
- + setInitiative(e.target.value)} - className="mt-1 block w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-md shadow-sm focus:outline-none focus:ring-amber-600 focus:border-amber-600 sm:text-sm text-white" + className="mt-1 block w-full px-3 py-2 bg-stone-800 border border-stone-700 rounded-md shadow-sm focus:outline-none focus:ring-amber-600 focus:border-amber-600 sm:text-sm text-white" />
- + setCurrentHp(e.target.value)} - className="mt-1 block w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-md shadow-sm focus:outline-none focus:ring-amber-600 focus:border-amber-600 sm:text-sm text-white" + className="mt-1 block w-full px-3 py-2 bg-stone-800 border border-stone-700 rounded-md shadow-sm focus:outline-none focus:ring-amber-600 focus:border-amber-600 sm:text-sm text-white" />
- + setMaxHp(e.target.value)} - className="mt-1 block w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-md shadow-sm focus:outline-none focus:ring-amber-600 focus:border-amber-600 sm:text-sm text-white" + className="mt-1 block w-full px-3 py-2 bg-stone-800 border border-stone-700 rounded-md shadow-sm focus:outline-none focus:ring-amber-600 focus:border-amber-600 sm:text-sm text-white" />
@@ -460,9 +460,9 @@ function EditParticipantModal({ participant, onClose, onSave }) { id="editIsNpc" checked={isNpc} onChange={(e) => setIsNpc(e.target.checked)} - className="h-4 w-4 text-indigo-600 border-gray-300 rounded focus:ring-indigo-500" + className="h-4 w-4 text-violet-600 border-stone-400 rounded focus:ring-violet-500" /> -
@@ -471,7 +471,7 @@ function EditParticipantModal({ participant, onClose, onSave }) { @@ -590,14 +590,14 @@ function CharacterManager({ campaignId, campaignCharacters }) { return ( <> -
+

Campaign Characters

) : ( <> - + {character.name}{' '} - + (HP: {character.defaultMaxHp || 'N/A'}, Init Mod: {formatInitMod(character.defaultInitMod)}) @@ -719,14 +719,14 @@ function CharacterManager({ campaignId, campaignCharacters }) { defaultMaxHp: character.defaultMaxHp || DEFAULT_MAX_HP, defaultInitMod: character.defaultInitMod || DEFAULT_INIT_MOD })} - className="p-1 rounded transition-colors text-yellow-400 hover:text-yellow-300 bg-slate-600 hover:bg-slate-500" + className="p-1 rounded transition-colors text-yellow-400 hover:text-yellow-300 bg-stone-700 hover:bg-stone-600" aria-label="Edit character" >
@@ -1149,10 +1149,10 @@ function ParticipantManager({ encounter, encounterPath, campaignCharacters }) { e.preventDefault(); handleAddParticipant(); }} - className="grid grid-cols-1 md:grid-cols-6 gap-x-4 gap-y-2 mb-4 p-3 bg-slate-700 rounded items-end" + className="grid grid-cols-1 md:grid-cols-6 gap-x-4 gap-y-2 mb-4 p-3 bg-stone-800 rounded items-end" >
- + setParticipantName(e.target.value)} placeholder="e.g., Dire Wolf" - 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-amber-600 focus:border-amber-600 sm:text-sm text-white" + className="mt-1 w-full px-3 py-2 bg-stone-800 border border-stone-700 rounded-md shadow-sm focus:outline-none focus:ring-amber-600 focus:border-amber-600 sm:text-sm text-white" />
-
-
@@ -1212,9 +1212,9 @@ function ParticipantManager({ encounter, encounterPath, campaignCharacters }) { id="isNpc" checked={isNpc} onChange={(e) => setIsNpc(e.target.checked)} - className="h-4 w-4 text-indigo-600 border-gray-300 rounded focus:ring-indigo-500" + className="h-4 w-4 text-violet-600 border-stone-400 rounded focus:ring-violet-500" /> -
@@ -1222,11 +1222,11 @@ function ParticipantManager({ encounter, encounterPath, campaignCharacters }) { ) : ( <>
- +
- + 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-amber-600 focus:border-amber-600 sm:text-sm text-white" + className="mt-1 w-full px-3 py-2 bg-stone-800 border border-stone-700 rounded-md shadow-sm focus:outline-none focus:ring-amber-600 focus:border-amber-600 sm:text-sm text-white" />
@@ -1252,7 +1252,7 @@ function ParticipantManager({ encounter, encounterPath, campaignCharacters }) { {/* Round Counter */} -
+

Round: {encounter.round}

{encounter.isPaused && (

(Paused)

@@ -1730,26 +1733,26 @@ function EncounterManager({ campaignId, initialActiveEncounterId, campaignCharac const selectedEncounter = encounters?.find(e => e.id === selectedEncounterId); if (isLoadingEncounters && campaignId) { - return

Loading encounters...

; + return

Loading encounters...

; } return ( <> -
+

Encounters

{(!encounters || encounters.length === 0) && ( -

No encounters yet.

+

No encounters yet.

)}
@@ -1761,12 +1764,12 @@ function EncounterManager({ campaignId, initialActiveEncounterId, campaignCharac return (
setSelectedEncounterId(encounter.id)} className="cursor-pointer flex-grow">

{encounter.name}

-

+

Participants: {encounter.participants?.length || 0}

{isLive && ( @@ -1778,7 +1781,7 @@ function EncounterManager({ campaignId, initialActiveEncounterId, campaignCharac
{campaignsWithDetails.length === 0 && !isLoadingCampaigns && ( -

No campaigns yet. Create one to get started!

+

No campaigns yet. Create one to get started!

)}
@@ -2010,7 +2013,7 @@ function AdminView({ userId }) { ? { backgroundImage: `url(${campaign.playerDisplayBackgroundUrl})` } : {}; - const cardClasses = `h-40 flex flex-col justify-between rounded-lg shadow-md cursor-pointer transition-all relative overflow-hidden bg-cover bg-center ${selectedCampaignId === campaign.id ? 'ring-4 ring-amber-500' : ''} ${!campaign.playerDisplayBackgroundUrl ? 'bg-slate-700 hover:bg-slate-600' : 'hover:shadow-xl'}`; + const cardClasses = `h-40 flex flex-col justify-between rounded-lg shadow-md cursor-pointer transition-all relative overflow-hidden bg-cover bg-center ${selectedCampaignId === campaign.id ? 'ring-4 ring-amber-500' : ''} ${!campaign.playerDisplayBackgroundUrl ? 'bg-stone-800 hover:bg-stone-700' : 'hover:shadow-xl'}`; return (

{campaign.name}

-
+
{campaign.characters?.length || 0} Characters @@ -2059,7 +2062,7 @@ function AdminView({ userId }) { )} {selectedCampaign && ( -
+

Managing: {selectedCampaign.name}

@@ -2067,7 +2070,7 @@ function AdminView({ userId }) { campaignId={selectedCampaignId} campaignCharacters={selectedCampaign.characters || []} /> -
+
Loading Player Display...
; + return
Loading Player Display...
; } if (activeDisplayError || (isPlayerDisplayActive && encounterError)) { @@ -2198,8 +2201,8 @@ function DisplayView() { if (!isPlayerDisplayActive || !activeEncounterData) { return ( -
- +
+

Game Session Paused

The Dungeon Master has not activated an encounter for display.

@@ -2226,10 +2229,10 @@ function DisplayView() { return (
-
+

{name}

{isStarted &&

Round: {round}

} @@ -2239,15 +2242,15 @@ function DisplayView() { )} {!isStarted && participants?.length > 0 && ( -

Awaiting Start

+

Awaiting Start

)} {!isStarted && (!participants || participants.length === 0) && ( -

No participants.

+

No participants.

)} {participantsToRender.length === 0 && isStarted && ( -

No active participants.

+

No active participants.

)}
@@ -2255,8 +2258,8 @@ function DisplayView() { const isDead = p.currentHp === 0; const isDying = p.isDying || false; let participantBgColor = p.type === 'monster' - ? (p.isNpc ? 'bg-slate-700' : 'bg-[#8e351c]') - : 'bg-blue-950'; + ? (p.isNpc ? 'bg-stone-800' : 'bg-[#8e351c]') + : 'bg-indigo-950'; const isCurrentTurn = p.id === currentTurnParticipantId && isStarted && !isPaused; @@ -2274,24 +2277,24 @@ function DisplayView() { >

{isDead && ☠️} {p.name} {isCurrentTurn && ( (Current) )} - {isDead && (Unconscious)} + {isDead && {p.type === 'character' ? '(Unconscious)' : '(Dead)'}}

Init: {p.initiative}
-
+
(Inactive)

+

(Inactive)

)}
); @@ -2393,7 +2396,7 @@ function App() { if (isPlayerViewOnlyMode) { return ( -
+
{isAuthReady && } {!isAuthReady && !error &&

Authenticating for Player Display...

}
@@ -2401,8 +2404,8 @@ function App() { } return ( -
-
+
+

TTRPG Initiative Tracker

diff --git a/src/index.css b/src/index.css index 3ee4dc8..ca26abf 100644 --- a/src/index.css +++ b/src/index.css @@ -7,7 +7,7 @@ body { margin: 0; - font-family: 'EB Garamond', Georgia, 'Times New Roman', serif; + font-family: 'Alegreya Sans', system-ui, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } diff --git a/tailwind.config.js b/tailwind.config.js index 55346bf..0f5f863 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -9,7 +9,7 @@ module.exports = { extend: { fontFamily: { cinzel: ['Cinzel', 'serif'], - garamond: ['"EB Garamond"', 'Georgia', 'serif'], + garamond: ['"Alegreya Sans"', 'system-ui', 'sans-serif'], }, }, },