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

View file

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

View file

@ -155,7 +155,7 @@ const SettingsList = inject("storeAppOptions", "storeReview")(observer(props =>
</ListItem> </ListItem>
} }
{_canDownloadOrigin && {_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> <Icon slot="media" icon="icon-download"></Icon>
</ListItem> </ListItem>
} }
@ -199,10 +199,10 @@ class SettingsView extends Component {
return ( return (
show_popover ? show_popover ?
<Popover id="settings-popover" className="popover__titled" onPopoverClosed={() => this.props.onclosed()}> <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> : </Popover> :
<Popup className="settings-popup" onPopupClosed={() => this.props.onclosed()}> <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> </Popup>
) )
} }