fix(submissions): top-header icon for live connection (ws)

This commit is contained in:
2026-10-16 02:03:54 +02:00
parent a6ea3719b9
commit 3d040dd377
5 changed files with 81 additions and 26 deletions
+1 -9
View File
@@ -477,7 +477,7 @@ const loadUserSubmissions = async () => {
// Match over (or user moved off it): back to the picker, which auto-enters
// the next match when there's only one, so players follow along without a refresh.
const { isConnected: wsConnected } = useSubmissionsWebSocket({
useSubmissionsWebSocket({
userSubmissions,
onScopeUpdate: (scope) => {
if (scope.id !== props.scopeId || (scope.is_active && scope.assigned)) return;
@@ -557,14 +557,6 @@ onUnmounted(() => {
<div class="flex-1 bg-base-200">
<!-- Main Content -->
<div class="container min-w-3/4 mx-auto px-4 py-8">
<!-- WebSocket Status Indicator -->
<div class="flex justify-end mb-4">
<div :class="['badge', wsConnected ? 'badge-success' : 'badge-warning']">
<i :class="['mdi mr-1', wsConnected ? 'mdi-wifi' : 'mdi-wifi-off']"></i>
{{ wsConnected ? t("submissions.live") : t("submissions.offline") }}
</div>
</div>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
<!-- Right Column: Upload -->
<div class="lg:col-span-1 flex flex-col gap-8 order-1 lg:order-2">