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

@@ -0,0 +1,91 @@
<script setup lang="ts">
import { RouterLink, useRoute } from 'vue-router';
import { useAdminLocale } from '../composables/useAdminLocale';
const { t } = useAdminLocale();
const route = useRoute();
withDefaults(
defineProps<{
embedded?: boolean;
}>(),
{ embedded: false },
);
const tabs = [
{ path: '/', labelKey: 'nav.dashboard.matches' },
{ path: '/dashboard/players', labelKey: 'nav.dashboard.players' },
];
function isActive(path: string) {
if (path === '/dashboard/players') {
return route.path === '/dashboard/players';
}
return route.path === '/' || route.path === '/dashboard/matches';
}
</script>
<template>
<nav
class="dashboard-subnav"
:class="{ 'dashboard-subnav--embedded': embedded }"
aria-label="Dashboard sections"
>
<RouterLink
v-for="tab in tabs"
:key="tab.path"
:to="tab.path"
class="dashboard-subnav__item"
:class="{ 'dashboard-subnav__item--active': isActive(tab.path) }"
>
{{ t(tab.labelKey) }}
</RouterLink>
</nav>
</template>
<style scoped>
.dashboard-subnav {
display: flex;
align-items: center;
gap: 4px;
margin-bottom: 16px;
padding: 6px;
border-radius: 10px;
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.06);
flex-shrink: 0;
min-height: 48px;
box-sizing: border-box;
}
.dashboard-subnav--embedded {
margin-bottom: 0;
padding: 0 14px 0 0;
border: none;
border-right: 1px solid rgba(255, 255, 255, 0.08);
background: transparent;
flex-shrink: 0;
height: 44px;
box-sizing: border-box;
}
.dashboard-subnav__item {
padding: 0 14px;
height: 36px;
display: inline-flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
border-radius: 8px;
font-size: 13px;
font-weight: 600;
color: #888;
transition: color 0.15s, background 0.15s;
}
.dashboard-subnav__item:hover {
color: #ccc;
background: rgba(255, 255, 255, 0.04);
}
.dashboard-subnav__item--active {
color: var(--green-text);
background: rgba(0, 200, 83, 0.1);
}
</style>