[DE mobile] refactoring

This commit is contained in:
Maxim Kadushkin 2021-01-28 13:27:56 +03:00
parent 711cea9e3e
commit 273ef21d44

View file

@ -39,8 +39,7 @@ const PageApplicationSettings = props => {
onChange={() => changeMeasureSettings(2)}></ListItem> onChange={() => changeMeasureSettings(2)}></ListItem>
</List> </List>
<List> <List>
<ListItem> <ListItem title={_t.textSpellcheck}>
<span>{_t.textSpellcheck}</span>
<Toggle checked={isSpellChecking} <Toggle checked={isSpellChecking}
onChange={() => { onChange={() => {
store.changeSpellCheck(!isSpellChecking); store.changeSpellCheck(!isSpellChecking);
@ -50,8 +49,7 @@ const PageApplicationSettings = props => {
</ListItem> </ListItem>
</List> </List>
<List> <List>
<ListItem>{/*ToDo: if (DisplayMode == "final" || DisplayMode == "original") {disabled} */} <ListItem title={_t.textNoCharacters}>{/*ToDo: if (DisplayMode == "final" || DisplayMode == "original") {disabled} */}
<span>{_t.textNoCharacters}</span>
<Toggle checked={isNonprintingCharacters} <Toggle checked={isNonprintingCharacters}
onChange={() => { onChange={() => {
store.changeNoCharacters(!isNonprintingCharacters); store.changeNoCharacters(!isNonprintingCharacters);
@ -59,8 +57,7 @@ const PageApplicationSettings = props => {
}} }}
/> />
</ListItem> </ListItem>
<ListItem>{/*ToDo: if (DisplayMode == "final" || DisplayMode == "original") {disabled} */} <ListItem title={_t.textHiddenTableBorders}>{/*ToDo: if (DisplayMode == "final" || DisplayMode == "original") {disabled} */}
<span>{_t.textHiddenTableBorders}</span>
<Toggle checked={isHiddenTableBorders} <Toggle checked={isHiddenTableBorders}
onChange={() => { onChange={() => {
store.changeShowTableEmptyLine(!isHiddenTableBorders); store.changeShowTableEmptyLine(!isHiddenTableBorders);
@ -73,17 +70,15 @@ const PageApplicationSettings = props => {
} }
<BlockTitle>{_t.textCommentsDisplay}</BlockTitle> <BlockTitle>{_t.textCommentsDisplay}</BlockTitle>
<List> <List>
<ListItem> <ListItem title={_t.textComments}>
<span>{_t.textComments}</span> <Toggle checked={isComments}
<Toggle checked={isComments}
onChange={() => { onChange={() => {
store.changeDisplayComments(!isComments); store.changeDisplayComments(!isComments);
props.switchDisplayComments(!isComments); props.switchDisplayComments(!isComments);
}} }}
/> />
</ListItem> </ListItem>
<ListItem> <ListItem title={_t.textResolvedComments}>
<span>{_t.textResolvedComments}</span>
<Toggle checked={isResolvedComments} disabled={!isComments} <Toggle checked={isResolvedComments} disabled={!isComments}
onChange={() => { onChange={() => {
store.changeDisplayResolved(!isResolvedComments); store.changeDisplayResolved(!isResolvedComments);