diff options
author | Dessalines <tyhou13@gmx.com> | 2020-03-06 09:55:32 -0500 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2020-03-06 09:57:15 -0500 |
commit | 08af66ba28f38339a5ae655493d3ab299508d910 (patch) | |
tree | d73540598391a8fd0f7790217ba1c698f5c53aec /ui/src/utils.ts | |
parent | 15e91e4b4c1e988039442f02f619a28f0fb7a8f3 (diff) |
Some comment-node additions
- Hiding extra vote counts if no downvotes.
- Showing numbers on actions if there are.
Diffstat (limited to 'ui/src/utils.ts')
-rw-r--r-- | ui/src/utils.ts | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/ui/src/utils.ts b/ui/src/utils.ts index 058be6ae..8e456cc5 100644 --- a/ui/src/utils.ts +++ b/ui/src/utils.ts @@ -768,8 +768,19 @@ export function postSort( } } -export const colorList: Array<string> = [...Array(10)].map(() => randomHsl()); +export const colorList: Array<string> = [ + hsl(0), + hsl(100), + hsl(150), + hsl(200), + hsl(250), + hsl(300), +]; + +function hsl(num: number) { + return `hsla(${num}, 35%, 50%, 1)`; +} -export function randomHsl() { +function randomHsl() { return `hsla(${Math.random() * 360}, 100%, 50%, 1)`; } |