feat: timeline view

This commit is contained in:
Carlos Valente
2024-07-22 22:28:17 +02:00
parent 1ddcec993a
commit 2105a2af2a
33 changed files with 805 additions and 17 deletions
@@ -34,3 +34,16 @@ export const enDash = '';
export const timerPlaceholder = '––:––:––';
export const timerPlaceholderMin = '––:––';
/**
* Adds opacity to a given colour if possible
*/
export function alpha(colour: string, amount: number): string {
try {
const withAlpha = Color(colour).alpha(amount).hexa();
return withAlpha;
} catch (_error) {
/* we do not handle errors here */
}
return colour;
}