mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 17:46:28 +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;
|
||||
|
||||
Reference in new issue
Block a user