Merge pull request #1939 from ONLYOFFICE/feature/fix-bugs
Feature/fix bugs
This commit is contained in:
commit
904e8ea272
|
@ -109,9 +109,13 @@ class MainPage extends Component {
|
|||
render() {
|
||||
const { t } = this.props;
|
||||
const appOptions = this.props.storeAppOptions;
|
||||
const storeDocumentInfo = this.props.storeDocumentInfo;
|
||||
const docExt = storeDocumentInfo.dataDoc ? storeDocumentInfo.dataDoc.fileType : '';
|
||||
const isAvailableExt = docExt && docExt !== 'djvu' && docExt !== 'pdf' && docExt !== 'xps';
|
||||
const storeToolbarSettings = this.props.storeToolbarSettings;
|
||||
const isDisconnected = this.props.users.isDisconnected;
|
||||
const isViewer = appOptions.isViewer;
|
||||
const isEdit = appOptions.isEdit;
|
||||
const isMobileView = appOptions.isMobileView;
|
||||
const disabledControls = storeToolbarSettings.disabledControls;
|
||||
const disabledSettings = storeToolbarSettings.disabledSettings;
|
||||
|
@ -214,7 +218,7 @@ class MainPage extends Component {
|
|||
text={isMobileView ? t("Toolbar.textSwitchedMobileView") : t("Toolbar.textSwitchedStandardView")}/>
|
||||
</CSSTransition>
|
||||
}
|
||||
{isViewer && !disabledSettings && !disabledControls && !isDisconnected &&
|
||||
{isViewer && !disabledSettings && !disabledControls && !isDisconnected && isAvailableExt && isEdit &&
|
||||
<Fab position="right-bottom" slot="fixed" onClick={() => this.turnOffViewerMode()}>
|
||||
<Icon icon="icon-edit-mode"/>
|
||||
</Fab>
|
||||
|
@ -226,4 +230,4 @@ class MainPage extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default withTranslation()(inject("storeAppOptions", "storeToolbarSettings", "users")(observer(MainPage)));
|
||||
export default withTranslation()(inject("storeAppOptions", "storeToolbarSettings", "users", "storeDocumentInfo")(observer(MainPage)));
|
|
@ -46,13 +46,11 @@ const ToolbarView = props => {
|
|||
onUndoClick: props.onUndo,
|
||||
onRedoClick: props.onRedo
|
||||
})}
|
||||
{(isViewer || !Device.phone) && isAvailableExt && <Link className={props.disabledControls ? 'disabled' : ''} icon={isMobileView ? 'icon-standard-view' : 'icon-mobile-view'} href={false} onClick={async e => {
|
||||
e.target.closest('.link').classList.add('disabled');
|
||||
{(isViewer || !Device.phone) && isAvailableExt && !props.disabledControls && <Link icon={isMobileView ? 'icon-standard-view' : 'icon-mobile-view'} href={false} onClick={async e => {
|
||||
await props.changeMobileView();
|
||||
await props.openOptions('snackbar');
|
||||
setTimeout(() => {
|
||||
props.closeOptions('snackbar');
|
||||
e.target.closest('.link').classList.remove('disabled');
|
||||
}, 1500);
|
||||
}}></Link>}
|
||||
{(props.showEditDocument && !isViewer) &&
|
||||
|
|
|
@ -500,6 +500,11 @@ const EditText = props => {
|
|||
const isAndroid = Device.android;
|
||||
const { t } = useTranslation();
|
||||
const storeTextSettings = props.storeTextSettings;
|
||||
const storeFocusObjects = props.storeFocusObjects;
|
||||
const shapeObject = storeFocusObjects.shapeObject;
|
||||
const shapePr = shapeObject.get_ShapeProperties();
|
||||
const inSmartArt = shapePr && shapePr.asc_getFromSmartArt();
|
||||
const inSmartArtInternal = shapePr && shapePr.asc_getFromSmartArtInternal();
|
||||
const fontName = storeTextSettings.fontName || t('Edit.textFonts');
|
||||
const fontSize = storeTextSettings.fontSize;
|
||||
const fontColor = storeTextSettings.textColor;
|
||||
|
@ -589,25 +594,33 @@ const EditText = props => {
|
|||
</a>
|
||||
</Row>
|
||||
</ListItem>
|
||||
<ListItem className='buttons'>
|
||||
<Row>
|
||||
<a className='button item-link' onClick={() => {props.onParagraphMove(true)}}>
|
||||
<Icon slot="media" icon="icon-de-indent"></Icon>
|
||||
</a>
|
||||
<a className='button item-link' onClick={() => {props.onParagraphMove(false)}}>
|
||||
<Icon slot="media" icon="icon-in-indent"></Icon>
|
||||
</a>
|
||||
</Row>
|
||||
</ListItem>
|
||||
<ListItem title={t('Edit.textBulletsAndNumbers')} link='/edit-bullets-and-numbers/' routeProps={{
|
||||
onBullet: props.onBullet,
|
||||
onNumber: props.onNumber,
|
||||
onMultiLevelList: props.onMultiLevelList,
|
||||
getIconsBulletsAndNumbers: props.getIconsBulletsAndNumbers,
|
||||
}}>
|
||||
<div className="preview">{previewList}</div>
|
||||
{!isAndroid && <Icon slot="media" icon="icon-bullets"></Icon>}
|
||||
</ListItem>
|
||||
{!inSmartArtInternal &&
|
||||
<ListItem className='buttons'>
|
||||
<Row>
|
||||
<a className='button item-link' onClick={() => {
|
||||
props.onParagraphMove(true)
|
||||
}}>
|
||||
<Icon slot="media" icon="icon-de-indent"></Icon>
|
||||
</a>
|
||||
<a className='button item-link' onClick={() => {
|
||||
props.onParagraphMove(false)
|
||||
}}>
|
||||
<Icon slot="media" icon="icon-in-indent"></Icon>
|
||||
</a>
|
||||
</Row>
|
||||
</ListItem>
|
||||
}
|
||||
{!inSmartArt && !inSmartArtInternal &&
|
||||
<ListItem title={t('Edit.textBulletsAndNumbers')} link='/edit-bullets-and-numbers/' routeProps={{
|
||||
onBullet: props.onBullet,
|
||||
onNumber: props.onNumber,
|
||||
onMultiLevelList: props.onMultiLevelList,
|
||||
getIconsBulletsAndNumbers: props.getIconsBulletsAndNumbers,
|
||||
}}>
|
||||
<div className="preview">{previewList}</div>
|
||||
{!isAndroid && <Icon slot="media" icon="icon-bullets"></Icon>}
|
||||
</ListItem>
|
||||
}
|
||||
<ListItem title={t("Edit.textLineSpacing")} link='/edit-text-line-spacing/' routeProps={{
|
||||
onLineSpacing: props.onLineSpacing
|
||||
}}>
|
||||
|
|
|
@ -98,12 +98,12 @@ const PageApplicationSettings = props => {
|
|||
</Toggle>
|
||||
</ListItem>
|
||||
</List>
|
||||
{!isViewer &&
|
||||
<List mediaList>
|
||||
<ListItem title={t('Settings.textDirection')} link="/direction/"
|
||||
routeProps={{changeDirection: props.changeDirection}}></ListItem>
|
||||
</List>
|
||||
}
|
||||
{/*{!isViewer &&*/}
|
||||
{/* <List mediaList>*/}
|
||||
{/* <ListItem title={t('Settings.textDirection')} link="/direction/"*/}
|
||||
{/* routeProps={{changeDirection: props.changeDirection}}></ListItem>*/}
|
||||
{/* </List>*/}
|
||||
{/*}*/}
|
||||
{_isShowMacros &&
|
||||
<List mediaList>
|
||||
<ListItem title={_t.textMacrosSettings} link="/macros-settings/" routeProps={{
|
||||
|
|
|
@ -52,7 +52,7 @@ const PageApplicationSettings = props => {
|
|||
</Toggle>
|
||||
</ListItem>
|
||||
</List>
|
||||
<RTLSetting />
|
||||
{/*<RTLSetting />*/}
|
||||
</Fragment>
|
||||
}
|
||||
{/* {_isShowMacros && */}
|
||||
|
|
|
@ -98,9 +98,9 @@ const PageApplicationSettings = props => {
|
|||
</ListItem>
|
||||
</List>
|
||||
|
||||
<List mediaList>
|
||||
<ListItem title={t("View.Settings.textDirection")} link="/direction/" routeProps={{changeDirection: props.changeDirection}}></ListItem>
|
||||
</List>
|
||||
{/*<List mediaList>*/}
|
||||
{/* <ListItem title={t("View.Settings.textDirection")} link="/direction/" routeProps={{changeDirection: props.changeDirection}}></ListItem>*/}
|
||||
{/*</List>*/}
|
||||
{/* } */}
|
||||
{/* {_isShowMacros && */}
|
||||
<List>
|
||||
|
|
Loading…
Reference in a new issue