@cpany/app
Advanced tools
Comparing version 0.0.33 to 0.0.34
{ | ||
"name": "@cpany/app", | ||
"version": "0.0.33", | ||
"version": "0.0.34", | ||
"description": "CPany web app", | ||
@@ -12,3 +12,3 @@ "repository": { | ||
"dependencies": { | ||
"@cpany/types": "0.0.33", | ||
"@cpany/types": "0.0.34", | ||
"tippy.js": "^6.3.1", | ||
@@ -15,0 +15,0 @@ "vue": "^3.1.4", |
import { Ref, ref, unref } from 'vue'; | ||
import type { IContest } from '@cpany/types'; | ||
import type { IContest, IProblem } from '@cpany/types'; | ||
@@ -63,2 +63,4 @@ export function isUndef<T>( | ||
return 'HDu'; | ||
} else if (contest.type === 'lugou') { | ||
return '洛谷'; | ||
} else { | ||
@@ -68,1 +70,16 @@ return contest.type; | ||
}; | ||
export const displayProblemType = (problem: IProblem) => { | ||
if (problem.type.startsWith('codeforces')) { | ||
return 'Codeforces'; | ||
} else if (problem.type.startsWith('nowcoder')) { | ||
return '牛客竞赛'; | ||
} else if (problem.type.startsWith('hdu')) { | ||
return 'HDu'; | ||
} else if (problem.type.startsWith('luogu')) { | ||
return '洛谷'; | ||
} else { | ||
const type = problem.type; | ||
return type.charAt(0).toUpperCase() + type.slice(1); | ||
} | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
364554
1437
+ Added@cpany/types@0.0.34(transitive)
- Removed@cpany/types@0.0.33(transitive)
Updated@cpany/types@0.0.34