This commit is contained in:
2024-01-25 14:17:10 +08:00
parent 87fcb12960
commit 6464a1eee6
16 changed files with 191 additions and 148 deletions

View File

@@ -39,15 +39,15 @@ const menus = computed<MenuOption[]>(() => [
label: () => h(RouterLink, { to: "/" }, { default: () => "题库" }),
key: "problem",
},
{
label: () => h(RouterLink, { to: "/contest" }, { default: () => "比赛" }),
key: "contest",
},
{
label: () =>
h(RouterLink, { to: "/submission" }, { default: () => "提交" }),
key: "submission",
},
{
label: () => h(RouterLink, { to: "/contest" }, { default: () => "比赛" }),
key: "contest",
},
{
label: () => h(RouterLink, { to: "/rank" }, { default: () => "排名" }),
key: "rank",
@@ -109,7 +109,7 @@ function goHome() {
/>
</n-space>
<n-space align="center">
<n-dropdown v-if="isMobile" :options="menus" trigger="click">
<n-dropdown v-if="isMobile" :options="menus">
<n-button>菜单</n-button>
</n-dropdown>
<n-button
@@ -122,11 +122,7 @@ function goHome() {
{{ screenSwitchLabel }}
</n-button>
<div v-if="userStore.isFinished">
<n-dropdown
v-if="userStore.isAuthed"
:options="options"
trigger="click"
>
<n-dropdown v-if="userStore.isAuthed" :options="options">
<n-button>{{ userStore.user!.username }}</n-button>
</n-dropdown>
<n-space align="center" v-else>

View 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 20q-.425 0-.712-.288T10 19v-6L4.2 5.6q-.375-.5-.112-1.05T5 4h14q.65 0 .913.55T19.8 5.6L14 13v6q0 .425-.288.713T13 20z"
></path>
</svg>
</template>

View File

@@ -1,13 +0,0 @@
<template>
<svg
xmlns="http://www.w3.org/2000/svg"
width="1em"
height="1em"
viewBox="0 0 24 24"
>
<path
fill="currentColor"
d="M15.5 14h-.79l-.28-.27a6.5 6.5 0 0 0 1.48-5.34c-.47-2.78-2.79-5-5.59-5.34a6.505 6.505 0 0 0-7.27 7.27c.34 2.8 2.56 5.12 5.34 5.59a6.5 6.5 0 0 0 5.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0c.41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5S14 7.01 14 9.5S11.99 14 9.5 14z"
></path>
</svg>
</template>