update
Some checks failed
Deploy / deploy (push) Has been cancelled

This commit is contained in:
2025-09-25 20:48:09 +08:00
parent f7b8ef8978
commit 4ff5822ef8
3 changed files with 35 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { USER_TYPE } from "~/utils/constants"
import { PROBLEM_PERMISSION, USER_TYPE } from "~/utils/constants"
import { getUserRole } from "~/utils/functions"
import { User } from "~/utils/types"
@@ -21,7 +21,14 @@ const isNotRegularUser = computed(
:type="getUserRole(props.user.admin_type).type"
size="small"
>
{{ getUserRole(props.user.admin_type).tagString }}
{{ getUserRole(props.user.admin_type).label }}
</n-tag>
<n-tag size="small" v-if="props.user.admin_type === USER_TYPE.ADMIN">
{{
props.user.problem_permission === PROBLEM_PERMISSION.ALL
? "全部"
: "仅自己"
}}
</n-tag>
{{ props.user.username }}
</n-flex>