remove element-plus icons.
This commit is contained in:
1826
package-lock.json
generated
1826
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
28
package.json
28
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "oj-next",
|
||||
"version": "1.0.0",
|
||||
"version": "1.1.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"start": "vite",
|
||||
@@ -11,11 +11,10 @@
|
||||
"dependencies": {
|
||||
"@codemirror/lang-cpp": "^6.0.2",
|
||||
"@codemirror/lang-python": "^6.1.3",
|
||||
"@element-plus/icons-vue": "^2.1.0",
|
||||
"@vueuse/core": "^10.5.0",
|
||||
"@vueuse/core": "^10.6.1",
|
||||
"@wangeditor/editor": "^5.1.23",
|
||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||
"axios": "1.5.1",
|
||||
"axios": "1.6.2",
|
||||
"chart.js": "^4.4.0",
|
||||
"codemirror": "^6.0.1",
|
||||
"copy-text-to-clipboard": "^3.2.0",
|
||||
@@ -24,26 +23,25 @@
|
||||
"naive-ui": "^2.35.0",
|
||||
"normalize.css": "^8.0.1",
|
||||
"party-js": "^2.2.0",
|
||||
"pinia": "^2.1.6",
|
||||
"vue": "^3.3.4",
|
||||
"pinia": "^2.1.7",
|
||||
"vue": "^3.3.8",
|
||||
"vue-chartjs": "^5.2.0",
|
||||
"vue-codemirror": "^6.1.1",
|
||||
"vue-router": "^4.2.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify-json/ep": "^1.1.12",
|
||||
"@types/node": "^20.8.4",
|
||||
"@types/node": "^20.9.3",
|
||||
"@vitejs/plugin-legacy": "^4.1.1",
|
||||
"@vitejs/plugin-vue": "^4.4.0",
|
||||
"@vitejs/plugin-vue": "^4.5.0",
|
||||
"markdown-it-shiki": "^0.9.0",
|
||||
"prettier": "^3.0.3",
|
||||
"terser": "^5.21.0",
|
||||
"typescript": "^5.2.2",
|
||||
"unplugin-auto-import": "^0.16.6",
|
||||
"unplugin-icons": "^0.17.0",
|
||||
"prettier": "^3.1.0",
|
||||
"terser": "^5.24.0",
|
||||
"typescript": "^5.3.2",
|
||||
"unplugin-auto-import": "^0.16.7",
|
||||
"unplugin-vue-components": "^0.25.2",
|
||||
"vite": "^4.4.11",
|
||||
"unplugin-vue-markdown": "^0.24.3",
|
||||
"vite": "^4.5.0",
|
||||
"unplugin-vue-markdown": "^0.25.2",
|
||||
"vue-tsc": "^1.8.22"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +62,9 @@ async function getContestDetail() {
|
||||
}
|
||||
|
||||
async function submit() {
|
||||
if (contest.description === '<p><br></p>') {
|
||||
contest.description = ""
|
||||
}
|
||||
const api = {
|
||||
"admin contest create": createContest,
|
||||
"admin contest edit": editContest,
|
||||
|
||||
3
src/auto-imports.d.ts
vendored
3
src/auto-imports.d.ts
vendored
@@ -143,6 +143,7 @@ declare global {
|
||||
const useBrowserLocation: typeof import('@vueuse/core')['useBrowserLocation']
|
||||
const useCached: typeof import('@vueuse/core')['useCached']
|
||||
const useClipboard: typeof import('@vueuse/core')['useClipboard']
|
||||
const useClipboardItems: typeof import('@vueuse/core')['useClipboardItems']
|
||||
const useCloned: typeof import('@vueuse/core')['useCloned']
|
||||
const useColorMode: typeof import('@vueuse/core')['useColorMode']
|
||||
const useConfirmDialog: typeof import('@vueuse/core')['useConfirmDialog']
|
||||
@@ -302,7 +303,7 @@ declare global {
|
||||
// for type re-export
|
||||
declare global {
|
||||
// @ts-ignore
|
||||
export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
|
||||
export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
|
||||
// @ts-ignore
|
||||
export type { DataTableColumn, FormRules, FormItemRule, SelectOption, UploadCustomRequestOptions, UploadFileInfo, MenuOption, DropdownDividerOption, DropdownOption } from 'naive-ui'
|
||||
}
|
||||
|
||||
12
src/components.d.ts
vendored
12
src/components.d.ts
vendored
@@ -7,18 +7,6 @@ export {}
|
||||
|
||||
declare module 'vue' {
|
||||
export interface GlobalComponents {
|
||||
IEpArrowDown: typeof import('~icons/ep/arrow-down')['default']
|
||||
IEpArrowRightBold: typeof import('~icons/ep/arrow-right-bold')['default']
|
||||
IEpArrowUp: typeof import('~icons/ep/arrow-up')['default']
|
||||
IEpBell: typeof import('~icons/ep/bell')['default']
|
||||
IEpCaretRight: typeof import('~icons/ep/caret-right')['default']
|
||||
IEpLoading: typeof import('~icons/ep/loading')['default']
|
||||
IEpLock: typeof import('~icons/ep/lock')['default']
|
||||
IEpMedal: typeof import('~icons/ep/medal')['default']
|
||||
IEpMoon: typeof import('~icons/ep/moon')['default']
|
||||
IEpMoreFilled: typeof import('~icons/ep/more-filled')['default']
|
||||
IEpSunny: typeof import('~icons/ep/sunny')['default']
|
||||
IEpWarning: typeof import('~icons/ep/warning')['default']
|
||||
NAlert: typeof import('naive-ui')['NAlert']
|
||||
NAvatar: typeof import('naive-ui')['NAvatar']
|
||||
NButton: typeof import('naive-ui')['NButton']
|
||||
|
||||
@@ -2,6 +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"
|
||||
|
||||
const contestStore = useContestStore()
|
||||
</script>
|
||||
@@ -16,7 +17,7 @@ const contestStore = useContestStore()
|
||||
<template #trigger>
|
||||
<n-button>
|
||||
<template #icon>
|
||||
<i-ep-warning />
|
||||
<Info />
|
||||
</template>
|
||||
比赛信息
|
||||
</n-button>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { NButton, NIcon } from "naive-ui"
|
||||
import { GoldMedal } from "@element-plus/icons-vue"
|
||||
import Pagination from "~/shared/components/Pagination.vue"
|
||||
import AcAndSubmission from "../components/AcAndSubmission.vue"
|
||||
import { getContestProblems, getContestRank } from "oj/api"
|
||||
@@ -8,6 +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"
|
||||
|
||||
interface Props {
|
||||
contestID: string
|
||||
@@ -133,8 +133,8 @@ async function addColumns() {
|
||||
acTime = [
|
||||
h(
|
||||
NIcon,
|
||||
{ size: 16, style: "transform: translate(-2px, 3px)" },
|
||||
() => h(GoldMedal),
|
||||
{ size: 16, style: "transform: translate(-2px, 2px)" },
|
||||
() => h(Medal1),
|
||||
),
|
||||
secondsToDuration(status.ac_time),
|
||||
]
|
||||
|
||||
@@ -9,6 +9,7 @@ import TestCat from "./TestCat2.vue"
|
||||
import storage from "~/utils/storage"
|
||||
import { STORAGE_KEY } from "utils/constants"
|
||||
import { LANGUAGE } from "~/utils/types"
|
||||
import More from "~/shared/icons/More.vue"
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
@@ -81,7 +82,7 @@ function changeLanguage(v: LANGUAGE) {
|
||||
<n-button :size="isDesktop ? 'medium' : 'small'">
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
<i-ep-more-filled />
|
||||
<More />
|
||||
</n-icon>
|
||||
</template>
|
||||
</n-button>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { Select, SemiSelect } from "@element-plus/icons-vue"
|
||||
import { useThemeVars } from "naive-ui"
|
||||
import Select from "~/shared/icons/Select.vue"
|
||||
import SemiSelect from "~/shared/icons/SemiSelect.vue"
|
||||
|
||||
const theme = useThemeVars()
|
||||
const props = defineProps<{
|
||||
|
||||
@@ -9,6 +9,9 @@ import { Submission, SubmitCodePayload } from "utils/types"
|
||||
import { getSubmission, submitCode } from "oj/api"
|
||||
import SubmissionResultTag from "~/shared/components/SubmissionResultTag.vue"
|
||||
import { useUserStore } from "~/shared/store/user"
|
||||
import Loading from "~/shared/icons/Loading.vue"
|
||||
import Bulb from "~/shared/icons/Bulb.vue"
|
||||
import Play from "~/shared/icons/Play.vue"
|
||||
|
||||
const userStore = useUserStore()
|
||||
const route = useRoute()
|
||||
@@ -211,9 +214,9 @@ watch(
|
||||
>
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
<i-ep-loading v-if="judging || pending || submitting" />
|
||||
<i-ep-bell v-else-if="isPending" />
|
||||
<i-ep-caret-right v-else />
|
||||
<Loading v-if="judging || pending || submitting" />
|
||||
<Bulb v-else-if="isPending" />
|
||||
<Play v-else />
|
||||
</n-icon>
|
||||
</template>
|
||||
{{ submitLabel }}
|
||||
|
||||
@@ -8,6 +8,8 @@ import { useUserStore } from "~/shared/store/user"
|
||||
import { getProblemTagList } from "~/shared/api"
|
||||
import Pagination from "~/shared/components/Pagination.vue"
|
||||
import { isDesktop } from "~/shared/composables/breakpoints"
|
||||
import ArrowUp from "~/shared/icons/ArrowUp.vue"
|
||||
import ArrowDown from "~/shared/icons/ArrowDown.vue"
|
||||
|
||||
interface Tag {
|
||||
id: number
|
||||
@@ -212,8 +214,8 @@ function rowProps(row: ProblemFiltered) {
|
||||
<n-button @click="toggleShowTag()" quaternary icon-placement="right">
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
<i-ep-arrow-down v-if="showTag" />
|
||||
<i-ep-arrow-up v-else />
|
||||
<ArrowDown v-if="showTag" />
|
||||
<ArrowUp v-else />
|
||||
</n-icon>
|
||||
</template>
|
||||
标签
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
<script lang="ts" setup>
|
||||
import Medal1 from "~/shared/icons/Medal1.vue"
|
||||
import Medal2 from "~/shared/icons/Medal2.vue"
|
||||
import Medal3 from "~/shared/icons/Medal3.vue"
|
||||
|
||||
interface Props {
|
||||
page: number
|
||||
limit: number
|
||||
@@ -7,12 +11,6 @@ interface Props {
|
||||
|
||||
const props = defineProps<Props>()
|
||||
const index = computed(() => props.index + (props.page - 1) * props.limit + 1)
|
||||
const color = computed(() => {
|
||||
if (index.value === 1) return "#FFD700"
|
||||
if (index.value === 2) return "#C0C0C0"
|
||||
if (index.value === 3) return "rgb(191,173,111)"
|
||||
return ""
|
||||
})
|
||||
const tooltip = computed(() => {
|
||||
if (index.value === 1) return "🏅 金牌"
|
||||
if (index.value === 2) return "🥈 银牌"
|
||||
@@ -24,15 +22,12 @@ const tooltip = computed(() => {
|
||||
<span v-if="index > 3">{{ index }}</span>
|
||||
<n-tooltip v-else>
|
||||
<template #trigger>
|
||||
<n-icon class="icon" size="20">
|
||||
<i-ep-medal :color="color" />
|
||||
<n-icon :size="20">
|
||||
<Medal1 v-if="index === 1" />
|
||||
<Medal2 v-if="index === 2" />
|
||||
<Medal3 v-if="index === 3" />
|
||||
</n-icon>
|
||||
</template>
|
||||
{{ tooltip }}
|
||||
</n-tooltip>
|
||||
</template>
|
||||
<style scoped>
|
||||
.icon {
|
||||
transform: translateY(4px);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { Contest } from "utils/types"
|
||||
import { ContestType } from "utils/constants"
|
||||
import Lock from "~/shared/icons/Lock.vue"
|
||||
|
||||
defineProps<{ contest: Contest }>()
|
||||
</script>
|
||||
@@ -8,11 +9,11 @@ defineProps<{ contest: Contest }>()
|
||||
<n-space>
|
||||
<span>{{ contest.title }}</span>
|
||||
<n-icon
|
||||
size="medium"
|
||||
size="large"
|
||||
class="lockIcon"
|
||||
v-if="contest.contest_type === ContestType.private"
|
||||
>
|
||||
<i-ep-lock />
|
||||
<Lock />
|
||||
</n-icon>
|
||||
</n-space>
|
||||
</template>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { DocumentCopy, Select } from "@element-plus/icons-vue"
|
||||
import copy from "copy-text-to-clipboard"
|
||||
import Select from "~/shared/icons/Select.vue"
|
||||
import Copy from "~/shared/icons/Copy.vue"
|
||||
|
||||
defineProps<{ value: string }>()
|
||||
const [copied, toggle] = useToggle()
|
||||
@@ -16,7 +17,7 @@ function handleClick(value: string) {
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-icon class="icon" @click="handleClick(value)">
|
||||
<component :is="copied ? Select : DocumentCopy"></component>
|
||||
<component :is="copied ? Select : Copy"></component>
|
||||
</n-icon>
|
||||
</template>
|
||||
{{ copied ? "已复制" : "复制" }}
|
||||
|
||||
@@ -12,6 +12,9 @@ import {
|
||||
} from "~/shared/composables/switchScreen"
|
||||
import { code } from "~/shared/composables/learn"
|
||||
import { useLearnStore } from "~/learn/store"
|
||||
import Play from "../icons/Play.vue"
|
||||
import Sunny from "../icons/Sunny.vue"
|
||||
import Moon from "../icons/Moon.vue"
|
||||
|
||||
const userStore = useUserStore()
|
||||
const configStore = useConfigStore()
|
||||
@@ -130,7 +133,7 @@ function switchScreen() {}
|
||||
</n-button>
|
||||
<n-button v-else circle @click="run">
|
||||
<n-icon>
|
||||
<i-ep-arrow-right-bold />
|
||||
<Play />
|
||||
</n-icon>
|
||||
</n-button>
|
||||
</div>
|
||||
@@ -166,8 +169,8 @@ function switchScreen() {}
|
||||
</div>
|
||||
<n-button circle @click="toggleDark()">
|
||||
<template #icon>
|
||||
<n-icon v-if="isDark"><i-ep-sunny /></n-icon>
|
||||
<n-icon v-else> <i-ep-moon /></n-icon>
|
||||
<n-icon v-if="isDark"><Sunny /></n-icon>
|
||||
<n-icon v-else> <Moon /></n-icon>
|
||||
</template>
|
||||
</n-button>
|
||||
</n-space>
|
||||
|
||||
13
src/shared/icons/ArrowDown.vue
Normal file
13
src/shared/icons/ArrowDown.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="1em"
|
||||
height="1em"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6l-6-6l1.41-1.41z"
|
||||
></path>
|
||||
</svg>
|
||||
</template>
|
||||
13
src/shared/icons/ArrowUp.vue
Normal file
13
src/shared/icons/ArrowUp.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="1em"
|
||||
height="1em"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6z"
|
||||
></path>
|
||||
</svg>
|
||||
</template>
|
||||
13
src/shared/icons/Bulb.vue
Normal file
13
src/shared/icons/Bulb.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="1em"
|
||||
height="1em"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M12 22q-.825 0-1.413-.588T10 20h4q0 .825-.588 1.413T12 22Zm-4-3v-2h8v2H8Zm.25-3q-1.725-1.025-2.738-2.75T4.5 9.5q0-3.125 2.188-5.313T12 2q3.125 0 5.313 2.188T19.5 9.5q0 2.025-1.012 3.75T15.75 16h-7.5Zm.6-2h6.3q1.125-.8 1.738-1.975T17.5 9.5q0-2.3-1.6-3.9T12 4Q9.7 4 8.1 5.6T6.5 9.5q0 1.35.613 2.525T8.85 14ZM12 14Z"
|
||||
></path>
|
||||
</svg>
|
||||
</template>
|
||||
13
src/shared/icons/Copy.vue
Normal file
13
src/shared/icons/Copy.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="1em"
|
||||
height="1em"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M9 18q-.825 0-1.413-.588T7 16V4q0-.825.588-1.413T9 2h9q.825 0 1.413.588T20 4v12q0 .825-.588 1.413T18 18H9Zm0-2h9V4H9v12Zm-4 6q-.825 0-1.413-.588T3 20V6h2v14h11v2H5Zm4-6V4v12Z"
|
||||
></path>
|
||||
</svg>
|
||||
</template>
|
||||
13
src/shared/icons/Info.vue
Normal file
13
src/shared/icons/Info.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="1em"
|
||||
height="1em"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M11 17h2v-6h-2v6Zm1-8q.425 0 .713-.288T13 8q0-.425-.288-.713T12 7q-.425 0-.713.288T11 8q0 .425.288.713T12 9Zm0 13q-2.075 0-3.9-.788t-3.175-2.137q-1.35-1.35-2.137-3.175T2 12q0-2.075.788-3.9t2.137-3.175q1.35-1.35 3.175-2.137T12 2q2.075 0 3.9.788t3.175 2.137q1.35 1.35 2.138 3.175T22 12q0 2.075-.788 3.9t-2.137 3.175q-1.35 1.35-3.175 2.138T12 22Zm0-2q3.35 0 5.675-2.325T20 12q0-3.35-2.325-5.675T12 4Q8.65 4 6.325 6.325T4 12q0 3.35 2.325 5.675T12 20Zm0-8Z"
|
||||
></path>
|
||||
</svg>
|
||||
</template>
|
||||
139
src/shared/icons/Loading.vue
Normal file
139
src/shared/icons/Loading.vue
Normal file
@@ -0,0 +1,139 @@
|
||||
<template>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="1em"
|
||||
height="1em"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<circle cx="12" cy="2" r="0" fill="currentColor">
|
||||
<animate
|
||||
attributeName="r"
|
||||
begin="0"
|
||||
calcMode="spline"
|
||||
dur="1s"
|
||||
keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8"
|
||||
repeatCount="indefinite"
|
||||
values="0;2;0;0"
|
||||
></animate>
|
||||
</circle>
|
||||
<circle
|
||||
cx="12"
|
||||
cy="2"
|
||||
r="0"
|
||||
fill="currentColor"
|
||||
transform="rotate(45 12 12)"
|
||||
>
|
||||
<animate
|
||||
attributeName="r"
|
||||
begin="0.125s"
|
||||
calcMode="spline"
|
||||
dur="1s"
|
||||
keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8"
|
||||
repeatCount="indefinite"
|
||||
values="0;2;0;0"
|
||||
></animate>
|
||||
</circle>
|
||||
<circle
|
||||
cx="12"
|
||||
cy="2"
|
||||
r="0"
|
||||
fill="currentColor"
|
||||
transform="rotate(90 12 12)"
|
||||
>
|
||||
<animate
|
||||
attributeName="r"
|
||||
begin="0.25s"
|
||||
calcMode="spline"
|
||||
dur="1s"
|
||||
keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8"
|
||||
repeatCount="indefinite"
|
||||
values="0;2;0;0"
|
||||
></animate>
|
||||
</circle>
|
||||
<circle
|
||||
cx="12"
|
||||
cy="2"
|
||||
r="0"
|
||||
fill="currentColor"
|
||||
transform="rotate(135 12 12)"
|
||||
>
|
||||
<animate
|
||||
attributeName="r"
|
||||
begin="0.375s"
|
||||
calcMode="spline"
|
||||
dur="1s"
|
||||
keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8"
|
||||
repeatCount="indefinite"
|
||||
values="0;2;0;0"
|
||||
></animate>
|
||||
</circle>
|
||||
<circle
|
||||
cx="12"
|
||||
cy="2"
|
||||
r="0"
|
||||
fill="currentColor"
|
||||
transform="rotate(180 12 12)"
|
||||
>
|
||||
<animate
|
||||
attributeName="r"
|
||||
begin="0.5s"
|
||||
calcMode="spline"
|
||||
dur="1s"
|
||||
keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8"
|
||||
repeatCount="indefinite"
|
||||
values="0;2;0;0"
|
||||
></animate>
|
||||
</circle>
|
||||
<circle
|
||||
cx="12"
|
||||
cy="2"
|
||||
r="0"
|
||||
fill="currentColor"
|
||||
transform="rotate(225 12 12)"
|
||||
>
|
||||
<animate
|
||||
attributeName="r"
|
||||
begin="0.625s"
|
||||
calcMode="spline"
|
||||
dur="1s"
|
||||
keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8"
|
||||
repeatCount="indefinite"
|
||||
values="0;2;0;0"
|
||||
></animate>
|
||||
</circle>
|
||||
<circle
|
||||
cx="12"
|
||||
cy="2"
|
||||
r="0"
|
||||
fill="currentColor"
|
||||
transform="rotate(270 12 12)"
|
||||
>
|
||||
<animate
|
||||
attributeName="r"
|
||||
begin="0.75s"
|
||||
calcMode="spline"
|
||||
dur="1s"
|
||||
keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8"
|
||||
repeatCount="indefinite"
|
||||
values="0;2;0;0"
|
||||
></animate>
|
||||
</circle>
|
||||
<circle
|
||||
cx="12"
|
||||
cy="2"
|
||||
r="0"
|
||||
fill="currentColor"
|
||||
transform="rotate(315 12 12)"
|
||||
>
|
||||
<animate
|
||||
attributeName="r"
|
||||
begin="0.875s"
|
||||
calcMode="spline"
|
||||
dur="1s"
|
||||
keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8"
|
||||
repeatCount="indefinite"
|
||||
values="0;2;0;0"
|
||||
></animate>
|
||||
</circle>
|
||||
</svg>
|
||||
</template>
|
||||
@@ -1,10 +1,13 @@
|
||||
|
||||
<template>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="M6 22q-.825 0-1.413-.588T4 20V10q0-.825.588-1.413T6 8h1V6q0-2.075 1.463-3.538T12 1q2.075 0 3.538 1.463T17 6v2h1q.825 0 1.413.588T20 10v10q0 .825-.588 1.413T18 22H6Zm0-2h12V10H6v10Zm6-3q.825 0 1.413-.588T14 15q0-.825-.588-1.413T12 13q-.825 0-1.413.588T10 15q0 .825.588 1.413T12 17ZM9 8h6V6q0-1.25-.875-2.125T12 3q-1.25 0-2.125.875T9 6v2ZM6 20V10v10Z"></path></svg>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="1em"
|
||||
height="1em"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M6 22q-.825 0-1.413-.588T4 20V10q0-.825.588-1.413T6 8h1V6q0-2.075 1.463-3.538T12 1q2.075 0 3.538 1.463T17 6v2h1q.825 0 1.413.588T20 10v10q0 .825-.588 1.413T18 22H6Zm0-2h12V10H6v10Zm6-3q.825 0 1.413-.588T14 15q0-.825-.588-1.413T12 13q-.825 0-1.413.588T10 15q0 .825.588 1.413T12 17ZM9 8h6V6q0-1.25-.875-2.125T12 3q-1.25 0-2.125.875T9 6v2ZM6 20V10v10Z"
|
||||
></path>
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: 'MaterialSymbolsLockOutline'
|
||||
}
|
||||
</script>
|
||||
19
src/shared/icons/Medal1.vue
Normal file
19
src/shared/icons/Medal1.vue
Normal file
@@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="1em"
|
||||
height="1em"
|
||||
viewBox="0 0 36 36"
|
||||
>
|
||||
<path fill="#55ACEE" d="m18 8l-7-8H0l14 17l11.521-4.75z"></path>
|
||||
<path fill="#3B88C3" d="m25 0l-7 8l5.39 7.312l1.227-1.489L36 0z"></path>
|
||||
<path
|
||||
fill="#FFAC33"
|
||||
d="M23.205 16.026c.08-.217.131-.448.131-.693a2 2 0 0 0-2-2h-6.667a2 2 0 0 0-2 2c0 .245.05.476.131.693c-3.258 1.826-5.464 5.307-5.464 9.307C7.335 31.224 12.111 36 18.002 36s10.667-4.776 10.667-10.667c0-4-2.206-7.481-5.464-9.307z"
|
||||
></path>
|
||||
<path
|
||||
fill="#9E5200"
|
||||
d="M19.404 18.6h-1.721l-2.73 2.132a.528.528 0 0 0-.112.28v1.178c0 .186.15.354.337.354h1.795v8.414c0 .188.15.355.355.355h2.076c.186 0 .336-.168.336-.355V18.954c0-.186-.149-.354-.336-.354z"
|
||||
></path>
|
||||
</svg>
|
||||
</template>
|
||||
19
src/shared/icons/Medal2.vue
Normal file
19
src/shared/icons/Medal2.vue
Normal file
@@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="1em"
|
||||
height="1em"
|
||||
viewBox="0 0 36 36"
|
||||
>
|
||||
<path fill="#55ACEE" d="m18 8l-7-8H0l14 17l11.521-4.75z"></path>
|
||||
<path fill="#3B88C3" d="m25 0l-7 8l5.39 7.312l1.227-1.489L36 0z"></path>
|
||||
<path
|
||||
fill="#CCD6DD"
|
||||
d="M23.205 16.026c.08-.217.131-.448.131-.693a2 2 0 0 0-2-2h-6.667a2 2 0 0 0-2 2c0 .245.05.476.131.693c-3.258 1.826-5.464 5.307-5.464 9.307C7.335 31.224 12.111 36 18.002 36s10.667-4.776 10.667-10.667c0-4-2.206-7.481-5.464-9.307z"
|
||||
></path>
|
||||
<path
|
||||
fill="#627077"
|
||||
d="M22.002 28.921h-3.543c.878-1.234 2.412-3.234 3.01-4.301c.449-.879.729-1.439.729-2.43c0-2.076-1.57-3.777-4.244-3.777c-2.225 0-3.74 1.832-3.74 1.832c-.131.15-.112.374.019.487l1.141 1.159a.36.36 0 0 0 .523 0c.355-.393 1.047-.935 1.813-.935c1.047 0 1.646.635 1.646 1.346c0 .523-.243 1.047-.486 1.421c-1.104 1.682-3.871 5.441-4.955 6.862v.374c0 .188.149.355.355.355h7.732a.368.368 0 0 0 .355-.355v-1.682a.367.367 0 0 0-.355-.356z"
|
||||
></path>
|
||||
</svg>
|
||||
</template>
|
||||
37
src/shared/icons/Medal3.vue
Normal file
37
src/shared/icons/Medal3.vue
Normal file
@@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="1em"
|
||||
height="1em"
|
||||
viewBox="0 0 128 128"
|
||||
>
|
||||
<defs><path id="notoV13rdPlaceMedal0" d="M0 0h128v128H0z"></path></defs>
|
||||
<clipPath id="notoV13rdPlaceMedal1">
|
||||
<use href="#notoV13rdPlaceMedal0"></use>
|
||||
</clipPath>
|
||||
<g clipPath="url(#notoV13rdPlaceMedal1)">
|
||||
<path fill="#006ca2" d="M50.14 61.85h25.59L107.72 0H82.13z"></path>
|
||||
<path
|
||||
fill="#2f2f2f"
|
||||
d="M66.13 30.92L53.34 55.67l3.2 6.18h19.19l3.2-6.18z"
|
||||
></path>
|
||||
<path
|
||||
fill="#f79329"
|
||||
d="M77.77 76.78H52.18V61.85h25.59v14.93zm0-21.33H52.18a6.4 6.4 0 0 0-6.4 6.4v14.93c0 3.54 2.86 6.4 6.4 6.4h25.59c3.54 0 6.4-2.86 6.4-6.4V61.85c0-3.54-2.86-6.4-6.4-6.4"
|
||||
></path>
|
||||
<path
|
||||
fill="#f79329"
|
||||
d="M96.97 95.97c0 17.67-14.32 31.99-31.99 31.99c-17.67 0-31.99-14.32-31.99-31.99c0-17.67 14.32-31.99 31.99-31.99c17.67 0 31.99 14.33 31.99 31.99"
|
||||
></path>
|
||||
<path
|
||||
fill="#fff"
|
||||
d="M43.53 88.19c-.42 0-.84-.08-1.24-.26c-1.54-.66-2.28-2.45-1.68-4.01c.01-.03.02-.05.03-.07c.01-.05.01-.04.04-.08A22.803 22.803 0 0 1 56.56 70.4c.35-.08.72.09.88.42c.16.33.07.73-.22.96c-4.67 3.71-8.4 8.72-10.79 14.47c0 .01-.01.02-.01.02c0 .01 0 .01-.01.02c-.33.77-.94 1.37-1.72 1.67c-.37.16-.77.23-1.16.23"
|
||||
></path>
|
||||
<path fill="#006ca2" d="M77.86 61.85H52.27L20.28 0h25.59z"></path>
|
||||
<path
|
||||
fill="#ae3d09"
|
||||
d="M64.7 111.85h.16c1.81-.03 5.24-.43 7.86-2.78c2.18-1.96 3.19-4.64 2.78-7.36c-.39-2.53-1.98-4.68-4.41-6.01c2.33-1.75 3.73-3.94 3.97-6.22c.24-2.21-.63-4.41-2.5-6.37c-1.88-1.97-4.42-3.01-7.33-3.01c-4.49 0-8.62 2.37-9.87 4.09c-.11.14-.11.34-.01.5l2.79 4.03c.07.1.17.17.29.18c.11.02.24-.01.33-.09c.03-.02 3.06-2.51 5.65-2.51c1.18 0 2.05.52 2.67 1.58c.51.89.61 1.7.3 2.48c-.85 2.1-4.45 3.17-4.48 3.18c-.18.05-.31.22-.31.41v3.55c0 .2.13.37.33.41c.04.01 3.46.86 4.24 2.82c.31.77.15 1.64-.46 2.59c-.65 1-1.63 1.51-2.92 1.51c-2.5 0-5.56-1.9-6.9-3.09a.443.443 0 0 0-.33-.11c-.13.01-.23.08-.3.18l-2.79 4.03c-.11.16-.1.37.03.52c.17.23 4.73 5.49 11.21 5.49"
|
||||
></path>
|
||||
</g>
|
||||
</svg>
|
||||
</template>
|
||||
13
src/shared/icons/Moon.vue
Normal file
13
src/shared/icons/Moon.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="1em"
|
||||
height="1em"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M12 21q-3.775 0-6.388-2.613T3 12q0-3.45 2.25-5.988T11 3.05q.325-.05.575.088t.4.362q.15.225.163.525t-.188.575q-.425.65-.638 1.375T11.1 7.5q0 2.25 1.575 3.825T16.5 12.9q.775 0 1.538-.225t1.362-.625q.275-.175.563-.162t.512.137q.25.125.388.375t.087.6q-.35 3.45-2.938 5.725T12 21Zm0-2q2.2 0 3.95-1.213t2.55-3.162q-.5.125-1 .2t-1 .075q-3.075 0-5.238-2.163T9.1 7.5q0-.5.075-1t.2-1q-1.95.8-3.163 2.55T5 12q0 2.9 2.05 4.95T12 19Zm-.25-6.75Z"
|
||||
></path>
|
||||
</svg>
|
||||
</template>
|
||||
13
src/shared/icons/More.vue
Normal file
13
src/shared/icons/More.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="1em"
|
||||
height="1em"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M6 14q-.825 0-1.413-.588T4 12q0-.825.588-1.413T6 10q.825 0 1.413.588T8 12q0 .825-.588 1.413T6 14Zm6 0q-.825 0-1.413-.588T10 12q0-.825.588-1.413T12 10q.825 0 1.413.588T14 12q0 .825-.588 1.413T12 14Zm6 0q-.825 0-1.413-.588T16 12q0-.825.588-1.413T18 10q.825 0 1.413.588T20 12q0 .825-.588 1.413T18 14Z"
|
||||
></path>
|
||||
</svg>
|
||||
</template>
|
||||
10
src/shared/icons/Play.vue
Normal file
10
src/shared/icons/Play.vue
Normal file
@@ -0,0 +1,10 @@
|
||||
<template>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="1em"
|
||||
height="1em"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path fill="currentColor" d="M8 19V5l11 7l-11 7Z"></path>
|
||||
</svg>
|
||||
</template>
|
||||
13
src/shared/icons/Select.vue
Normal file
13
src/shared/icons/Select.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="1em"
|
||||
height="1em"
|
||||
viewBox="0 0 1024 1024"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M77.248 415.04a64 64 0 0 1 90.496 0l226.304 226.304L846.528 188.8a64 64 0 1 1 90.56 90.496l-543.04 543.04l-316.8-316.8a64 64 0 0 1 0-90.496z"
|
||||
></path>
|
||||
</svg>
|
||||
</template>
|
||||
13
src/shared/icons/SemiSelect.vue
Normal file
13
src/shared/icons/SemiSelect.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="1em"
|
||||
height="1em"
|
||||
viewBox="0 0 1024 1024"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M128 448h768q64 0 64 64t-64 64H128q-64 0-64-64t64-64z"
|
||||
></path>
|
||||
</svg>
|
||||
</template>
|
||||
13
src/shared/icons/Sunny.vue
Normal file
13
src/shared/icons/Sunny.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="1em"
|
||||
height="1em"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M12 5q-.425 0-.713-.288T11 4V2q0-.425.288-.713T12 1q.425 0 .713.288T13 2v2q0 .425-.288.713T12 5Zm4.95 2.05q-.275-.275-.275-.687t.275-.713l1.4-1.425q.3-.3.712-.3t.713.3q.275.275.275.7t-.275.7L18.35 7.05q-.275.275-.7.275t-.7-.275ZM20 13q-.425 0-.713-.288T19 12q0-.425.288-.713T20 11h2q.425 0 .713.288T23 12q0 .425-.288.713T22 13h-2Zm-8 10q-.425 0-.713-.288T11 22v-2q0-.425.288-.713T12 19q.425 0 .713.288T13 20v2q0 .425-.288.713T12 23ZM5.65 7.05l-1.425-1.4q-.3-.3-.3-.725t.3-.7q.275-.275.7-.275t.7.275L7.05 5.65q.275.275.275.7t-.275.7q-.3.275-.7.275t-.7-.275Zm12.7 12.725l-1.4-1.425q-.275-.3-.275-.713t.275-.687q.275-.275.688-.275t.712.275l1.425 1.4q.3.275.288.7t-.288.725q-.3.3-.725.3t-.7-.3ZM2 13q-.425 0-.713-.288T1 12q0-.425.288-.713T2 11h2q.425 0 .713.288T5 12q0 .425-.288.713T4 13H2Zm2.225 6.775q-.275-.275-.275-.7t.275-.7L5.65 16.95q.275-.275.687-.275t.713.275q.3.3.3.713t-.3.712l-1.4 1.4q-.3.3-.725.3t-.7-.3ZM12 18q-2.5 0-4.25-1.75T6 12q0-2.5 1.75-4.25T12 6q2.5 0 4.25 1.75T18 12q0 2.5-1.75 4.25T12 18Zm0-2q1.65 0 2.825-1.175T16 12q0-1.65-1.175-2.825T12 8q-1.65 0-2.825 1.175T8 12q0 1.65 1.175 2.825T12 16Zm0-4Z"
|
||||
></path>
|
||||
</svg>
|
||||
</template>
|
||||
@@ -7,7 +7,7 @@ export const useUserStore = defineStore("user", () => {
|
||||
const profile = ref<Profile | null>(null)
|
||||
const [isFinished] = useToggle(false)
|
||||
const user = computed<User | null>(() => profile.value?.user ?? null)
|
||||
const isAuthed = computed(() => !!user.value?.email ?? false)
|
||||
const isAuthed = computed(() => !!user.value?.email)
|
||||
const isAdminRole = computed(
|
||||
() =>
|
||||
user.value?.admin_type === USER_TYPE.ADMIN ||
|
||||
@@ -25,7 +25,7 @@ export const useUserStore = defineStore("user", () => {
|
||||
const res = await getProfile()
|
||||
profile.value = res.data
|
||||
isFinished.value = true
|
||||
storage.set(STORAGE_KEY.AUTHED, !!user.value?.email ?? false)
|
||||
storage.set(STORAGE_KEY.AUTHED, !!user.value?.email)
|
||||
}
|
||||
|
||||
function clearProfile() {
|
||||
|
||||
@@ -5,8 +5,6 @@ import legacy from "@vitejs/plugin-legacy"
|
||||
import AutoImport from "unplugin-auto-import/vite"
|
||||
import Components from "unplugin-vue-components/vite"
|
||||
import { NaiveUiResolver } from "unplugin-vue-components/resolvers"
|
||||
import IconsResolver from "unplugin-icons/resolver"
|
||||
import Icons from "unplugin-icons/vite"
|
||||
import Markdown from "unplugin-vue-markdown/vite"
|
||||
import Shiki from "markdown-it-shiki"
|
||||
|
||||
@@ -90,13 +88,9 @@ export default defineConfig({
|
||||
dts: "./src/auto-imports.d.ts",
|
||||
}),
|
||||
Components({
|
||||
resolvers: [
|
||||
NaiveUiResolver(),
|
||||
IconsResolver({ enabledCollections: ["ep"] }),
|
||||
],
|
||||
resolvers: [NaiveUiResolver()],
|
||||
dts: "./src/components.d.ts",
|
||||
}),
|
||||
Icons({ autoInstall: true }),
|
||||
Markdown({
|
||||
markdownItSetup(md) {
|
||||
md.use(Shiki, {
|
||||
|
||||
Reference in New Issue
Block a user