Add Meeting system subject and notification system

- Auto-create a locked "Meeting" subject for every user on registration
  and seed it for all existing users on startup
- Meeting subject cannot be deleted or renamed (is_system flag)
- 5-minute corner toast warning on Dashboard and TV with live countdown,
  dismiss button, and 1-minute re-notify if dismissed
- At start time: full-screen TV overlay with 30-second auto-dismiss,
  automatic pause of running block, switch to Meeting block, and
  auto-start of Meeting timer
- Web Audio API chimes: rising on warnings, falling at meeting start
- Update README with Meeting subject and notification system docs

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
derekcandClaude Sonnet 4.6 committed 2026-03-04 23:44:21 -08:00
1 parent c560055b10
commit f645d78c83
10 files changed
+356 -11

No files matched your search

+110
View File
@@ -136,6 +136,33 @@
<div class="tv-ws-status" :class="{ connected: wsConnected }">
{{ wsConnected ? '● Live' : '○ Reconnecting...' }}
</div>
<!-- Meeting corner toasts (5-min / 1-min warnings) -->
<div class="tv-meeting-toasts">
<transition-group name="toast">
<div v-for="alert in meetingAlerts.dashboardAlerts.value" :key="alert.id" class="tv-meeting-toast">
<div class="tv-toast-icon">📅</div>
<div class="tv-toast-body">
<div class="tv-toast-title">Upcoming Meeting</div>
<div class="tv-toast-label">{{ alert.label }}</div>
<div class="tv-toast-countdown">Starts in {{ meetingAlerts.alertCountdown(alert) }}</div>
</div>
<button class="tv-toast-dismiss" @click="meetingAlerts.dismissDashboardAlert(alert.id)">✕</button>
</div>
</transition-group>
</div>
<!-- Meeting full-screen alert overlay -->
<transition name="tv-alert">
<div v-if="meetingAlerts.tvAlert.value" class="tv-meeting-overlay" @click="meetingAlerts.dismissTvAlert()">
<div class="tv-meeting-box">
<div class="tv-meeting-icon">📅</div>
<div class="tv-meeting-title">Meeting Starting Now</div>
<div class="tv-meeting-label">{{ meetingAlerts.tvAlert.value.label }}</div>
<div class="tv-meeting-dismiss-hint">Tap anywhere to dismiss &bull; Auto-closing in {{ meetingAlerts.tvCountdown.value }}s</div>
</div>
</div>
</transition>
</div>
</template>
@@ -144,6 +171,7 @@ import { computed, onMounted, ref } from 'vue'
import { useRoute } from 'vue-router'
import { useScheduleStore } from '@/stores/schedule'
import { useWebSocket } from '@/composables/useWebSocket'
import { useMeetingAlerts } from '@/composables/useMeetingAlerts'
import TimerDisplay from '@/components/TimerDisplay.vue'
import ProgressBar from '@/components/ProgressBar.vue'
import ScheduleBlock from '@/components/ScheduleBlock.vue'
@@ -151,6 +179,7 @@ import ScheduleBlock from '@/components/ScheduleBlock.vue'
const route = useRoute()
const scheduleStore = useScheduleStore()
const childId = parseInt(route.params.childId)
const meetingAlerts = useMeetingAlerts()
// Read timezone from localStorage (set by the parent in Admin → Settings)
const tz = localStorage.getItem('tz') || undefined
@@ -502,4 +531,85 @@ onMounted(async () => {
.tv-ws-status.connected {
color: #22c55e;
}
/* Meeting corner toasts */
.tv-meeting-toasts {
position: fixed;
bottom: 2rem;
right: 2rem;
z-index: 9998;
display: flex;
flex-direction: column;
gap: 1rem;
align-items: flex-end;
}
.tv-meeting-toast {
display: flex;
align-items: flex-start;
gap: 1rem;
background: #1c1a07;
border: 2px solid #f59e0b;
border-radius: 1rem;
padding: 1.2rem 1.5rem;
width: 380px;
box-shadow: 0 4px 30px rgba(0,0,0,0.7);
}
.tv-toast-icon { font-size: 2.2rem; flex-shrink: 0; }
.tv-toast-body { flex: 1; min-width: 0; }
.tv-toast-title { font-size: 0.85rem; font-weight: 700; color: #fbbf24; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.2rem; }
.tv-toast-label { font-size: 1.3rem; font-weight: 700; color: #f1f5f9; margin-bottom: 0.3rem; }
.tv-toast-countdown { font-size: 1.6rem; font-weight: 800; color: #fbbf24; font-variant-numeric: tabular-nums; }
.tv-toast-dismiss { background: none; border: none; color: #64748b; cursor: pointer; font-size: 1.4rem; padding: 0; flex-shrink: 0; line-height: 1; }
.tv-toast-dismiss:hover { color: #f1f5f9; }
.toast-enter-active { transition: all 0.3s ease; }
.toast-leave-active { transition: all 0.3s ease; }
.toast-enter-from { opacity: 0; transform: translateX(100%); }
.toast-leave-to { opacity: 0; transform: translateX(100%); }
/* Meeting full-screen alert */
.tv-meeting-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.75);
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
cursor: pointer;
}
.tv-meeting-box {
background: #1e1b4b;
border: 3px solid #6366f1;
border-radius: 2rem;
padding: 4rem 5rem;
text-align: center;
max-width: 700px;
width: 90%;
box-shadow: 0 0 80px rgba(99, 102, 241, 0.4);
}
.tv-meeting-icon { font-size: 5rem; margin-bottom: 1rem; }
.tv-meeting-title {
font-size: 2.5rem;
font-weight: 800;
color: #a5b4fc;
margin-bottom: 0.5rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.tv-meeting-label {
font-size: 3.5rem;
font-weight: 900;
color: #f1f5f9;
margin-bottom: 2rem;
}
.tv-meeting-dismiss-hint {
font-size: 1.1rem;
color: #64748b;
}
.tv-alert-enter-active { transition: all 0.4s ease; }
.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); }
</style>