Merge branch 'feature/mobile-apps-on-reactjs-edits' of https://github.com/ONLYOFFICE/web-apps into feature/mobile-apps-on-reactjs-edits

This commit is contained in:
SergeyEzhin 2021-04-30 16:11:45 +03:00
commit 374acddf54

View file

@ -4,25 +4,21 @@ import { Device } from '../../../../common/mobile/utils/device';
import EditorUIController from '../lib/patch' import EditorUIController from '../lib/patch'
const ToolbarView = props => { const ToolbarView = props => {
const undo_box = props.isEdit && EditorUIController.toolbarOptions ? EditorUIController.toolbarOptions.getUndoRedo({
disabledUndo: !props.isCanUndo,
disabledRedo: !props.isCanRedo,
onUndoClick: props.onUndo,
onRedoClick: props.onRedo
}) : null;
return ( return (
<Fragment> <Fragment>
<NavLeft> <NavLeft>
{props.isShowBack && <Link className={`btn-doc-back${props.disabledControls && ' disabled'}`} icon='icon-back' onClick={props.onBack}></Link>} {props.isShowBack && <Link className={`btn-doc-back${props.disabledControls && ' disabled'}`} icon='icon-back' onClick={props.onBack}></Link>}
{Device.ios && props.isEdit && EditorUIController.toolbarOptions && EditorUIController.toolbarOptions.getUndoRedo({ {Device.ios && undo_box}
disabledUndo: !props.isCanUndo,
disabledRedo: !props.isCanRedo,
onUndoClick: props.onUndo,
onRedoClick: props.onRedo
})}
</NavLeft> </NavLeft>
{!Device.phone && <NavTitle>{props.docTitle}</NavTitle>} {!Device.phone && <NavTitle>{props.docTitle}</NavTitle>}
<NavRight> <NavRight>
{Device.android && props.isEdit && EditorUIController.toolbarOptions && EditorUIController.toolbarOptions.getUndoRedo({ {Device.android && undo_box}
disabledUndo: !props.isCanUndo,
disabledRedo: !props.isCanRedo,
onUndoClick: props.onUndo,
onRedoClick: props.onRedo
})}
{props.isEdit && EditorUIController.toolbarOptions && EditorUIController.toolbarOptions.getEditOptions({ {props.isEdit && EditorUIController.toolbarOptions && EditorUIController.toolbarOptions.getEditOptions({
disabled: props.disabledEditControls || props.disabledControls, disabled: props.disabledEditControls || props.disabledControls,
onEditClick: () => props.openOptions('edit'), onEditClick: () => props.openOptions('edit'),