contest list.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { parseTime } from "utils/functions"
|
||||
import { useContestStore } from "oj/store/contest"
|
||||
import ContestTypeVue from "./ContestType.vue"
|
||||
import ContestTypeVue from "~/shared/ContestType.vue"
|
||||
|
||||
const contestStore = useContestStore()
|
||||
</script>
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { Contest } from "utils/types"
|
||||
import { ContestType } from "utils/constants"
|
||||
|
||||
defineProps<{ contest: Contest }>()
|
||||
</script>
|
||||
<template>
|
||||
<n-space>
|
||||
<span>{{ contest.title }}</span>
|
||||
<n-icon
|
||||
size="medium"
|
||||
class="lockIcon"
|
||||
v-if="contest.contest_type === ContestType.private"
|
||||
>
|
||||
<i-ep-lock />
|
||||
</n-icon>
|
||||
</n-space>
|
||||
</template>
|
||||
<style scoped>
|
||||
.lockIcon {
|
||||
transform: translateY(2px);
|
||||
}
|
||||
</style>
|
||||
@@ -1,20 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { Contest } from "~/utils/types"
|
||||
import { ContestType } from "~/utils/constants"
|
||||
|
||||
interface Props {
|
||||
contest: Contest
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
|
||||
const isPrivate = computed(
|
||||
() => props.contest.contest_type === ContestType.private
|
||||
)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-tag :type="isPrivate ? 'error' : 'info'">
|
||||
{{ isPrivate ? "需要密码" : "公开" }}
|
||||
</n-tag>
|
||||
</template>
|
||||
@@ -1,11 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import { DataTableColumn, NTag, SelectOption } from "naive-ui"
|
||||
import { getContestList } from "oj/api"
|
||||
import Pagination from "~/shared/Pagination.vue"
|
||||
import { filterEmptyValue, parseTime, duration } from "utils/functions"
|
||||
import { Contest } from "utils/types"
|
||||
import { ContestType, CONTEST_STATUS } from "~/utils/constants"
|
||||
import ContestTitle from "./components/ContestTitle.vue"
|
||||
import ContestTitle from "~/shared/ContestTitle.vue"
|
||||
import Pagination from "~/shared/Pagination.vue"
|
||||
import { useUserStore } from "~/shared/store/user"
|
||||
import { toggleLogin } from "~/shared/composables/modal"
|
||||
import { isDesktop } from "~/shared/composables/breakpoints"
|
||||
|
||||
Reference in New Issue
Block a user