diff --git a/src/oj/problem/components/ProblemSubmission.vue b/src/oj/problem/components/ProblemSubmission.vue new file mode 100644 index 0000000..d2195f7 --- /dev/null +++ b/src/oj/problem/components/ProblemSubmission.vue @@ -0,0 +1,100 @@ + + + + + + diff --git a/src/oj/problem/detail.vue b/src/oj/problem/detail.vue index 1298885..281336a 100644 --- a/src/oj/problem/detail.vue +++ b/src/oj/problem/detail.vue @@ -10,6 +10,9 @@ const ProblemContent = defineAsyncComponent( const ProblemInfo = defineAsyncComponent( () => import("./components/ProblemInfo.vue") ) +const ProblemSubmission = defineAsyncComponent( + () => import("./components/ProblemSubmission.vue") +) interface Props { problemID: string @@ -51,6 +54,9 @@ onBeforeUnmount(() => { + + + @@ -63,6 +69,9 @@ onBeforeUnmount(() => { + + + diff --git a/src/oj/submission/detail.vue b/src/oj/submission/detail.vue index 6cbcb6c..24f6ff1 100644 --- a/src/oj/submission/detail.vue +++ b/src/oj/submission/detail.vue @@ -65,16 +65,6 @@ onMounted(init) - - - {{ copied ? "已复制" : "复制代码" }} - - + + {{ copied ? "成功复制" : "复制代码" }} + diff --git a/src/oj/submission/list.vue b/src/oj/submission/list.vue index b0e6539..9226460 100644 --- a/src/oj/submission/list.vue +++ b/src/oj/submission/list.vue @@ -12,6 +12,7 @@ import { Submission } from "utils/types" import { adminRejudge, getSubmissions } from "oj/api" import { isDesktop } from "~/shared/composables/breakpoints" import { useUserStore } from "~/shared/store/user" +import { LANGUAGE_SHOW_VALUE } from "~/utils/constants" interface Query { username: string @@ -136,9 +137,7 @@ const columns = computed(() => { { text: true, type: "info", - onClick: () => { - router.push("/submission/" + row.id) - }, + onClick: () => router.push("/submission/" + row.id), }, () => row.id.slice(0, 12) ) @@ -191,7 +190,12 @@ const columns = computed(() => { width: 120, render: (row) => submissionMemoryFormat(row.statistic_info.memory_cost), }, - { title: "语言", key: "language", width: 120 }, + { + title: "语言", + key: "language", + width: 120, + render: (row) => LANGUAGE_SHOW_VALUE[row.language], + }, { title: "用户", key: "username", diff --git a/src/shared/Header.vue b/src/shared/Header.vue index 71b8787..e71d561 100644 --- a/src/shared/Header.vue +++ b/src/shared/Header.vue @@ -18,6 +18,7 @@ const active = computed(() => { const path = route.path.split("/")[1] || "problem" return !["user", "setting"].includes(path) ? path : "" }) +const hiddenTitle = computed(() => isMobile.value && route.name === "learn") async function handleLogout() { await logout() @@ -98,7 +99,7 @@ function goHome() { - + {{ configStore.config?.website_name }}