add problem.

This commit is contained in:
xuyue committed 2023-01-05 10:24:06 +08:00
1 parent 56e28abfa6
commit f88c053848
9 files changed
+228 -102

No files matched your search

+17 -2
View File
@@ -119,11 +119,26 @@ export const STORAGE_KEY = {
USER: "user",
}
export const DIFFICULTY = {
Low: "简单",
Mid: "中等",
High: "困难",
}
export function getTagColor(tag: string) {
return {
Low: "success",
Mid: "",
High: "danger",
简单: "success",
中等: "",
困难: "danger",
}[tag]
}
export function buildProblemCodeKey(problemID: number, contestID = null) {
if (contestID) {
return `${STORAGE_KEY.PROBLEM_CODE}_${contestID}_${problemID}`
}
return `${STORAGE_KEY.PROBLEM_CODE}_NaN_${problemID}`
}
export const GOOGLE_ANALYTICS_ID = "UA-111499601-1"