add problem.
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user