fix
This commit is contained in:
@@ -132,10 +132,7 @@
|
|||||||
size="small"
|
size="small"
|
||||||
:bordered="true"
|
:bordered="true"
|
||||||
style="border-color: #ffd0d0; background: #fff"
|
style="border-color: #ffd0d0; background: #fff"
|
||||||
>{{ u.username }}
|
>{{ displayName(u.username, u.classname) }}</n-tag
|
||||||
<span style="color: #bbb; margin-left: 4px">{{
|
|
||||||
u.classname
|
|
||||||
}}</span></n-tag
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
v-if="!stats.unsubmitted_users.length"
|
v-if="!stats.unsubmitted_users.length"
|
||||||
@@ -206,10 +203,7 @@
|
|||||||
size="small"
|
size="small"
|
||||||
:bordered="true"
|
:bordered="true"
|
||||||
style="border-color: #ffd0d0; background: #fff"
|
style="border-color: #ffd0d0; background: #fff"
|
||||||
>{{ u.username }}
|
>{{ displayName(u.username, u.classname) }}</n-tag
|
||||||
<span style="color: #bbb; margin-left: 4px">{{
|
|
||||||
u.classname
|
|
||||||
}}</span></n-tag
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
v-if="!stats.unrated_users.length"
|
v-if="!stats.unrated_users.length"
|
||||||
@@ -332,11 +326,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="flex: 1">
|
<div style="flex: 1">
|
||||||
<div style="font-weight: 500; font-size: 13px">
|
<div style="font-weight: 500; font-size: 13px">
|
||||||
{{ sub.username }}
|
{{ displayName(sub.username, sub.classname) }}
|
||||||
</div>
|
</div>
|
||||||
<div style="color: #aaa; font-size: 11px">
|
<div style="color: #aaa; font-size: 11px">
|
||||||
{{ sub.score.toFixed(1) }} 分 · {{ sub.rating_count }} 人打分
|
{{ sub.score.toFixed(1) }} 分 · {{ sub.rating_count }} 人打分
|
||||||
· {{ sub.classname }}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="color: #2080f0; font-size: 12px">查看 →</div>
|
<div style="color: #2080f0; font-size: 12px">查看 →</div>
|
||||||
@@ -425,6 +418,11 @@ async function load(classname?: string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function displayName(username: string, classname: string) {
|
||||||
|
const prefix = "web" + classname
|
||||||
|
return username.startsWith(prefix) ? username.slice(prefix.length) : username
|
||||||
|
}
|
||||||
|
|
||||||
function selectClass(c: string | null) {
|
function selectClass(c: string | null) {
|
||||||
selectedClass.value = c
|
selectedClass.value = c
|
||||||
load(c ?? undefined)
|
load(c ?? undefined)
|
||||||
|
|||||||
Reference in New Issue
Block a user