Skip to content
This repository was archived by the owner on Dec 2, 2022. It is now read-only.

[add] 最新の解答の帯に色と"採点対象"の文字列を追加 #724

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion ui/components/problems/id/AnswerCard.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<template>
<expandable-card v-model="opened" color="white">
<expandable-card
v-model="opened"
v-bind:color="answer.isLatest ? 'orange' : 'white'"
>
<!-- カードの帯 -->
<template v-slot:button>
<v-row align="center">
Expand All @@ -15,6 +18,8 @@
</span>
</v-col>

<v-col v-if="answer.isLatest"> 採点対象 </v-col>

<v-col v-if="answer.showTimer(problem)">
<div>{{ answer.delayTickDuration }}</div>
</v-col>
Expand Down
6 changes: 5 additions & 1 deletion ui/components/problems/id/AnswerPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ export default {
},
computed: {
sortedAnswers() {
return this.sortByCreatedAt(this.answers).reverse()
const a = this.sortByCreatedAt(this.answers).reverse()
if (a.length > 0) {
a[0].isLatest = true
}
return a
},
},
}
Expand Down