mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-08 17:03:53 +00:00
refactor: extract common utility
This commit is contained in:
committed by
Carlos Valente
parent
56775f621e
commit
0aeec12ccd
@@ -102,15 +102,6 @@ export function getShowModifiers(
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Which colour should the timer have at a given moment
|
||||
*/
|
||||
export function getTimerColour(viewSettings: ViewSettings, showWarning: boolean, showDanger: boolean) {
|
||||
if (showWarning) return viewSettings.warningColor;
|
||||
if (showDanger) return viewSettings.dangerColor;
|
||||
return viewSettings.normalColor;
|
||||
}
|
||||
|
||||
/**
|
||||
* What, if anything, should be displayed in the secondary field
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user