feat(admin,api,player): 优胜赛配置、赛事管理重构与玩家端投注体验优化
管理端拆分赛事/优胜赛 Tab,新增联赛优胜赔率面板(批量、排序、外侧删除);统一 list-chrome 工具栏对齐与列表页布局;Dashboard 失败重试、Users 操作下拉、小屏侧栏等体验修复。 API 扩展优胜赛与赛事目录接口,完善投注与钱包查询;玩家端重构赛事卡片、串关面板、注单/钱包页,新增注单详情、下注成功动画与下拉刷新。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
42
apps/admin/src/utils/admin-breadcrumb.ts
Normal file
42
apps/admin/src/utils/admin-breadcrumb.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
export interface AdminBreadcrumbItem {
|
||||
label: string;
|
||||
to?: string;
|
||||
}
|
||||
|
||||
/** 子页面顶栏面包屑(一级菜单 + 当前子页) */
|
||||
export function resolveAdminBreadcrumb(
|
||||
path: string,
|
||||
t: (key: string) => string,
|
||||
): AdminBreadcrumbItem[] | null {
|
||||
if (/^\/settlement\/[^/]+/.test(path)) {
|
||||
return [
|
||||
{ label: t('nav.matches'), to: '/matches' },
|
||||
{ label: t('breadcrumb.settlement') },
|
||||
];
|
||||
}
|
||||
if (/^\/matches\/[^/]+\/edit/.test(path)) {
|
||||
return [
|
||||
{ label: t('nav.matches'), to: '/matches' },
|
||||
{ label: t('breadcrumb.match_edit') },
|
||||
];
|
||||
}
|
||||
if (/^\/matches\/[^/]+\/markets/.test(path)) {
|
||||
return [
|
||||
{ label: t('nav.matches'), to: '/matches' },
|
||||
{ label: t('breadcrumb.match_markets') },
|
||||
];
|
||||
}
|
||||
if (path === '/matches/outrights') {
|
||||
return [
|
||||
{ label: t('nav.matches'), to: '/matches' },
|
||||
{ label: t('nav.matches.outrights') },
|
||||
];
|
||||
}
|
||||
if (/^\/outrights\/[^/]+\/edit/.test(path)) {
|
||||
return [
|
||||
{ label: t('nav.matches'), to: '/matches' },
|
||||
{ label: t('nav.matches.outrights'), to: '/matches/outrights' },
|
||||
];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
Reference in New Issue
Block a user