1
0
Fork 0

chore(lab): Changes for pattern data

This commit is contained in:
Joost De Cock 2022-09-01 08:48:10 +02:00
parent d6cc541da3
commit 13e32d9ed9
10 changed files with 18 additions and 18 deletions

View file

@ -6,7 +6,7 @@ import {values} from 'shared/components/workbench/menu/design-options/option-val
import {inputs} from 'shared/components/workbench/menu/design-options/option-input'
const Option = props => {
const { t } = useTranslation([`o_${props.design.config.name}`])
const { t } = useTranslation([`o_${props.design.config.data.name}`])
const opt = props.design.config.options[props.option];
const type = optionType(opt)
const Input = inputs[type]

View file

@ -29,7 +29,7 @@ const SumDiv = (props) => (
)
const Option = props => {
const { t } = useTranslation([`o_${props.design.config.name}`, 'workbench'])
const { t } = useTranslation([`o_${props.design.config.data.name}`, 'workbench'])
const active = (
props.gist.sample?.type === 'option' &&
props.gist.sample?.option === props.option
@ -56,7 +56,7 @@ const Option = props => {
{active ? <span>&bull;</span> : <span>&deg;</span>}
</span>
<span className={active ? 'text-secondary font-bold' : ''}>
{t(`o_${props.design.config.name}:${props.option}.t`)}
{t(`o_${props.design.config.data.name}:${props.option}.t`)}
</span>
</SumDiv>
</SumButton>

View file

@ -13,29 +13,29 @@ const View = props => {
},
{
name: 'draft',
title: t('draftDesign', { design: props.design.config.name }),
title: t('draftDesign', { design: props.design.config.data.name }),
onClick: () => props.updateGist(['_state', 'view'], 'draft', true)
},
{
name: 'test',
title: t('testDesign', { design: props.design.config.name }),
title: t('testDesign', { design: props.design.config.data.name }),
onClick: () => props.updateGist(['_state', 'view'], 'test', true)
},
{
name: 'printingLayout',
title: t('layoutThing', { thing: props.design.config.name })
title: t('layoutThing', { thing: props.design.config.data.name })
+ ': ' + t('forPrinting'),
onClick: () => props.updateGist(['_state', 'view'], 'printingLayout', true)
},
{
name: 'cuttingLayout',
title: t('layoutThing', { thing: props.design.config.name })
title: t('layoutThing', { thing: props.design.config.data.name })
+ ': ' + t('forCutting'),
onClick: () => props.updateGist(['_state', 'view'], 'cuttingLayout', true)
},
{
name: 'export',
title: t('exportThing', { thing: props.design.config.name }),
title: t('exportThing', { thing: props.design.config.data.name }),
onClick: () => props.updateGist(['_state', 'view'], 'export', true)
},
{