chore(shared): Added expand to workbench
This commit is contained in:
parent
55ee707bf1
commit
24851967ef
7 changed files with 42 additions and 0 deletions
|
@ -282,6 +282,12 @@ export const EmailIcon = (props) => (
|
||||||
</IconWrapper>
|
</IconWrapper>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
export const ExpandIcon = (props) => (
|
||||||
|
<IconWrapper {...props}>
|
||||||
|
<path d="M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15" />
|
||||||
|
</IconWrapper>
|
||||||
|
)
|
||||||
|
|
||||||
export const ExportIcon = (props) => (
|
export const ExportIcon = (props) => (
|
||||||
<IconWrapper {...props}>
|
<IconWrapper {...props}>
|
||||||
<path d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
|
<path d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
|
||||||
|
|
|
@ -27,6 +27,7 @@ export const defaultGist = {
|
||||||
margin: 2,
|
margin: 2,
|
||||||
renderer: 'react',
|
renderer: 'react',
|
||||||
embed: true,
|
embed: true,
|
||||||
|
expand: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
export const preloadGist = {
|
export const preloadGist = {
|
||||||
|
|
|
@ -8,6 +8,7 @@ import {
|
||||||
DetailIcon,
|
DetailIcon,
|
||||||
IncludeIcon,
|
IncludeIcon,
|
||||||
MarginIcon,
|
MarginIcon,
|
||||||
|
ExpandIcon,
|
||||||
} from 'shared/components/icons.mjs'
|
} from 'shared/components/icons.mjs'
|
||||||
|
|
||||||
export const defaultSamm = (units, inMm = true) => {
|
export const defaultSamm = (units, inMm = true) => {
|
||||||
|
@ -106,6 +107,20 @@ export const loadSettingsConfig = ({
|
||||||
},
|
},
|
||||||
icon: DetailIcon,
|
icon: DetailIcon,
|
||||||
},
|
},
|
||||||
|
expand: {
|
||||||
|
control: 4, // Show when control > 3
|
||||||
|
list: [0, 1],
|
||||||
|
dflt: 0,
|
||||||
|
choiceTitles: {
|
||||||
|
0: 'expandNo',
|
||||||
|
1: 'expandYes',
|
||||||
|
},
|
||||||
|
valueTitles: {
|
||||||
|
0: 'no',
|
||||||
|
1: 'yes',
|
||||||
|
},
|
||||||
|
icon: ExpandIcon,
|
||||||
|
},
|
||||||
only: {
|
only: {
|
||||||
control: 4, // Show when control > 3
|
control: 4, // Show when control > 3
|
||||||
dflt: false,
|
dflt: false,
|
||||||
|
|
|
@ -9,6 +9,8 @@ sabool.t: Include Seam Allowance
|
||||||
sabool.d: Controls whether or not to include seam allowance in your pattern
|
sabool.d: Controls whether or not to include seam allowance in your pattern
|
||||||
complete.t: Details
|
complete.t: Details
|
||||||
complete.d: Controls how detailed the pattern is; Either a complete pattern with all details, or a basic outline of the pattern parts
|
complete.d: Controls how detailed the pattern is; Either a complete pattern with all details, or a basic outline of the pattern parts
|
||||||
|
expand.t: Expand
|
||||||
|
expand.d: Controls efforts to save paper. Disable this to expand all pattern parts at the cost of using more space.
|
||||||
only.t: Included Parts
|
only.t: Included Parts
|
||||||
only.d: Use this to control exactly which pattern parts will be included in your pattern
|
only.d: Use this to control exactly which pattern parts will be included in your pattern
|
||||||
locale.t: Language
|
locale.t: Language
|
||||||
|
@ -35,6 +37,10 @@ completeYes.t: Generate a complete pattern
|
||||||
completeYes.d: This will generate a complete pattern with all notations, lines, markings. Use this if you are not certain what to choose.
|
completeYes.d: This will generate a complete pattern with all notations, lines, markings. Use this if you are not certain what to choose.
|
||||||
completeNo.t: Generate a pattern outline
|
completeNo.t: Generate a pattern outline
|
||||||
completeNo.d: Only generate the outline of the pattern parts. Use this if you are looking to use a lasercutter or have other specific needs.
|
completeNo.d: Only generate the outline of the pattern parts. Use this if you are looking to use a lasercutter or have other specific needs.
|
||||||
|
expandYes.t: Expand all pattern parts
|
||||||
|
expandYes.d: This will generate a pattern where all pattern parts are drawn to their full size, even if they are simple rectangles.
|
||||||
|
expandNo.t: Keep patterns parts compact where possible
|
||||||
|
expandNo.d: This will draw a more dense representation of the pattern which includes all info without using up too much space & paper.
|
||||||
paperlessNo.t: Generate a regular pattern
|
paperlessNo.t: Generate a regular pattern
|
||||||
paperlessNo.d: This will generate a regular pattern, which you can then print out.
|
paperlessNo.d: This will generate a regular pattern, which you can then print out.
|
||||||
paperlessYes.t: Generate a paperless pattern
|
paperlessYes.t: Generate a paperless pattern
|
||||||
|
|
|
@ -13,6 +13,7 @@ const OnlySettingInput = (props) => {
|
||||||
|
|
||||||
export const inputs = {
|
export const inputs = {
|
||||||
complete: ListInput,
|
complete: ListInput,
|
||||||
|
expand: ListInput,
|
||||||
locale: ListInput,
|
locale: ListInput,
|
||||||
margin: MmInput,
|
margin: MmInput,
|
||||||
only: OnlySettingInput,
|
only: OnlySettingInput,
|
||||||
|
|
|
@ -14,6 +14,7 @@ const OnlySettingValue = ({ current, config }) => (
|
||||||
|
|
||||||
export const values = {
|
export const values = {
|
||||||
complete: ListValue,
|
complete: ListValue,
|
||||||
|
expand: ListValue,
|
||||||
locale: ListValue,
|
locale: ListValue,
|
||||||
margin: MmValue,
|
margin: MmValue,
|
||||||
only: OnlySettingValue,
|
only: OnlySettingValue,
|
||||||
|
|
|
@ -21,6 +21,7 @@ import {
|
||||||
BookmarkIcon,
|
BookmarkIcon,
|
||||||
ZoomInIcon,
|
ZoomInIcon,
|
||||||
ZoomOutIcon,
|
ZoomOutIcon,
|
||||||
|
ExpandIcon,
|
||||||
} from 'shared/components/icons.mjs'
|
} from 'shared/components/icons.mjs'
|
||||||
import { shownHeaderSelector } from 'shared/components/wrappers/header.mjs'
|
import { shownHeaderSelector } from 'shared/components/wrappers/header.mjs'
|
||||||
|
|
||||||
|
@ -158,6 +159,17 @@ export const ViewHeader = ({ update, settings, ui, control, account, design, set
|
||||||
}
|
}
|
||||||
title={t('core-settings:complete.t')}
|
title={t('core-settings:complete.t')}
|
||||||
/>
|
/>
|
||||||
|
<IconButton
|
||||||
|
Icon={ExpandIcon}
|
||||||
|
dflt={settings.expand}
|
||||||
|
onClick={() =>
|
||||||
|
update.settings(
|
||||||
|
['expand'],
|
||||||
|
typeof settings.expand === 'undefined' ? 1 : settings.expand ? 0 : 1
|
||||||
|
)
|
||||||
|
}
|
||||||
|
title={t('core-settings:expand.t')}
|
||||||
|
/>
|
||||||
<IconButton
|
<IconButton
|
||||||
Icon={
|
Icon={
|
||||||
settings.units !== 'imperial'
|
settings.units !== 'imperial'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue