1 parent
23844ae301
commit
d25b5dbe6d
268 files changed
+3684
-8861
No files matched your search
@@ -50,11 +50,7 @@ export const useAIStore = defineStore("ai", () => {
|
||||
const pinnedReport = ref<{ analysis: string } | null>(null)
|
||||
|
||||
async function fetchDetailsData(start: string, end: string) {
|
||||
const res = await getAIDetailData(
|
||||
start,
|
||||
end,
|
||||
targetUsername.value || undefined,
|
||||
)
|
||||
const res = await getAIDetailData(start, end, targetUsername.value || undefined)
|
||||
detailsData.start = res.start
|
||||
detailsData.end = res.end
|
||||
detailsData.grade = res.grade
|
||||
@@ -71,11 +67,7 @@ export const useAIStore = defineStore("ai", () => {
|
||||
}
|
||||
|
||||
async function fetchDurationData(end: string, duration: string) {
|
||||
const res = await getAIDurationData(
|
||||
end,
|
||||
duration,
|
||||
targetUsername.value || undefined,
|
||||
)
|
||||
const res = await getAIDurationData(end, duration, targetUsername.value || undefined)
|
||||
durationData.value = res
|
||||
}
|
||||
|
||||
@@ -105,11 +97,7 @@ export const useAIStore = defineStore("ai", () => {
|
||||
loading.heatmap = false
|
||||
}
|
||||
|
||||
async function fetchAnalysisData(
|
||||
start: string,
|
||||
end: string,
|
||||
duration: string,
|
||||
) {
|
||||
async function fetchAnalysisData(start: string, end: string, duration: string) {
|
||||
rangeStart.value = start
|
||||
rangeEnd.value = end
|
||||
// 换时间范围就回到第一页,否则停在第 5 页但新范围只有两页
|
||||
|
||||
@@ -4,12 +4,7 @@ import { useUserStore } from "shared/store/user"
|
||||
import { ContestStatus, ContestType } from "utils/constants"
|
||||
import { duration } from "utils/functions"
|
||||
import type { Contest, ProblemRow } from "utils/types"
|
||||
import {
|
||||
checkContestPassword,
|
||||
getContest,
|
||||
getContestAccess,
|
||||
getContestProblems,
|
||||
} from "../api"
|
||||
import { checkContestPassword, getContest, getContestAccess, getContestProblems } from "../api"
|
||||
|
||||
export const useContestStore = defineStore("contest", () => {
|
||||
const userStore = useUserStore()
|
||||
@@ -48,13 +43,10 @@ export const useContestStore = defineStore("contest", () => {
|
||||
const isContestAdmin = computed(
|
||||
() =>
|
||||
userStore.isSuperAdmin ||
|
||||
(userStore.isAuthed &&
|
||||
contest.value?.createdBy.id === userStore.user!.id),
|
||||
(userStore.isAuthed && contest.value?.createdBy.id === userStore.user!.id),
|
||||
)
|
||||
|
||||
const isPrivate = computed(
|
||||
() => contest.value!.contestType === ContestType.private,
|
||||
)
|
||||
const isPrivate = computed(() => contest.value!.contestType === ContestType.private)
|
||||
|
||||
async function init(contestID: string) {
|
||||
problems.value = []
|
||||
|
||||
@@ -23,9 +23,7 @@ export const useProblemStore = defineStore("problem", () => {
|
||||
* 题目详情只在 problemID 变化时重新拉(见 oj/problem/detail.vue 的 init),
|
||||
* 而那时下面的 watch 已经把增量清零了,不会和新的 myFailedCount 叠加。
|
||||
*/
|
||||
const failCount = computed(
|
||||
() => (problem.value?.myFailedCount ?? 0) + sessionFailCount.value,
|
||||
)
|
||||
const failCount = computed(() => (problem.value?.myFailedCount ?? 0) + sessionFailCount.value)
|
||||
|
||||
const languages = computed<LANGUAGE[]>(() => {
|
||||
if (route.name === "problem" && problem.value?.allowFlowchart) {
|
||||
|
||||
Reference in new issue
Block a user