From cf4fef22d86ab574d9b4dfda736739829119fa3d Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Fri, 14 Nov 2025 15:17:06 -0600 Subject: [PATCH] CLAUDE: Update all demo pages - add action field and cross-linking footers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated all 4 demo pages to use new action field and added navigation footers for easy cross-linking between demo pages. Changes: - demo-decisions.vue: Updated to use action field, added runner prop bindings - demo.vue: Added footer with links to other demos - demo-gameplay.vue: Added footer with links to other demos - demo-substitutions.vue: Added footer with links to other demos Demo page updates: - OffensiveDecision now uses action field instead of approach/hit_and_run/bunt - Action labels properly mapped (swing_away, steal, check_jump, etc.) - Added runner state props (runnerOnFirst, runnerOnSecond, runnerOnThird) - Added outs prop for smart filtering Footer features: - 3-column grid layout responsive to mobile - Icons and descriptions for each demo - Hover effects on links - Consistent styling across all pages Demo pages now fully connected: - /demo → Game State Demo (ScoreBoard, GameBoard, etc.) - /demo-decisions → Decision Components Demo (new action-based) - /demo-gameplay → Gameplay Components Demo (DiceRoller, ManualOutcome) - /demo-substitutions → Substitution Components Demo Files modified: - pages/demo-decisions.vue - pages/demo.vue - pages/demo-gameplay.vue - pages/demo-substitutions.vue 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- frontend-sba/pages/demo-decisions.vue | 66 +++++++++++++++++++---- frontend-sba/pages/demo-gameplay.vue | 41 ++++++++++++++ frontend-sba/pages/demo-substitutions.vue | 41 ++++++++++++++ frontend-sba/pages/demo.vue | 41 ++++++++++++++ 4 files changed, 180 insertions(+), 9 deletions(-) diff --git a/frontend-sba/pages/demo-decisions.vue b/frontend-sba/pages/demo-decisions.vue index ae3d274..ba69d88 100644 --- a/frontend-sba/pages/demo-decisions.vue +++ b/frontend-sba/pages/demo-decisions.vue @@ -216,6 +216,10 @@ :is-active="demoControls.isActive" :current-decision="demoState.offensiveDecision" :has-runners-on-base="demoControls.hasRunners" + :runner-on-first="!!demoRunners.first" + :runner-on-second="!!demoRunners.second" + :runner-on-third="!!demoRunners.third" + :outs="0" @submit="handleOffensiveSubmit" /> @@ -260,6 +264,47 @@ + + +
+
+

+ 📚 Other Demo Pages +

+
+ +
🎮
+
Game State Demo
+
+ Live game state visualization +
+
+ +
🎲
+
Gameplay Demo
+
+ Dice rolling & manual outcomes +
+
+ +
🔄
+
Substitutions Demo
+
+ Player substitution workflow +
+
+
+
+
@@ -307,9 +352,7 @@ const demoState = ref({ hold_runners: [], } as DefensiveDecision, offensiveDecision: { - approach: 'normal', - hit_and_run: false, - bunt_attempt: false, + action: 'swing_away', } as Omit, stealAttempts: [] as number[], decisionHistory: [ @@ -320,7 +363,7 @@ const demoState = ref({ }, { type: 'Offensive' as const, - summary: 'power approach, Hit & Run', + summary: 'Swing Away', timestamp: '10:45:18', }, ], @@ -361,16 +404,21 @@ const handleDefensiveSubmit = (decision: DefensiveDecision) => { const handleOffensiveSubmit = (decision: Omit) => { demoState.value.offensiveDecision = decision - const tactics = [] - if (decision.hit_and_run) tactics.push('Hit & Run') - if (decision.bunt_attempt) tactics.push('Bunt') - const summary = `${decision.approach} approach${tactics.length ? ', ' + tactics.join(', ') : ''}` + const actionLabels: Record = { + swing_away: 'Swing Away', + steal: 'Steal', + check_jump: 'Check Jump', + hit_and_run: 'Hit and Run', + sac_bunt: 'Sacrifice Bunt', + squeeze_bunt: 'Squeeze Bunt', + } + const summary = actionLabels[decision.action] || decision.action demoState.value.decisionHistory.unshift({ type: 'Offensive', summary, timestamp: new Date().toLocaleTimeString(), }) - showToast(`Offensive decision submitted: ${summary}`) + showToast(`Offensive action selected: ${summary}`) } const handleStealSubmit = (attempts: number[]) => { diff --git a/frontend-sba/pages/demo-gameplay.vue b/frontend-sba/pages/demo-gameplay.vue index 9f60e1f..d241645 100644 --- a/frontend-sba/pages/demo-gameplay.vue +++ b/frontend-sba/pages/demo-gameplay.vue @@ -181,6 +181,47 @@ + + +
+
+

+ 📚 Other Demo Pages +

+
+ +
🎮
+
Game State Demo
+
+ Live game state visualization +
+
+ +
⚔️
+
Decisions Demo
+
+ Decision input components +
+
+ +
🔄
+
Substitutions Demo
+
+ Player substitution workflow +
+
+
+
+
diff --git a/frontend-sba/pages/demo-substitutions.vue b/frontend-sba/pages/demo-substitutions.vue index b1c679b..c386699 100644 --- a/frontend-sba/pages/demo-substitutions.vue +++ b/frontend-sba/pages/demo-substitutions.vue @@ -126,6 +126,47 @@ + + +
+
+

+ 📚 Other Demo Pages +

+
+ +
🎮
+
Game State Demo
+
+ Live game state visualization +
+
+ +
⚔️
+
Decisions Demo
+
+ Decision input components +
+
+ +
🎲
+
Gameplay Demo
+
+ Dice rolling & manual outcomes +
+
+
+
+
diff --git a/frontend-sba/pages/demo.vue b/frontend-sba/pages/demo.vue index 21737d7..444d1d8 100644 --- a/frontend-sba/pages/demo.vue +++ b/frontend-sba/pages/demo.vue @@ -160,6 +160,47 @@ + + +
+
+

+ 📚 Other Demo Pages +

+
+ +
⚔️
+
Decisions Demo
+
+ Decision input components +
+
+ +
🎲
+
Gameplay Demo
+
+ Dice rolling & manual outcomes +
+
+ +
🔄
+
Substitutions Demo
+
+ Player substitution workflow +
+
+
+
+