From 08af66ba28f38339a5ae655493d3ab299508d910 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 6 Mar 2020 09:55:32 -0500 Subject: Some comment-node additions - Hiding extra vote counts if no downvotes. - Showing numbers on actions if there are. --- ui/src/utils.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'ui/src/utils.ts') 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 = [...Array(10)].map(() => randomHsl()); +export const colorList: Array = [ + 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)`; } -- cgit v1.2.3