refactor icons
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import { parseTime } from "utils/functions"
|
||||
import { useContestStore } from "oj/store/contest"
|
||||
import ContestType from "~/shared/components/ContestType.vue"
|
||||
import Info from "~/shared/icons/Info.vue"
|
||||
import { Icon } from "@iconify/vue"
|
||||
|
||||
const contestStore = useContestStore()
|
||||
</script>
|
||||
@@ -16,7 +16,7 @@ const contestStore = useContestStore()
|
||||
<template #trigger>
|
||||
<n-button>
|
||||
<template #icon>
|
||||
<Info />
|
||||
<Icon icon="openmoji:compass"></Icon>
|
||||
</template>
|
||||
比赛信息
|
||||
</n-button>
|
||||
|
||||
@@ -4,7 +4,7 @@ import { isDesktop } from "~/shared/composables/breakpoints"
|
||||
import { useContestStore } from "../store/contest"
|
||||
import ContestInfo from "./components/ContestInfo.vue"
|
||||
import ContestMenu from "./components/ContestMenu.vue"
|
||||
import Lock from "~/shared/icons/Lock.vue"
|
||||
import { Icon } from "@iconify/vue"
|
||||
|
||||
const props = defineProps<{
|
||||
contestID: string
|
||||
@@ -33,10 +33,13 @@ const passwordFormVisible = computed(
|
||||
<n-space vertical size="large" v-if="contestStore.contest">
|
||||
<n-space align="center" justify="space-between">
|
||||
<n-space align="center">
|
||||
<Icon
|
||||
v-if="contestStore.isPrivate"
|
||||
icon="openmoji:locked"
|
||||
:width="30"
|
||||
:height="30"
|
||||
></Icon>
|
||||
<h2 class="contestTitle">{{ contestStore.contest.title }}</h2>
|
||||
<n-icon size="large" v-if="contestStore.isPrivate" class="lockIcon">
|
||||
<Lock />
|
||||
</n-icon>
|
||||
<n-tag
|
||||
size="small"
|
||||
:type="CONTEST_STATUS[contestStore.contestStatus]['type']"
|
||||
@@ -79,7 +82,4 @@ const passwordFormVisible = computed(
|
||||
font-weight: 500;
|
||||
margin: 0;
|
||||
}
|
||||
.lockIcon {
|
||||
transform: translateY(2px);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -7,7 +7,7 @@ import { ContestRank, ProblemFiltered } from "~/utils/types"
|
||||
import { secondsToDuration } from "utils/functions"
|
||||
import { ContestStatus } from "~/utils/constants"
|
||||
import { useContestStore } from "~/oj/store/contest"
|
||||
import Medal1 from "~/shared/icons/Medal1.vue"
|
||||
import { Icon } from "@iconify/vue"
|
||||
|
||||
interface Props {
|
||||
contestID: string
|
||||
@@ -132,22 +132,25 @@ async function addColumns() {
|
||||
}
|
||||
if (status.is_first_ac) {
|
||||
acTime = [
|
||||
h(
|
||||
NIcon,
|
||||
{ size: 16, style: "transform: translate(-2px, 2px)" },
|
||||
() => h(Medal1),
|
||||
),
|
||||
secondsToDuration(status.ac_time),
|
||||
h(Icon, {
|
||||
icon: "openmoji:1st-place-medal",
|
||||
height: 24,
|
||||
width: 24,
|
||||
}),
|
||||
h("span", secondsToDuration(status.ac_time)),
|
||||
]
|
||||
}
|
||||
if (status.error_number) {
|
||||
errorNumber = h(
|
||||
"p",
|
||||
"span",
|
||||
{ style: "margin: 0" },
|
||||
`(-${status.error_number})`,
|
||||
)
|
||||
}
|
||||
return h("div", [acTime, errorNumber])
|
||||
return h("div", { class: "oj-time-with-modal" }, [
|
||||
acTime,
|
||||
errorNumber,
|
||||
])
|
||||
}
|
||||
},
|
||||
cellProps: (row) => {
|
||||
@@ -218,5 +221,8 @@ onMounted(() => {
|
||||
/>
|
||||
</n-space>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
<style>
|
||||
.oj-time-with-modal {
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user