Merge pull request #1062 from ONLYOFFICE/fix/fix-bugs-on-mobiles

Fix/fix bugs on mobiles
This commit is contained in:
Julia Radzhabova 2021-08-10 19:45:35 +03:00 committed by GitHub
commit f58b6be9a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 7 deletions

View file

@ -85,7 +85,7 @@ const routes = [
}
];
const PageCollaboration = inject('storeAppOptions')(observer(props => {
const PageCollaboration = inject('storeAppOptions', 'users')(observer(props => {
const { t } = useTranslation();
const _t = t('Common.Collaboration', {returnObjects: true});
const appOptions = props.storeAppOptions;
@ -102,9 +102,11 @@ const PageCollaboration = inject('storeAppOptions')(observer(props => {
}
</Navbar>
<List>
<ListItem link={'/users/'} title={_t.textUsers}>
<Icon slot="media" icon="icon-users"></Icon>
</ListItem>
{props.users.editUsers.length > 0 &&
<ListItem link={'/users/'} title={_t.textUsers}>
<Icon slot="media" icon="icon-users"></Icon>
</ListItem>
}
{appOptions.canViewComments &&
<ListItem link='/comments/' title={_t.textComments}>
<Icon slot="media" icon="icon-insert-comment"></Icon>

View file

@ -74,6 +74,13 @@ const Settings = props => {
}, 400);
};
const onDownloadOrigin = () => {
closeModal();
setTimeout(() => {
Common.EditorApi.get().asc_DownloadOrigin();
}, 0);
};
return <SettingsView usePopover={!Device.phone}
openOptions={props.openOptions}
onclosed={props.onclosed}
@ -81,6 +88,7 @@ const Settings = props => {
onPrint={onPrint}
showHelp={showHelp}
onOrthographyCheck={onOrthographyCheck}
onDownloadOrigin={onDownloadOrigin}
/>
};

View file

@ -155,7 +155,7 @@ const SettingsList = inject("storeAppOptions", "storeReview")(observer(props =>
</ListItem>
}
{_canDownloadOrigin &&
<ListItem title={_t.textDownload} link="#" onClick={() => {}}> {/*ToDo*/}
<ListItem title={_t.textDownload} link="#" onClick={props.onDownloadOrigin} className='no-indicator'>
<Icon slot="media" icon="icon-download"></Icon>
</ListItem>
}
@ -199,10 +199,10 @@ class SettingsView extends Component {
return (
show_popover ?
<Popover id="settings-popover" className="popover__titled" onPopoverClosed={() => this.props.onclosed()}>
<SettingsList inPopover={true} onOptionClick={this.onoptionclick} openOptions={this.props.openOptions} style={{height: '410px'}} onReaderMode={this.props.onReaderMode} onPrint={this.props.onPrint} showHelp={this.props.showHelp} onOrthographyCheck={this.props.onOrthographyCheck}/>
<SettingsList inPopover={true} onOptionClick={this.onoptionclick} openOptions={this.props.openOptions} style={{height: '410px'}} onReaderMode={this.props.onReaderMode} onPrint={this.props.onPrint} showHelp={this.props.showHelp} onOrthographyCheck={this.props.onOrthographyCheck} onDownloadOrigin={this.props.onDownloadOrigin}/>
</Popover> :
<Popup className="settings-popup" onPopupClosed={() => this.props.onclosed()}>
<SettingsList onOptionClick={this.onoptionclick} openOptions={this.props.openOptions} onReaderMode={this.props.onReaderMode} onPrint={this.props.onPrint} showHelp={this.props.showHelp} onOrthographyCheck={this.props.onOrthographyCheck}/>
<SettingsList onOptionClick={this.onoptionclick} openOptions={this.props.openOptions} onReaderMode={this.props.onReaderMode} onPrint={this.props.onPrint} showHelp={this.props.showHelp} onOrthographyCheck={this.props.onOrthographyCheck} onDownloadOrigin={this.props.onDownloadOrigin}/>
</Popup>
)
}