[DE mobile] Hide options in toolbar for view mode
This commit is contained in:
parent
30b08d1dbb
commit
cd1aa44b5c
|
@ -174,6 +174,7 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeReview')(prop
|
|||
|
||||
return (
|
||||
<ToolbarView openOptions={props.openOptions}
|
||||
isEdit={appOptions.isEdit}
|
||||
docTitle={docTitle}
|
||||
isShowBack={isShowBack}
|
||||
onBack={onBack}
|
||||
|
|
|
@ -9,18 +9,20 @@ const ToolbarView = props => {
|
|||
<Fragment>
|
||||
<NavLeft>
|
||||
{props.isShowBack && <Link className={`btn-doc-back${props.disabledControls && ' disabled'}`} icon='icon-back' onClick={props.onBack}></Link>}
|
||||
<Link icon='icon-undo' className={!props.isCanUndo && 'disabled'} onClick={props.onUndo}></Link>
|
||||
<Link icon='icon-redo' className={!props.isCanRedo && 'disabled'} onClick={props.onRedo}></Link>
|
||||
{props.isEdit && EditorUIController.getUndoRedo({
|
||||
disabledUndo: !props.isCanUndo,
|
||||
disabledRedo: !props.isCanRedo,
|
||||
onUndoClick: props.onUndo,
|
||||
onRedoClick: props.onRedo
|
||||
})}
|
||||
</NavLeft>
|
||||
{!Device.phone && <NavTitle>{props.docTitle}</NavTitle>}
|
||||
<NavRight>
|
||||
{
|
||||
EditorUIController.getToolbarOptions({
|
||||
{props.isEdit && EditorUIController.getToolbarOptions({
|
||||
disabled: disableEditBtn || props.disabledControls,
|
||||
onEditClick: e => props.openOptions('edit'),
|
||||
onAddClick: e => props.openOptions('add'),
|
||||
})
|
||||
}
|
||||
onAddClick: e => props.openOptions('add')
|
||||
})}
|
||||
{ Device.phone ? null : <Link className={props.disabledControls && 'disabled'} icon='icon-search' searchbarEnable='.searchbar' href={false}></Link> }
|
||||
{props.displayCollaboration && <Link className={props.disabledControls && 'disabled'} id='btn-coauth' href={false} icon='icon-collaboration' onClick={e => props.openOptions('coauth')}></Link>}
|
||||
<Link className={(props.disabledSettings || props.disabledControls) && 'disabled'} id='btn-settings' icon='icon-settings' href={false} onClick={e => props.openOptions('settings')}></Link>
|
||||
|
|
Loading…
Reference in a new issue