chore(lab): Changes for pattern data
This commit is contained in:
parent
d6cc541da3
commit
13e32d9ed9
10 changed files with 18 additions and 18 deletions
|
@ -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]
|
||||
|
|
|
@ -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>•</span> : <span>°</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>
|
||||
|
|
|
@ -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)
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue