version bump.
This commit is contained in:
parent
d754f8657c
commit
dda3453d79
15
src/App.js
15
src/App.js
@ -214,13 +214,16 @@ function App() {
|
||||
{!isAuthReady && !error && <p>Authenticating...</p>}
|
||||
</main>
|
||||
<footer className="bg-slate-900 p-4 text-center text-sm text-slate-400 mt-8">
|
||||
TTRPG Initiative Tracker v0.1.34
|
||||
TTRPG Initiative Tracker v0.2.0
|
||||
</footer>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// --- Confirmation Modal Component ---
|
||||
// ... (ConfirmationModal, AdminView, CreateCampaignForm, CharacterManager, EncounterManager, CreateEncounterForm, ParticipantManager, EditParticipantModal, InitiativeControls, DisplayView, Modal, Icons remain the same as v0.1.29)
|
||||
// For brevity, only the changed App component's footer is shown. Assume all other components are the same as the last complete code block you received.
|
||||
|
||||
function ConfirmationModal({ isOpen, onClose, onConfirm, title, message }) {
|
||||
if (!isOpen) return null;
|
||||
return (
|
||||
@ -240,11 +243,9 @@ function ConfirmationModal({ isOpen, onClose, onConfirm, title, message }) {
|
||||
);
|
||||
}
|
||||
|
||||
// --- Admin View Component ---
|
||||
function AdminView({ userId }) {
|
||||
const { data: campaignsData, isLoading: isLoadingCampaigns, error: campaignsError } = useFirestoreCollection(getCampaignsCollectionPath());
|
||||
const { data: initialActiveInfoData } = useFirestoreDocument(getActiveDisplayDocPath());
|
||||
|
||||
const [campaignsWithDetails, setCampaignsWithDetails] = useState([]);
|
||||
const [selectedCampaignId, setSelectedCampaignId] = useState(null);
|
||||
const [showCreateCampaignModal, setShowCreateCampaignModal] = useState(false);
|
||||
@ -284,7 +285,6 @@ function AdminView({ userId }) {
|
||||
}
|
||||
}, [initialActiveInfoData, campaignsWithDetails, selectedCampaignId]);
|
||||
|
||||
|
||||
const handleCreateCampaign = async (name, backgroundUrl) => {
|
||||
if (!db || !name.trim()) return;
|
||||
const newCampaignId = generateId();
|
||||
@ -317,7 +317,6 @@ function AdminView({ userId }) {
|
||||
await batch.commit();
|
||||
await deleteDoc(doc(db, getCampaignDocPath(campaignId)));
|
||||
if (selectedCampaignId === campaignId) setSelectedCampaignId(null);
|
||||
|
||||
const activeDisplayRef = doc(db, getActiveDisplayDocPath());
|
||||
const activeDisplaySnap = await getDoc(activeDisplayRef);
|
||||
if (activeDisplaySnap.exists() && activeDisplaySnap.data().activeCampaignId === campaignId) {
|
||||
@ -387,7 +386,6 @@ function AdminView({ userId }) {
|
||||
);
|
||||
}
|
||||
|
||||
// --- CreateCampaignForm (No Change from v0.1.33) ---
|
||||
function CreateCampaignForm({ onCreate, onCancel }) {
|
||||
const [name, setName] = useState('');
|
||||
const [backgroundUrl, setBackgroundUrl] = useState('');
|
||||
@ -410,7 +408,7 @@ function CreateCampaignForm({ onCreate, onCancel }) {
|
||||
);
|
||||
}
|
||||
|
||||
// --- CharacterManager (No Change from v0.1.33) ---
|
||||
|
||||
function CharacterManager({ campaignId, campaignCharacters }) {
|
||||
const [characterName, setCharacterName] = useState('');
|
||||
const [defaultMaxHp, setDefaultMaxHp] = useState(10);
|
||||
@ -836,9 +834,6 @@ function ParticipantManager({ encounter, encounterPath, campaignCharacters }) {
|
||||
);
|
||||
}
|
||||
|
||||
// ... (EditParticipantModal, InitiativeControls, DisplayView, Modal, Icons)
|
||||
// The rest of the components are assumed to be the same as v0.1.28 for this update.
|
||||
|
||||
function EditParticipantModal({ participant, onClose, onSave }) {
|
||||
const [name, setName] = useState(participant.name);
|
||||
const [initiative, setInitiative] = useState(participant.initiative);
|
||||
|
Loading…
x
Reference in New Issue
Block a user