Add configurable agent max level and default sub-agent credit ratio, per-agent block direct player login on suspend, admin/agent wallet transaction views, and match detail my-bets section with refreshed player card styling. Co-authored-by: Cursor <cursoragent@cursor.com>
21 lines
466 B
TypeScript
21 lines
466 B
TypeScript
const ZH_LEVEL_NUMERALS: Record<number, string> = {
|
|
1: '一',
|
|
2: '二',
|
|
3: '三',
|
|
4: '四',
|
|
5: '五',
|
|
6: '六',
|
|
7: '七',
|
|
8: '八',
|
|
9: '九',
|
|
10: '十',
|
|
};
|
|
|
|
/** 中文界面用「一、二、三…」,其他语言用阿拉伯数字 */
|
|
export function formatAgentLevelNumeral(level: number, locale: string): string {
|
|
if (locale.startsWith('zh') && ZH_LEVEL_NUMERALS[level]) {
|
|
return ZH_LEVEL_NUMERALS[level];
|
|
}
|
|
return String(level);
|
|
}
|