diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index e93c8bb..27e8cb4 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -48,6 +48,8 @@ src/ inventory.rs One inventory section (rows + money) item.rs One inventory row numput.rs Numeric input components (Numput, NumputChange) + character/*.rs Character page: player_card, prepared_spells, + attunements mod.rs Pages (Character, Inventories, Wiki) + item search ``` @@ -113,7 +115,8 @@ App │ └─ SpellSlots 9 levels of clickable pips ├─ Nav links to the three routes └─ Routes - ├─ Character stub text + ├─ Character player card; prepared spells (vacant/occupied + │ slots with free-text entry); attunements (3 slots) ├─ Inventories two Inventory sections (Personal/Common) │ └─ Inventory balance (5 × Numput), rows (ForEnumerate) │ └─ Item name, quantity ±, weight ±, more/swap/remove @@ -164,9 +167,8 @@ currently mounted on any page. ## Current gaps - Quests, notes, contacts: models and mock data only -- `Character` and `Wiki` pages render placeholders -- Prepared spells list is empty; `Spell` is a name-only stub; attunements - have no UI; `Settings` has only `version` +- `Wiki` page renders a placeholder +- `Settings` has only `version` - The item "+"/"…" buttons are dead - `foundry.json` was loaded twice (fixed); ~3.9 MB of JSON is bundled into the WASM and parsed on startup diff --git a/README.md b/README.md index 61d4936..c3a6899 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ game. The UI is in Russian. wipe to a blank campaign - Undo/redo: header buttons and Ctrl+Z / Ctrl+Shift+Z / Ctrl+Y over edit bursts; Clear and import are undoable too +- Character page: player card, prepared spells (free-text slots with + level/description) and attunements (3 slots, clearable) - Character sidebar: portrait, names, class, level, XP, hit points with temp HP bar, hit dice, death saves, spell slots - Inventories page (`/inv`): personal and party-common inventories, diff --git a/ROADMAP.md b/ROADMAP.md index e8b5396..5f4ffe1 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -133,13 +133,23 @@ in chromium (buttons, shortcuts, reload, undoable Clear). Notes: `/` currently renders the literal string "character". -- [ ] player card: portrait, name, class, level, XP (data already in sidebar) -- [ ] HP block: temp / current / max, `Numput`-style editing -- [ ] prepared spells UI: render Vacant/Occupied slots; free-text spell name entry +- [x] player card: portrait, name, class, level, XP (data already in sidebar) +- [x] HP block: temp / current / max, `Numput`-style editing +- [x] prepared spells UI: render Vacant/Occupied slots; free-text spell name entry (upgrade the `Spell` stub from `name`-only to name + optional level/description) -- [ ] attunements UI: 3 slots, free text, clear button (model exists) +- [x] attunements UI: 3 slots, free text, clear button (model exists) - **Acceptance:** player can set prepared spells and attunements; they persist. +**Done (2026-08-16):** page in `src/components/character/`; e2e-verified +in chromium (add/undo/redo a spell, remove, reload persistence, attunements +with clear). Notes: +- The HP block was already in the sidebar (`hit_points.rs`, editable + `type="number"` inputs via `utils::adjust_checked`) — nothing to add. +- `Spell` fields are optional, so name-only spells in old saved JSON + still parse. +- Rows are plain functions called from `For`'s `let(...)` children: + component tags are not allowed directly inside them (view macro). + ## Phase 3 — Inventory & item search end-to-end (L, ~3-5 days) Rows are editable and move/remove works. Search exists but is orphaned; "+" and