feat: split admin dashboard, improve match ops, and player closed-match UX

Admin: add match/player overview sub-nav; refine settlement flow and league
match management UI; improve action button enabled/disabled styles; enhance
logo upload and outright odds sync.

API: expose matchPhase/bettingOpen for closed matches; league publish guards;
settlement preview with auto score save; outright team auto-sync.

Player: watermark for closed/settled states; keep match and bet details visible;
remove default login credentials.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-10 13:00:14 +08:00
parent 6124313369
commit 03f54ca689
43 changed files with 2787 additions and 519 deletions

View File

@@ -1,28 +1,46 @@
<script setup lang="ts">
import { shallowRef, onBeforeMount, type Component } from 'vue';
import { RouterView } from 'vue-router';
import { useAuthStore } from '../stores/auth';
import { ensureStaffSession } from '../utils/session-hydrate';
import DashboardSubNav from '../components/DashboardSubNav.vue';
const auth = useAuthStore();
const dashboardView = shallowRef<Component | null>(null);
const agentDashboard = shallowRef<Component | null>(null);
const booting = shallowRef(true);
onBeforeMount(async () => {
await ensureStaffSession();
dashboardView.value = auth.isAdmin.value
? (await import('./Dashboard.vue')).default
: (await import('./agent/Dashboard.vue')).default;
if (!auth.isAdmin.value) {
agentDashboard.value = (await import('./agent/Dashboard.vue')).default;
}
booting.value = false;
});
</script>
<template>
<div v-if="booting" v-loading="true" class="home-boot" />
<component v-else :is="dashboardView" />
<template v-else-if="auth.isAdmin.value">
<div class="dashboard-shell">
<div class="list-chrome">
<div class="list-chrome__row">
<div class="list-chrome__left">
<DashboardSubNav embedded />
</div>
</div>
</div>
<RouterView />
</div>
</template>
<component v-else :is="agentDashboard" />
</template>
<style scoped>
.home-boot {
min-height: 240px;
}
.dashboard-shell :deep(.list-chrome) {
margin-bottom: 4px;
}
</style>