mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-14 11:53:49 +00:00
refactor: timer design review
This commit is contained in:
@@ -9,7 +9,6 @@ import Input from '../../../common/components/input/input/Input';
|
||||
import TimeInput from '../../../common/components/input/time-input/TimeInput';
|
||||
import Modal from '../../../common/components/modal/Modal';
|
||||
import Select from '../../../common/components/select/Select';
|
||||
import Switch from '../../../common/components/switch/Switch';
|
||||
import { editorSettingsDefaults, useEditorSettings } from '../../../common/stores/editorSettings';
|
||||
import * as Panel from '../panel-utils/PanelUtils';
|
||||
|
||||
|
||||
@@ -55,6 +55,18 @@ export function isStringBoolean(text: string | null) {
|
||||
return text?.toLowerCase() === 'true' || text === '1';
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares a colour string for use in views
|
||||
* Colours in params do not have the #prefix
|
||||
*/
|
||||
export function makeColourString(hex: string | null): string | undefined {
|
||||
if (!hex) {
|
||||
return undefined;
|
||||
}
|
||||
// ensure the hex starts with a #
|
||||
return hex.startsWith('#') ? hex : `#${hex}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a dynamic property from an event
|
||||
* Considers custom fields
|
||||
|
||||
Reference in New Issue
Block a user