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 createTerms = terms => (terms.active && terms.text) ? ({
|
||||
delay: terms.delay,
|
||||
active: terms.active,
|
||||
title: terms.title,
|
||||
text: nmd(terms.text),
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ const TermsConditions = () => {
|
|||
data?.config && fromNamespace(namespaces.TERMS_CONDITIONS, data.config)
|
||||
const formData = termsAndConditions ?? {}
|
||||
const showOnScreen = termsAndConditions?.active ?? false
|
||||
const addDelayOnScreen = termsAndConditions?.delay ?? false
|
||||
|
||||
const save = it =>
|
||||
saveConfig({
|
||||
|
|
@ -182,6 +183,20 @@ const TermsConditions = () => {
|
|||
<Label2>{showOnScreen ? 'Yes' : 'No'}</Label2>
|
||||
</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}>
|
||||
<Info2>Info card</Info2>
|
||||
{!editing && (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue