refactor
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-31 07:41:35 -06:00
parent 91e1b2b48b
commit e539f9450a
10 changed files with 101 additions and 70 deletions

View File

@@ -6,14 +6,20 @@
v-for="item in challenges"
:key="item.display"
hoverable
class="challenge-card"
:class="['challenge-card', { submitted: item.submitted }]"
@click="select(item)"
>
<template #header>
{{ item.title }}
<n-flex align="center" :size="6">
<span v-if="item.submitted" class="check-icon"></span>
<span :class="{ 'submitted-title': item.submitted }">{{ item.title }}</span>
</n-flex>
</template>
<template #header-extra>
<n-tag type="warning" size="small">{{ item.score }}</n-tag>
<n-flex :size="6">
<n-tag type="warning" size="small">{{ item.score }} </n-tag>
<n-tag v-if="item.pass_score != null" size="small">及格 {{ item.pass_score }} </n-tag>
</n-flex>
</template>
</n-card>
</n-flex>
@@ -47,4 +53,19 @@ onMounted(async () => {
.challenge-card {
cursor: pointer;
}
.challenge-card.submitted {
background-color: #f6ffed;
border-color: #b7eb8f;
}
.check-icon {
color: #52c41a;
font-size: 14px;
font-weight: bold;
}
.submitted-title {
color: #888;
}
</style>