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:
@@ -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,
|
||||
}),
|
||||
),
|
||||
},
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 ?? "",
|
||||
|
||||
@@ -64,7 +64,6 @@ function submit() {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user