feat: add toggle button for tc screen
This commit is contained in:
parent
0ae8c691c2
commit
576979f14f
2 changed files with 16 additions and 0 deletions
|
|
@ -7,6 +7,7 @@ const configManager = require('../new-config-manager')
|
||||||
const plugins = require('../plugins')
|
const plugins = require('../plugins')
|
||||||
|
|
||||||
const createTerms = terms => (terms.active && terms.text) ? ({
|
const createTerms = terms => (terms.active && terms.text) ? ({
|
||||||
|
delay: terms.delay,
|
||||||
active: terms.active,
|
active: terms.active,
|
||||||
title: terms.title,
|
title: terms.title,
|
||||||
text: nmd(terms.text),
|
text: nmd(terms.text),
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,7 @@ const TermsConditions = () => {
|
||||||
data?.config && fromNamespace(namespaces.TERMS_CONDITIONS, data.config)
|
data?.config && fromNamespace(namespaces.TERMS_CONDITIONS, data.config)
|
||||||
const formData = termsAndConditions ?? {}
|
const formData = termsAndConditions ?? {}
|
||||||
const showOnScreen = termsAndConditions?.active ?? false
|
const showOnScreen = termsAndConditions?.active ?? false
|
||||||
|
const addDelayOnScreen = termsAndConditions?.delay ?? false
|
||||||
|
|
||||||
const save = it =>
|
const save = it =>
|
||||||
saveConfig({
|
saveConfig({
|
||||||
|
|
@ -182,6 +183,20 @@ const TermsConditions = () => {
|
||||||
<Label2>{showOnScreen ? 'Yes' : 'No'}</Label2>
|
<Label2>{showOnScreen ? 'Yes' : 'No'}</Label2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className={classes.switchRow}>
|
||||||
|
<P>Add 7 seconds delay on screen</P>
|
||||||
|
<div className={classes.switch}>
|
||||||
|
<Switch
|
||||||
|
checked={addDelayOnScreen}
|
||||||
|
onChange={event =>
|
||||||
|
save({
|
||||||
|
delay: event.target.checked
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
<Label2>{addDelayOnScreen ? 'Yes' : 'No'}</Label2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div className={classes.header}>
|
<div className={classes.header}>
|
||||||
<Info2>Info card</Info2>
|
<Info2>Info card</Info2>
|
||||||
{!editing && (
|
{!editing && (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue