Add Rules & Expectations feature with TV overlay and dashboard layout updates
- Add Rules & Expectations admin section with drag-to-reorder, add/edit/delete - Add Overlays card to Dashboard with Rules/Expectations toggle button (LIVE badge when active) - Add full-screen rules overlay on TV view (green theme, numbered list, tap to dismiss) - Backend: new RuleItem model, /api/rules CRUD + bulk reorder, /api/overlays WS broadcast endpoints - Schedule store handles show_rules / hide_rules WebSocket events - Rearrange Dashboard top row: TV Dashboard | 3 Strikes | Overlays (3-col, mobile stacks) - Put Today's Session and Today's Schedule side-by-side at 50/50 width (mobile stacks) - Update README with all new features, setup steps, WS events, and project structure Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
1 parent
956df11f49
commit
d724262e27
10 files changed
+569
-42
No files matched your search
@@ -163,6 +163,24 @@
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<!-- Rules/Expectations full-screen overlay -->
|
||||
<transition name="tv-alert">
|
||||
<div v-if="scheduleStore.showRulesOverlay" class="tv-rules-overlay" @click="scheduleStore.showRulesOverlay = false">
|
||||
<div class="tv-rules-box">
|
||||
<div class="tv-rules-header">
|
||||
<span class="tv-rules-icon">📋</span>
|
||||
<span class="tv-rules-title">Rules & Expectations</span>
|
||||
</div>
|
||||
<ol class="tv-rules-list">
|
||||
<li v-for="(rule, i) in scheduleStore.rulesOverlayItems" :key="i" class="tv-rules-item">
|
||||
{{ rule }}
|
||||
</li>
|
||||
</ol>
|
||||
<div class="tv-rules-dismiss-hint">Tap anywhere to dismiss</div>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -612,4 +630,88 @@ onMounted(async () => {
|
||||
.tv-alert-leave-active { transition: all 0.3s ease; }
|
||||
.tv-alert-enter-from { opacity: 0; transform: scale(0.9); }
|
||||
.tv-alert-leave-to { opacity: 0; transform: scale(1.05); }
|
||||
|
||||
/* Rules/Expectations full-screen overlay */
|
||||
.tv-rules-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.85);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 9999;
|
||||
cursor: pointer;
|
||||
}
|
||||
.tv-rules-box {
|
||||
background: #0f172a;
|
||||
border: 3px solid #10b981;
|
||||
border-radius: 2rem;
|
||||
padding: 3.5rem 4.5rem;
|
||||
max-width: 800px;
|
||||
width: 90%;
|
||||
max-height: 85vh;
|
||||
overflow-y: auto;
|
||||
box-shadow: 0 0 80px rgba(16, 185, 129, 0.3);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2rem;
|
||||
}
|
||||
.tv-rules-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
justify-content: center;
|
||||
}
|
||||
.tv-rules-icon { font-size: 3rem; }
|
||||
.tv-rules-title {
|
||||
font-size: 2.5rem;
|
||||
font-weight: 800;
|
||||
color: #34d399;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
.tv-rules-list {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.25rem;
|
||||
counter-reset: rules-counter;
|
||||
}
|
||||
.tv-rules-item {
|
||||
counter-increment: rules-counter;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 1.25rem;
|
||||
font-size: 2rem;
|
||||
font-weight: 500;
|
||||
color: #f1f5f9;
|
||||
line-height: 1.3;
|
||||
padding-bottom: 1.25rem;
|
||||
border-bottom: 1px solid #1e293b;
|
||||
}
|
||||
.tv-rules-item:last-child { border-bottom: none; padding-bottom: 0; }
|
||||
.tv-rules-item::before {
|
||||
content: counter(rules-counter);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
background: #064e3b;
|
||||
border: 2px solid #10b981;
|
||||
border-radius: 50%;
|
||||
font-size: 1.2rem;
|
||||
font-weight: 800;
|
||||
color: #34d399;
|
||||
flex-shrink: 0;
|
||||
margin-top: 0.1rem;
|
||||
}
|
||||
.tv-rules-dismiss-hint {
|
||||
font-size: 1rem;
|
||||
color: #475569;
|
||||
text-align: center;
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user