Merge pull request #1917 from ONLYOFFICE/feature/fix-bugs
Feature/fix bugs
This commit is contained in:
commit
b797fe25a3
|
@ -81,15 +81,15 @@ const Settings = props => {
|
||||||
}, 0);
|
}, 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
const onChangeMobileView = () => {
|
const onChangeMobileView = async () => {
|
||||||
const api = Common.EditorApi.get()
|
const api = Common.EditorApi.get();
|
||||||
const appOptions = props.storeAppOptions;
|
const appOptions = props.storeAppOptions;
|
||||||
|
|
||||||
appOptions.changeMobileView();
|
await appOptions.changeMobileView();
|
||||||
api.ChangeReaderMode();
|
await api.ChangeReaderMode();
|
||||||
|
|
||||||
if(Device.phone) {
|
if(Device.phone) {
|
||||||
closeModal();
|
await closeModal();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -203,4 +203,4 @@ class MainPage extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default inject("storeAppOptions")(observer(withTranslation()(MainPage)));
|
export default withTranslation()(inject("storeAppOptions")(observer(MainPage)));
|
|
@ -57,11 +57,11 @@ const ToolbarView = props => {
|
||||||
<Link className={props.disabledControls ? 'disabled' : ''} icon='icon-edit' href={false} onClick={props.onEditDocument}></Link>
|
<Link className={props.disabledControls ? 'disabled' : ''} icon='icon-edit' href={false} onClick={props.onEditDocument}></Link>
|
||||||
}
|
}
|
||||||
{props.isEdit && isAvailableExt && !isViewer && EditorUIController.getToolbarOptions && EditorUIController.getToolbarOptions({
|
{props.isEdit && isAvailableExt && !isViewer && EditorUIController.getToolbarOptions && EditorUIController.getToolbarOptions({
|
||||||
disabled: disableEditBtn || props.disabledControls,
|
disabled: disableEditBtn || props.disabledControls,
|
||||||
onEditClick: e => props.openOptions('edit'),
|
onEditClick: e => props.openOptions('edit'),
|
||||||
onAddClick: e => props.openOptions('add')
|
onAddClick: e => props.openOptions('add')
|
||||||
})}
|
})}
|
||||||
{isViewer && isAvailableExt && <Link icon='icon-edit-mode' className={(props.disabledSettings || props.disabledControls || isDisconnected) && 'disabled'} href={false} onClick={() => props.turnOffViewerMode()}></Link>}
|
{isViewer && isAvailableExt && props.isEdit && <Link icon='icon-edit-mode' className={(props.disabledSettings || props.disabledControls || isDisconnected) && 'disabled'} href={false} onClick={() => props.turnOffViewerMode()}></Link>}
|
||||||
{Device.phone ? null : <Link className={(props.disabledControls || props.readerMode) && 'disabled'} icon='icon-search' searchbarEnable='.searchbar' href={false}></Link>}
|
{Device.phone ? null : <Link className={(props.disabledControls || props.readerMode) && 'disabled'} icon='icon-search' searchbarEnable='.searchbar' href={false}></Link>}
|
||||||
{props.displayCollaboration && window.matchMedia("(min-width: 360px)").matches ? <Link className={props.disabledControls && 'disabled'} id='btn-coauth' href={false} icon='icon-collaboration' onClick={e => props.openOptions('coauth')}></Link> : null}
|
{props.displayCollaboration && window.matchMedia("(min-width: 360px)").matches ? <Link className={props.disabledControls && 'disabled'} id='btn-coauth' href={false} icon='icon-collaboration' onClick={e => props.openOptions('coauth')}></Link> : null}
|
||||||
<Link className={(props.disabledSettings || props.disabledControls || isDisconnected) && 'disabled'} id='btn-settings' icon='icon-settings' href={false} onClick={e => props.openOptions('settings')}></Link>
|
<Link className={(props.disabledSettings || props.disabledControls || isDisconnected) && 'disabled'} id='btn-settings' icon='icon-settings' href={false} onClick={e => props.openOptions('settings')}></Link>
|
||||||
|
|
|
@ -24,13 +24,14 @@ const PageApplicationSettings = props => {
|
||||||
|
|
||||||
// set mode
|
// set mode
|
||||||
const appOptions = props.storeAppOptions;
|
const appOptions = props.storeAppOptions;
|
||||||
|
const isViewer = appOptions.isViewer;
|
||||||
const _isEdit = appOptions.isEdit;
|
const _isEdit = appOptions.isEdit;
|
||||||
const _isShowMacros = (!appOptions.isDisconnected && appOptions.customization) ? appOptions.customization.macros !== false : true;
|
const _isShowMacros = (!appOptions.isDisconnected && appOptions.customization) ? appOptions.customization.macros !== false : true;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page>
|
<Page>
|
||||||
<Navbar title={_t.textApplicationSettings} backLink={_t.textBack} />
|
<Navbar title={_t.textApplicationSettings} backLink={_t.textBack} />
|
||||||
{_isEdit &&
|
{_isEdit && !isViewer &&
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<BlockTitle>{_t.textUnitOfMeasurement}</BlockTitle>
|
<BlockTitle>{_t.textUnitOfMeasurement}</BlockTitle>
|
||||||
<List>
|
<List>
|
||||||
|
@ -90,7 +91,6 @@ const PageApplicationSettings = props => {
|
||||||
/>
|
/>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
</List>
|
</List>
|
||||||
|
|
||||||
<List>
|
<List>
|
||||||
<ListItem title={'Dark theme'}>
|
<ListItem title={'Dark theme'}>
|
||||||
<Toggle checked={isThemeDark}
|
<Toggle checked={isThemeDark}
|
||||||
|
@ -98,11 +98,12 @@ const PageApplicationSettings = props => {
|
||||||
</Toggle>
|
</Toggle>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
</List>
|
</List>
|
||||||
|
{!isViewer &&
|
||||||
<List mediaList>
|
<List mediaList>
|
||||||
<ListItem title={t('Settings.textDirection')} link="/direction/" routeProps={{changeDirection: props.changeDirection}}></ListItem>
|
<ListItem title={t('Settings.textDirection')} link="/direction/"
|
||||||
</List>
|
routeProps={{changeDirection: props.changeDirection}}></ListItem>
|
||||||
|
</List>
|
||||||
|
}
|
||||||
{_isShowMacros &&
|
{_isShowMacros &&
|
||||||
<List mediaList>
|
<List mediaList>
|
||||||
<ListItem title={_t.textMacrosSettings} link="/macros-settings/" routeProps={{
|
<ListItem title={_t.textMacrosSettings} link="/macros-settings/" routeProps={{
|
||||||
|
|
|
@ -166,9 +166,9 @@ const SettingsList = inject("storeAppOptions", "storeReview")(observer(props =>
|
||||||
<Toggle checked={isMobileView} onToggleChange={() => {
|
<Toggle checked={isMobileView} onToggleChange={() => {
|
||||||
props.onChangeMobileView();
|
props.onChangeMobileView();
|
||||||
props.openOptions('snackbar');
|
props.openOptions('snackbar');
|
||||||
setTimeout( () => {
|
setTimeout(() => {
|
||||||
props.closeOptions('snackbar');
|
props.closeOptions('snackbar');
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}} />
|
}} />
|
||||||
</ListItem>
|
</ListItem>
|
||||||
}
|
}
|
||||||
|
@ -178,12 +178,10 @@ const SettingsList = inject("storeAppOptions", "storeReview")(observer(props =>
|
||||||
<Icon slot="media" icon="icon-doc-setup"></Icon>
|
<Icon slot="media" icon="icon-doc-setup"></Icon>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
}
|
}
|
||||||
{!isViewer &&
|
<ListItem title={_t.textApplicationSettings} link="#"
|
||||||
<ListItem title={_t.textApplicationSettings} link="#"
|
onClick={onoptionclick.bind(this, "/application-settings/")}>
|
||||||
onClick={onoptionclick.bind(this, "/application-settings/")}>
|
<Icon slot="media" icon="icon-app-settings"></Icon>
|
||||||
<Icon slot="media" icon="icon-app-settings"></Icon>
|
</ListItem>
|
||||||
</ListItem>
|
|
||||||
}
|
|
||||||
{_canDownload &&
|
{_canDownload &&
|
||||||
<ListItem title={_t.textDownload} link="#" onClick={onoptionclick.bind(this, "/download/")}>
|
<ListItem title={_t.textDownload} link="#" onClick={onoptionclick.bind(this, "/download/")}>
|
||||||
<Icon slot="media" icon="icon-download"></Icon>
|
<Icon slot="media" icon="icon-download"></Icon>
|
||||||
|
|
Loading…
Reference in a new issue