diff --git a/src/shared/assets/images/ranks/x+.png b/src/shared/assets/images/ranks/x+.png new file mode 100644 index 0000000..f23e262 Binary files /dev/null and b/src/shared/assets/images/ranks/x+.png differ diff --git a/src/shared/schemas/rank.ts b/src/shared/schemas/rank.ts index ae1c4a2..222a248 100644 --- a/src/shared/schemas/rank.ts +++ b/src/shared/schemas/rank.ts @@ -1,6 +1,7 @@ import { z } from 'zod' const ValidRank = z.union([ + z.literal('x+'), z.literal('x'), z.literal('u'), z.literal('ss'), @@ -26,4 +27,4 @@ type ValidRank = z.infer; type Rank = z.infer; export default Rank -export { Rank, ValidRank } +export { Rank, ValidRank } \ No newline at end of file diff --git a/src/v1/components/tests/tetrio_info.vue b/src/v1/components/tests/tetrio_info.vue index f2942fc..11c15f4 100644 --- a/src/v1/components/tests/tetrio_info.vue +++ b/src/v1/components/tests/tetrio_info.vue @@ -43,7 +43,7 @@ const test = () => { })() readonly tetra_league = new (class { - readonly rank = prompt('用户段位 (d, d+, c-, c, c+, b-, b, b+, a-, a, a+, s-, s, s+, ss, u, x)', 'u') + readonly rank = prompt('用户段位 (d, d+, c-, c, c+, b-, b, b+, a-, a, a+, s-, s, s+, ss, u, x)', 'x+') readonly tr = tr @@ -181,4 +181,4 @@ const test = () => { + \ No newline at end of file diff --git a/src/v1/pages/tetrio/info.vue b/src/v1/pages/tetrio/info.vue index d6f38c5..e7aa35c 100644 --- a/src/v1/pages/tetrio/info.vue +++ b/src/v1/pages/tetrio/info.vue @@ -76,6 +76,11 @@ const data = Data.parse(JSON.parse(document.querySelector(' inject(THEME_KEY, 'dark') const rankImage = asyncComputed(async () => { + if (data.tetra_league.rank === 'x+') { + return await import(`@/shared/assets/images/ranks/${data.tetra_league.rank}.png?url`).then((module) => { + return module.default + }) + } return await import(`@/shared/assets/images/ranks/${data.tetra_league.rank}.svg?url`).then((module) => { return module.default }) @@ -439,4 +444,4 @@ const radar_chart_data = [ } } } - + \ No newline at end of file diff --git a/src/v1/pages/tetrio/rank.vue b/src/v1/pages/tetrio/rank.vue index 50fd3b8..0bc2df2 100644 --- a/src/v1/pages/tetrio/rank.vue +++ b/src/v1/pages/tetrio/rank.vue @@ -30,6 +30,10 @@ const colorMappings: Record< readonly text: string; } > = { + 'x+': { + background: 'radial-gradient(95.42% 572.5% at 4.58% 17.5%, #D946EF 0%, #F5CFFE 100%)', + text: '#8E23B4CC' + }, x: { background: 'radial-gradient(95.42% 572.5% at 4.58% 17.5%, #D946EF 0%, #F5CFFE 100%)', text: '#8E23B4CC' @@ -211,4 +215,4 @@ const rankImageMap = asyncComputed(async () => { @apply flex flex-col justify-center items-center; } } - + \ No newline at end of file diff --git a/src/v2/types/tetrio.d.ts b/src/v2/types/tetrio.d.ts index 5b22b11..e62f3a8 100644 --- a/src/v2/types/tetrio.d.ts +++ b/src/v2/types/tetrio.d.ts @@ -48,6 +48,7 @@ export interface User { | 'ss' | 'u' | 'x' + | 'x+' | 'z'; readonly bestrank: Exclude;