aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/app/models
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-08-12 01:54:36 +0900
committernsfisis <nsfisis@gmail.com>2024-08-12 01:54:36 +0900
commitab6abc3a7619be89dda1bc3ab0b3f19ff69b575f (patch)
tree57f4b6da4682ec43cbd7ba2a51c5866f226b0035 /frontend/app/models
parentb97b245861b93a5ab5f8bde095d9920fabd0cbbd (diff)
downloadiosdc-japan-2024-albatross-ab6abc3a7619be89dda1bc3ab0b3f19ff69b575f.tar.gz
iosdc-japan-2024-albatross-ab6abc3a7619be89dda1bc3ab0b3f19ff69b575f.tar.zst
iosdc-japan-2024-albatross-ab6abc3a7619be89dda1bc3ab0b3f19ff69b575f.zip
refactor(frontend): rename SubmissionResult and VerificationResult for consistant naming
Diffstat (limited to 'frontend/app/models')
-rw-r--r--frontend/app/models/ExecResult.ts (renamed from frontend/app/models/VerificationResult.ts)6
-rw-r--r--frontend/app/models/PlayerInfo.ts4
-rw-r--r--frontend/app/models/SubmitResult.ts (renamed from frontend/app/models/SubmissionResult.ts)14
3 files changed, 11 insertions, 13 deletions
diff --git a/frontend/app/models/VerificationResult.ts b/frontend/app/models/ExecResult.ts
index 09a7ef4..59b8ee8 100644
--- a/frontend/app/models/VerificationResult.ts
+++ b/frontend/app/models/ExecResult.ts
@@ -1,4 +1,4 @@
-export type VerificationResultStatus =
+export type ExecResultStatus =
| "running"
| "success"
| "wrong_answer"
@@ -8,9 +8,9 @@ export type VerificationResultStatus =
| "internal_error"
| "canceled";
-export type VerificationResult = {
+export type ExecResult = {
testcase_id: number | null;
- status: VerificationResultStatus;
+ status: ExecResultStatus;
label: string;
stdout: string;
stderr: string;
diff --git a/frontend/app/models/PlayerInfo.ts b/frontend/app/models/PlayerInfo.ts
index 7206a8b..30cccea 100644
--- a/frontend/app/models/PlayerInfo.ts
+++ b/frontend/app/models/PlayerInfo.ts
@@ -1,9 +1,9 @@
-import type { SubmissionResult } from "./SubmissionResult";
+import type { SubmitResult } from "./SubmitResult";
export type PlayerInfo = {
displayName: string | null;
iconPath: string | null;
score: number | null;
code: string | null;
- submissionResult?: SubmissionResult;
+ submitResult?: SubmitResult;
};
diff --git a/frontend/app/models/SubmissionResult.ts b/frontend/app/models/SubmitResult.ts
index 7311494..403a0db 100644
--- a/frontend/app/models/SubmissionResult.ts
+++ b/frontend/app/models/SubmitResult.ts
@@ -1,6 +1,6 @@
-import type { VerificationResult } from "./VerificationResult";
+import type { ExecResult } from "./ExecResult";
-export type SubmissionResultStatus =
+export type SubmitResultStatus =
| "running"
| "success"
| "wrong_answer"
@@ -9,14 +9,12 @@ export type SubmissionResultStatus =
| "runtime_error"
| "internal_error";
-export type SubmissionResult = {
- status: SubmissionResultStatus;
- verificationResults: VerificationResult[];
+export type SubmitResult = {
+ status: SubmitResultStatus;
+ execResults: ExecResult[];
};
-export function submissionResultStatusToLabel(
- status: SubmissionResultStatus | null,
-) {
+export function submitResultStatusToLabel(status: SubmitResultStatus | null) {
switch (status) {
case null:
return "-";