Add getColor() to utils
This commit is contained in:
@@ -671,6 +671,11 @@ const cronDays = [
|
||||
// generates 24h time sets (instead of american 12h) to avoid having to translate everything to locales eg. 12:00
|
||||
const cronHours = Array.from({ length: 24 }).map(function (v, i) { return { id: i, name: (i < 10 ? '0' : '') + i + ':00' }; });
|
||||
|
||||
function getColor(numOfSteps, step) {
|
||||
const deg = 360/numOfSteps;
|
||||
return `hsl(${deg*step} 70% 50%)`;
|
||||
}
|
||||
|
||||
// named exports
|
||||
export {
|
||||
prettyRelayProviderName,
|
||||
@@ -686,7 +691,8 @@ export {
|
||||
getDataURLFromFile,
|
||||
getTextFromFile,
|
||||
cronDays,
|
||||
cronHours
|
||||
cronHours,
|
||||
getColor,
|
||||
};
|
||||
|
||||
// default export
|
||||
@@ -704,5 +710,6 @@ export default {
|
||||
getDataURLFromFile,
|
||||
getTextFromFile,
|
||||
cronDays,
|
||||
cronHours
|
||||
cronHours,
|
||||
getColor,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user