docs(阶段3): 记录出口标准达成;补跑 prettier

覆盖率对账表更新:admin 侧 3/45 已实现,缺口 42。达成判据是 apps/web 的
oj/ 与 shared/ 两个目录已无指向旧 Django 的运行时调用,残留的 utils/http
引用只剩 ApiResponse 这一个类型。

顺带补跑 npm fmt,几个此前未格式化的文件随之改动,均为纯格式。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-07 06:48:20 -06:00
parent 44f6f27841
commit ced8f3ee1b
6 changed files with 50 additions and 26 deletions

View File

@@ -6,16 +6,19 @@ import type {
} from "utils/types"
export function getAchievements(name?: string) {
return api2.get<any>("achievements", { params: name ? { username: name } : {} })
return api2
.get<any>("achievements", { params: name ? { username: name } : {} })
.then((response) => ({
...response,
data: {
username: response.data.username,
achievements: response.data.achievements.map((item: any): Achievement => ({
...item,
unlock_time: item.unlockTime,
unlock_rate: item.unlockRate,
})),
achievements: response.data.achievements.map(
(item: any): Achievement => ({
...item,
unlock_time: item.unlockTime,
unlock_rate: item.unlockRate,
}),
),
},
}))
}

View File

@@ -1,11 +1,7 @@
<script setup lang="ts">
import { Icon } from "@iconify/vue"
import { storeToRefs } from "pinia"
import {
formatCode,
submitCode,
updateProblemSetProgress,
} from "oj/api"
import { formatCode, submitCode, updateProblemSetProgress } from "oj/api"
import { useCodeStore } from "oj/store/code"
import { useProblemStore } from "oj/store/problem"
import { useFireworks } from "oj/problem/composables/useFireworks"

View File

@@ -45,7 +45,8 @@ export async function getProfile(
class_name: profile.user.className,
},
real_name: profile.realName ?? "",
acm_problems_status: profile.acmProblemsStatus as Profile["acm_problems_status"],
acm_problems_status:
profile.acmProblemsStatus as Profile["acm_problems_status"],
avatar: profile.avatar,
blog: profile.blog as null,
mood: profile.mood ?? "",

View File

@@ -64,7 +64,6 @@ function submit() {
}
})
}
</script>
<template>

View File

@@ -61,8 +61,7 @@ export class BaseWebSocket<T extends WebSocketMessage = WebSocketMessage> {
public status: Ref<ConnectionStatus> = ref<ConnectionStatus>("disconnected")
constructor(config: WebSocketConfig) {
this.url =
config.url ?? `${import.meta.env.PUBLIC_WS_URL}/${config.path}/`
this.url = config.url ?? `${import.meta.env.PUBLIC_WS_URL}/${config.path}/`
this.maxReconnectAttempts = config.maxReconnectAttempts ?? 5
this.reconnectDelay = config.reconnectDelay ?? 1000