@@ -72,6 +72,13 @@ const menu = computed<DropdownOption[]>(() => [
|
|||||||
{ label: "重置代码", key: "reset" },
|
{ label: "重置代码", key: "reset" },
|
||||||
])
|
])
|
||||||
|
|
||||||
|
const showGoSubmissionButton = computed(() => {
|
||||||
|
if (isContestMode.value) return true
|
||||||
|
else if (userStore.isAdminRole) return true
|
||||||
|
else if (userStore.showSubmissions) return true
|
||||||
|
else return false
|
||||||
|
})
|
||||||
|
|
||||||
const languageOptions: DropdownOption[] = languages.value.map((it) => ({
|
const languageOptions: DropdownOption[] = languages.value.map((it) => ({
|
||||||
label: () =>
|
label: () =>
|
||||||
h(NFlex, { align: "center" }, () => [
|
h(NFlex, { align: "center" }, () => [
|
||||||
@@ -161,11 +168,7 @@ onMounted(() => {
|
|||||||
<SubmitCode v-else />
|
<SubmitCode v-else />
|
||||||
|
|
||||||
<n-button
|
<n-button
|
||||||
v-if="
|
v-if="showGoSubmissionButton"
|
||||||
!userStore.isSuperAdmin &&
|
|
||||||
userStore.showSubmissions &&
|
|
||||||
!isContestMode
|
|
||||||
"
|
|
||||||
:size="buttonSize"
|
:size="buttonSize"
|
||||||
@click="goSubmissions"
|
@click="goSubmissions"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user