add first blood.
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { NButton } from "naive-ui"
|
import { NButton, NIcon, NSpace } from "naive-ui"
|
||||||
|
import { GoldMedal } from "@element-plus/icons-vue"
|
||||||
import Pagination from "~/shared/Pagination.vue"
|
import Pagination from "~/shared/Pagination.vue"
|
||||||
import AcAndSubmission from "../components/AcAndSubmission.vue"
|
import AcAndSubmission from "../components/AcAndSubmission.vue"
|
||||||
import { getContestProblems, getContestRank } from "oj/api"
|
import { getContestProblems, getContestRank } from "oj/api"
|
||||||
@@ -91,14 +92,16 @@ async function addColumns() {
|
|||||||
{
|
{
|
||||||
text: true,
|
text: true,
|
||||||
type: "primary",
|
type: "primary",
|
||||||
onClick: () =>
|
onClick: () => {
|
||||||
router.push({
|
const data = router.resolve({
|
||||||
name: "contest problem",
|
name: "contest problem",
|
||||||
params: {
|
params: {
|
||||||
contestID: route.params.contestID,
|
contestID: route.params.contestID,
|
||||||
problemID: problem._id,
|
problemID: problem._id,
|
||||||
},
|
},
|
||||||
}),
|
})
|
||||||
|
window.open(data.href, "_blank")
|
||||||
|
},
|
||||||
},
|
},
|
||||||
() => problem.title
|
() => problem.title
|
||||||
),
|
),
|
||||||
@@ -110,6 +113,16 @@ async function addColumns() {
|
|||||||
if (status.is_ac) {
|
if (status.is_ac) {
|
||||||
acTime = h("span", secondsToDuration(status.ac_time))
|
acTime = h("span", secondsToDuration(status.ac_time))
|
||||||
}
|
}
|
||||||
|
if (status.is_first_ac) {
|
||||||
|
acTime = [
|
||||||
|
h(
|
||||||
|
NIcon,
|
||||||
|
{ size: 16, style: "transform: translate(-2px, 3px)" },
|
||||||
|
() => h(GoldMedal)
|
||||||
|
),
|
||||||
|
secondsToDuration(status.ac_time),
|
||||||
|
]
|
||||||
|
}
|
||||||
if (status.error_number) {
|
if (status.error_number) {
|
||||||
errorNumber = h(
|
errorNumber = h(
|
||||||
"p",
|
"p",
|
||||||
|
|||||||
Reference in New Issue
Block a user