fix(distribution-admin): 全面优化全站表格列宽、单号防折行、平台与状态中文化体验
This commit is contained in:
@@ -94,9 +94,31 @@ function formatGameName(name?: string) {
|
||||
) {
|
||||
return '三角洲'
|
||||
}
|
||||
if (lower.includes('honor') || name.includes('王者')) {
|
||||
return '王者荣耀'
|
||||
}
|
||||
if (lower.includes('genshin') || name.includes('原神')) {
|
||||
return '原神'
|
||||
}
|
||||
if (lower.includes('cs') || lower.includes('csgo')) {
|
||||
return 'CS2'
|
||||
}
|
||||
return name
|
||||
}
|
||||
|
||||
function formatLoginPlatform(platform?: string): string {
|
||||
if (!platform) return ''
|
||||
const lower = platform.toLowerCase().trim()
|
||||
if (lower === 'qq') return 'QQ'
|
||||
if (lower === 'wechat' || lower === 'wx') return '微信'
|
||||
if (lower === 'steam') return 'Steam'
|
||||
if (lower === 'epic') return 'Epic'
|
||||
if (lower === 'wegame') return 'WeGame'
|
||||
if (lower === 'mobile') return '手游端'
|
||||
if (lower === 'pc') return 'PC端'
|
||||
return platform
|
||||
}
|
||||
|
||||
export default function Accounts() {
|
||||
const member = useMember()
|
||||
const [sites, setSites] = useState<Site[]>([])
|
||||
@@ -734,11 +756,12 @@ export default function Accounts() {
|
||||
<Typography.Text
|
||||
copyable={{ text: v || String(row.listing_id), tooltips: ['复制商品编号', '已复制'] }}
|
||||
strong
|
||||
className="mono-code"
|
||||
style={{
|
||||
fontSize: 13,
|
||||
color: '#1677ff',
|
||||
fontFamily: 'monospace',
|
||||
whiteSpace: 'nowrap',
|
||||
wordBreak: 'keep-all',
|
||||
display: 'inline-flex',
|
||||
alignItems: 'center',
|
||||
}}
|
||||
@@ -801,7 +824,7 @@ export default function Accounts() {
|
||||
<Space size={4} style={{ marginTop: 4 }} wrap>
|
||||
<Tag color="blue">{formatGameName(row.game_name)}</Tag>
|
||||
{row.server_region && <Tag>{row.server_region}</Tag>}
|
||||
{row.login_platform && <Tag color="cyan">{row.login_platform}</Tag>}
|
||||
{row.login_platform && <Tag color="cyan">{formatLoginPlatform(row.login_platform)}</Tag>}
|
||||
</Space>
|
||||
</div>
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user