diff --git a/package.json b/package.json index e2752e0..98e9b24 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "start": "vite", "build": "vue-tsc && vite build", "preview": "vite preview", - "fmt": "prettier --write src *.d.ts *.ts" + "fmt": "prettier --write src *.ts" }, "dependencies": { "@element-plus/icons-vue": "^2.0.10", diff --git a/src/components.d.ts b/src/components.d.ts index 635b24f..40e13ad 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -8,7 +8,6 @@ export {} declare module '@vue/runtime-core' { export interface GlobalComponents { ElAlert: typeof import('element-plus/es')['ElAlert'] - ElAside: typeof import('element-plus/es')['ElAside'] ElButton: typeof import('element-plus/es')['ElButton'] ElCard: typeof import('element-plus/es')['ElCard'] ElCol: typeof import('element-plus/es')['ElCol'] diff --git a/src/learn/components/Loading.vue b/src/learn/components/Loading.vue index f078015..271ecf8 100644 --- a/src/learn/components/Loading.vue +++ b/src/learn/components/Loading.vue @@ -1 +1 @@ - + diff --git a/src/learn/index.vue b/src/learn/index.vue index 4c02919..8a3ee8b 100644 --- a/src/learn/index.vue +++ b/src/learn/index.vue @@ -1,31 +1,31 @@ - - - - - + + + + + diff --git a/src/learn/step-1/index.md b/src/learn/step-1/index.md index cb16d75..c608cd1 100644 --- a/src/learn/step-1/index.md +++ b/src/learn/step-1/index.md @@ -1,9 +1,9 @@ -# 我的是第一步骤 - -```c -#include - -int main() { - return 0; -} -``` +# 我的是第一步骤 + +```c +#include + +int main() { + return 0; +} +``` diff --git a/src/oj/api.ts b/src/oj/api.ts index d74657a..8515b81 100644 --- a/src/oj/api.ts +++ b/src/oj/api.ts @@ -2,7 +2,12 @@ import { useAxios } from "@vueuse/integrations/useAxios" import http from "utils/http" import { getACRate } from "utils/functions" import { DIFFICULTY } from "utils/constants" -import { Problem, SubmitCodePayload, Submission } from "utils/types" +import { + Problem, + SubmitCodePayload, + Submission, + SubmissionListPayload, +} from "utils/types" function filterResult(result: Problem) { const newResult: any = { @@ -14,11 +19,11 @@ function filterResult(result: Problem) { rate: getACRate(result.accepted_number, result.submission_number), } if (result.my_status === null || result.my_status === undefined) { - newResult.status = "none" + newResult.status = "not_test" } else if (result.my_status === 0) { - newResult.status = "done" + newResult.status = "passed" } else { - newResult.status = "tried" + newResult.status = "failed" } return newResult } @@ -78,15 +83,6 @@ export function submitCode(data: SubmitCodePayload) { return http.post("submission", data) } -export function listSubmissions(params: { - myself: "1" | "0" - result: string - username: string - page: number - contest_id: string - problem_id: string - limit: number - offset: number -}) { - return useAxios("submissions", { params }, http) +export function listSubmissions(params: SubmissionListPayload) { + return useAxios("submissions", { params }, http, { immediate: false }) } diff --git a/src/oj/components/SubmissionResultTag.vue b/src/oj/components/SubmissionResultTag.vue index a1b6f91..89644b8 100644 --- a/src/oj/components/SubmissionResultTag.vue +++ b/src/oj/components/SubmissionResultTag.vue @@ -1,17 +1,17 @@ - - - - - + + + + + diff --git a/src/oj/contest/detail.vue b/src/oj/contest/detail.vue index 80b8d56..41c0521 100644 --- a/src/oj/contest/detail.vue +++ b/src/oj/contest/detail.vue @@ -1,5 +1,5 @@ - - - - - + + + + + diff --git a/src/oj/problem/components/Editor.vue b/src/oj/problem/components/Editor.vue index be6e63b..1035e9c 100644 --- a/src/oj/problem/components/Editor.vue +++ b/src/oj/problem/components/Editor.vue @@ -1,84 +1,84 @@ - - - - - + + + + + diff --git a/src/oj/problem/components/ProblemContent.vue b/src/oj/problem/components/ProblemContent.vue index bb3cab5..f224634 100644 --- a/src/oj/problem/components/ProblemContent.vue +++ b/src/oj/problem/components/ProblemContent.vue @@ -1,180 +1,180 @@ - - - - - + + + + + diff --git a/src/oj/problem/components/ProblemInfo.vue b/src/oj/problem/components/ProblemInfo.vue index 674eb52..9e08fc8 100644 --- a/src/oj/problem/components/ProblemInfo.vue +++ b/src/oj/problem/components/ProblemInfo.vue @@ -1,63 +1,60 @@ - - - + + + diff --git a/src/oj/problem/components/SubmitPanel.vue b/src/oj/problem/components/SubmitPanel.vue index 69f7e5e..7b3518f 100644 --- a/src/oj/problem/components/SubmitPanel.vue +++ b/src/oj/problem/components/SubmitPanel.vue @@ -1,231 +1,231 @@ - - - + + + diff --git a/src/oj/problem/components/TestcasePanel.vue b/src/oj/problem/components/TestcasePanel.vue index 80956be..d665a1f 100644 --- a/src/oj/problem/components/TestcasePanel.vue +++ b/src/oj/problem/components/TestcasePanel.vue @@ -1,41 +1,41 @@ - - - - - + + + + + diff --git a/src/oj/problem/detail.vue b/src/oj/problem/detail.vue index dd3b761..b13ff46 100644 --- a/src/oj/problem/detail.vue +++ b/src/oj/problem/detail.vue @@ -1,10 +1,14 @@ - - - - + + + + + diff --git a/src/oj/status/list.vue b/src/oj/status/list.vue index 23948f8..a0985df 100644 --- a/src/oj/status/list.vue +++ b/src/oj/status/list.vue @@ -1,16 +1,67 @@