mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
feat::
core: buildContent: sv for samples core&ui: record_main: filter_by_status ui: scoreboard: colorize
This commit is contained in:
1 parent
b0cf638616
commit
7d7d3c1599
14 files changed
+69
-38
No files matched your search
@@ -55,6 +55,22 @@ export const STATUS_CODES = {
|
||||
30: 'ignored',
|
||||
};
|
||||
|
||||
export function getScoreColor(score: number | string): string {
|
||||
return [
|
||||
'#ff4f4f',
|
||||
'#ff694f',
|
||||
'#f8603a',
|
||||
'#fc8354',
|
||||
'#fa9231',
|
||||
'#f7bb3b',
|
||||
'#ecdb44',
|
||||
'#e2ec52',
|
||||
'#b0d628',
|
||||
'#93b127',
|
||||
'#25ad40',
|
||||
][Math.floor((Number(score) || 0) / 10)];
|
||||
}
|
||||
|
||||
export const USER_GENDER_MALE = 0;
|
||||
export const USER_GENDER_FEMALE = 1;
|
||||
export const USER_GENDER_OTHER = 2;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/utils",
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.10",
|
||||
"description": "hydrooj utils",
|
||||
"main": "package.json",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
Reference in new issue
Block a user