-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
629 additions
and
499 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 44 additions & 30 deletions
74
apps/client/src/features/viewers/backstage/backstage.options.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,58 @@ | ||
import { CustomFields } from 'ontime-types'; | ||
|
||
import { getTimeOption, makeOptionsFromCustomFields } from '../../../common/components/view-params-editor/constants'; | ||
import { | ||
getTimeOption, | ||
makeOptionsFromCustomFields, | ||
OptionTitle, | ||
} from '../../../common/components/view-params-editor/constants'; | ||
import { ViewOption } from '../../../common/components/view-params-editor/types'; | ||
|
||
export const getBackstageOptions = (timeFormat: string, customFields: CustomFields): ViewOption[] => { | ||
const secondaryOptions = makeOptionsFromCustomFields(customFields, { note: 'Note' }); | ||
|
||
return [ | ||
{ section: 'Clock Options' }, | ||
getTimeOption(timeFormat), | ||
{ section: 'Data sources' }, | ||
{ title: OptionTitle.ClockOptions, collapsible: true, options: [getTimeOption(timeFormat)] }, | ||
{ | ||
id: 'secondary-src', | ||
title: 'Event secondary text', | ||
description: 'Select the data source for auxiliary text shown in now and next cards', | ||
type: 'option', | ||
values: secondaryOptions, | ||
defaultValue: '', | ||
}, | ||
{ section: 'Schedule options' }, | ||
{ | ||
id: 'eventsPerPage', | ||
title: 'Events per page', | ||
description: 'Sets the number of events on the page, can cause overflow', | ||
type: 'number', | ||
placeholder: '8 (default)', | ||
}, | ||
{ | ||
id: 'hidePast', | ||
title: 'Hide past events', | ||
description: 'Scheduler will only show upcoming events', | ||
type: 'boolean', | ||
defaultValue: false, | ||
title: OptionTitle.DataSources, | ||
collapsible: true, | ||
options: [ | ||
{ | ||
id: 'secondary-src', | ||
title: 'Event secondary text', | ||
description: 'Select the data source for auxiliary text shown in now and next cards', | ||
type: 'option', | ||
values: secondaryOptions, | ||
defaultValue: '', | ||
}, | ||
], | ||
}, | ||
|
||
{ | ||
id: 'stopCycle', | ||
title: 'Stop cycling through event pages', | ||
description: 'Schedule will not auto-cycle through events', | ||
type: 'boolean', | ||
defaultValue: false, | ||
title: OptionTitle.Schedule, | ||
collapsible: true, | ||
options: [ | ||
{ | ||
id: 'eventsPerPage', | ||
title: 'Events per page', | ||
description: 'Sets the number of events on the page, can cause overflow', | ||
type: 'number', | ||
placeholder: '8 (default)', | ||
}, | ||
{ | ||
id: 'hidePast', | ||
title: 'Hide past events', | ||
description: 'Scheduler will only show upcoming events', | ||
type: 'boolean', | ||
defaultValue: false, | ||
}, | ||
{ | ||
id: 'stopCycle', | ||
title: 'Stop cycling through event pages', | ||
description: 'Schedule will not auto-cycle through events', | ||
type: 'boolean', | ||
defaultValue: false, | ||
}, | ||
], | ||
}, | ||
]; | ||
}; |
138 changes: 71 additions & 67 deletions
138
apps/client/src/features/viewers/clock/clock.options.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,77 @@ | ||
import { getTimeOption } from '../../../common/components/view-params-editor/constants'; | ||
import { getTimeOption, OptionTitle } from '../../../common/components/view-params-editor/constants'; | ||
import { ViewOption } from '../../../common/components/view-params-editor/types'; | ||
|
||
export const getClockOptions = (timeFormat: string): ViewOption[] => [ | ||
{ section: 'Clock Options' }, | ||
getTimeOption(timeFormat), | ||
{ section: 'View style override' }, | ||
{ title: OptionTitle.ClockOptions, collapsible: true, options: [getTimeOption(timeFormat)] }, | ||
{ | ||
id: 'key', | ||
title: 'Key Colour', | ||
description: 'Background or key colour for entire view. Default: #000000', | ||
type: 'colour', | ||
defaultValue: '000000', | ||
}, | ||
{ | ||
id: 'text', | ||
title: 'Text Colour', | ||
description: 'Text colour. Default: #FFFFFF', | ||
type: 'colour', | ||
defaultValue: 'FFFFFF', | ||
}, | ||
{ | ||
id: 'textbg', | ||
title: 'Text Background', | ||
description: 'Background colour for timer text. Default: #FFF0 (transparent)', | ||
type: 'colour', | ||
defaultValue: 'FFF0', | ||
}, | ||
{ | ||
id: 'font', | ||
title: 'Font', | ||
description: 'Font family, will use the fonts available in the system', | ||
type: 'string', | ||
placeholder: 'Arial Black (default)', | ||
}, | ||
{ | ||
id: 'size', | ||
title: 'Text Size', | ||
description: 'Scales the current style (0.5 = 50% 1 = 100% 2 = 200%)', | ||
type: 'number', | ||
placeholder: '1 (default)', | ||
}, | ||
{ | ||
id: 'alignx', | ||
title: 'Align Horizontal', | ||
description: 'Moves the horizontally in page to start = left | center | end = right', | ||
type: 'option', | ||
values: { start: 'Start', center: 'Center', end: 'End' }, | ||
defaultValue: 'center', | ||
}, | ||
{ | ||
id: 'offsetx', | ||
title: 'Offset Horizontal', | ||
description: 'Offsets the timer horizontal position by a given amount in pixels', | ||
type: 'number', | ||
placeholder: '0 (default)', | ||
}, | ||
{ | ||
id: 'aligny', | ||
title: 'Align Vertical', | ||
description: 'Moves the vertically in page to start = left | center | end = right', | ||
type: 'option', | ||
values: { start: 'Start', center: 'Center', end: 'End' }, | ||
defaultValue: 'center', | ||
}, | ||
{ | ||
id: 'offsety', | ||
title: 'Offset Vertical', | ||
description: 'Offsets the timer vertical position by a given amount in pixels', | ||
type: 'number', | ||
placeholder: '0 (default)', | ||
title: OptionTitle.ClockOptions, | ||
collapsible: true, | ||
options: [ | ||
{ | ||
id: 'key', | ||
title: 'Key Colour', | ||
description: 'Background or key colour for entire view. Default: #000000', | ||
type: 'colour', | ||
defaultValue: '000000', | ||
}, | ||
{ | ||
id: 'text', | ||
title: 'Text Colour', | ||
description: 'Text colour. Default: #FFFFFF', | ||
type: 'colour', | ||
defaultValue: 'FFFFFF', | ||
}, | ||
{ | ||
id: 'textbg', | ||
title: 'Text Background', | ||
description: 'Background colour for timer text. Default: #FFF0 (transparent)', | ||
type: 'colour', | ||
defaultValue: 'FFF0', | ||
}, | ||
{ | ||
id: 'font', | ||
title: 'Font', | ||
description: 'Font family, will use the fonts available in the system', | ||
type: 'string', | ||
placeholder: 'Arial Black (default)', | ||
}, | ||
{ | ||
id: 'size', | ||
title: 'Text Size', | ||
description: 'Scales the current style (0.5 = 50% 1 = 100% 2 = 200%)', | ||
type: 'number', | ||
placeholder: '1 (default)', | ||
}, | ||
{ | ||
id: 'alignx', | ||
title: 'Align Horizontal', | ||
description: 'Moves the horizontally in page to start = left | center | end = right', | ||
type: 'option', | ||
values: { start: 'Start', center: 'Center', end: 'End' }, | ||
defaultValue: 'center', | ||
}, | ||
{ | ||
id: 'offsetx', | ||
title: 'Offset Horizontal', | ||
description: 'Offsets the timer horizontal position by a given amount in pixels', | ||
type: 'number', | ||
placeholder: '0 (default)', | ||
}, | ||
{ | ||
id: 'aligny', | ||
title: 'Align Vertical', | ||
description: 'Moves the vertically in page to start = left | center | end = right', | ||
type: 'option', | ||
values: { start: 'Start', center: 'Center', end: 'End' }, | ||
defaultValue: 'center', | ||
}, | ||
{ | ||
id: 'offsety', | ||
title: 'Offset Vertical', | ||
description: 'Offsets the timer vertical position by a given amount in pixels', | ||
type: 'number', | ||
placeholder: '0 (default)', | ||
}, | ||
], | ||
}, | ||
]; |
Oops, something went wrong.