From e7f09b4dccdd482968c90cbd5204a5c4081a054d Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Mon, 22 Jan 2024 14:00:43 +0800 Subject: [PATCH] update --- src/api.ts | 4 +-- src/components/CodeEditor.vue | 9 +++++- src/composables/code.ts | 59 ++++++++++++++++++++++++----------- src/desktop/Content.vue | 56 +++++++++++++++++++++++++++------ src/desktop/Header.vue | 34 ++++++++++---------- src/main.ts | 2 ++ src/types.ts | 24 +++++++++++++- 7 files changed, 138 insertions(+), 50 deletions(-) diff --git a/src/api.ts b/src/api.ts index 069b867..f02f8d7 100644 --- a/src/api.ts +++ b/src/api.ts @@ -1,5 +1,5 @@ import axios from "axios" -import { Code } from "./types" +import { Code, Submission } from "./types" import { deadResults, languageToId } from "./templates" function getChromeVersion() { @@ -42,7 +42,7 @@ export async function submit(code: Code, input: string) { redirect_stderr_to_stdout: true, compiler_options: compilerOptions, } - const response = await http.post("/submissions", payload, { + const response = await http.post("/submissions", payload, { params: { base64_encoded: true, wait: true }, }) const data = response.data diff --git a/src/components/CodeEditor.vue b/src/components/CodeEditor.vue index e4c455c..6b17a34 100644 --- a/src/components/CodeEditor.vue +++ b/src/components/CodeEditor.vue @@ -57,7 +57,10 @@ function onChange(v: string) {