ramove rank
Some checks failed
Deploy / deploy (build, debian, 22) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822) (push) Has been cancelled

This commit is contained in:
2026-03-29 10:07:27 -06:00
parent 951e53c1dd
commit ecce21aaaf
6 changed files with 0 additions and 153 deletions

View File

@@ -279,72 +279,6 @@
</div>
</div>
<!-- 人气提交 Top 5 -->
<div style="margin-bottom: 12px">
<div
style="
font-weight: 600;
font-size: 13px;
margin-bottom: 8px;
color: #333;
"
>
人气提交 Top 5
<span style="font-size: 11px; color: #aaa; font-weight: 400"
>按打分人数</span
>
</div>
<div style="display: flex; flex-direction: column; gap: 5px">
<div
v-for="(sub, i) in stats.top_submissions"
:key="sub.submission_id"
:style="{
display: 'flex',
alignItems: 'center',
gap: '10px',
padding: '6px 10px',
background: rankBg(i),
borderRadius: '6px',
cursor: 'pointer',
}"
@click="viewSubmission(sub.submission_id)"
>
<div
:style="{
width: '20px',
height: '20px',
background: rankColor(i),
borderRadius: '50%',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
color: '#fff',
fontWeight: '700',
fontSize: '11px',
flexShrink: 0,
}"
>
{{ i + 1 }}
</div>
<div style="flex: 1">
<div style="font-weight: 500; font-size: 13px">
{{ displayName(sub.username, sub.classname) }}
</div>
<div style="color: #aaa; font-size: 11px">
{{ sub.score.toFixed(1) }} ·
{{ sub.rating_count }} 人打分
</div>
</div>
<div style="color: #2080f0; font-size: 12px">查看 </div>
</div>
<span
v-if="!stats.top_submissions.length"
style="color: #aaa; font-size: 12px"
>暂无打分记录</span
>
</div>
</div>
<!-- 标记统计 -->
<div>
<div
@@ -436,20 +370,6 @@ function viewSubmission(id: string) {
window.open(href, "_blank")
}
function rankColor(i: number) {
return (
(["#f0a020", "#909090", "#cd7f32", "#8899aa", "#7a8fa0"] as const)[i] ??
"#aaa"
)
}
function rankBg(i: number) {
return (
(["#fffbef", "#f8f8f8", "#fdf5ee", "#f2f5f8", "#eef2f5"] as const)[i] ??
"#f8f8f8"
)
}
function bucketPct(value: number) {
const total = stats.value?.submitted_count ?? 0
if (!total) return "0%"
@@ -467,7 +387,6 @@ const metrics = computed(() => {
color: "#2080f0",
},
{ label: "未打分", value: stats.value.unrated_count, color: "#d03050" },
{ label: "参与排名", value: stats.value.nominated_count, color: "#f0a020" },
]
})

View File

@@ -77,15 +77,6 @@ const menu = computed(() => [
width: 20,
}),
},
{
label: "排名榜",
key: "ranking",
icon: () =>
h(Icon, {
icon: "streamline-emojis:sunglasses",
width: 20,
}),
},
{
label: "退出账号",
key: "logout",
@@ -117,9 +108,6 @@ function clickMenu(name: string) {
query: { username: user.username },
})
break
case "ranking":
router.push({ name: "ranking" })
break
case "logout":
handleLogout()
break

View File

@@ -37,7 +37,6 @@ const emit = defineEmits<{
select: [id: string]
delete: [row: SubmissionOut, parentId: string]
"show-chain": [conversationId: string]
nominate: [row: SubmissionOut]
}>()
const isChallenge = computed(() => props.row.task_type === TASK_TYPE.Challenge)
@@ -77,30 +76,6 @@ const subColumns = computed((): DataTableColumn<SubmissionOut>[] => [
)
},
},
{
title: "排名",
key: "nominated",
width: 60,
render: (r: SubmissionOut) => {
if (r.username !== user.username) {
return r.nominated
? h("span", { style: { color: "#f0a020" } }, "🏅")
: null
}
return h(
NButton,
{
text: true,
title: r.nominated ? "已参与排名点击可重新提名" : "参与排名",
onClick: (e: Event) => {
e.stopPropagation()
emit("nominate", r)
},
},
() => (r.nominated ? "🏅" : ""),
)
},
},
...(isChallenge.value
? [
{