Merge pull request #2179 from ONLYOFFICE/feature/fix-bugs
Feature/fix bugs
This commit is contained in:
commit
def3d7b72f
|
@ -2,6 +2,13 @@ body {
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
body.theme-type-light {
|
||||
--background-navbar-ios: #ffffff;
|
||||
--background-navbar-word: #446995;
|
||||
--background-navbar-cell: #40865c;
|
||||
--background-navbar-slide: #aa5252;
|
||||
}
|
||||
|
||||
body.theme-type-dark {
|
||||
--background-navbar-ios: #232323;
|
||||
--background-navbar-word: #232323;
|
||||
|
|
|
@ -27,6 +27,7 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeReview', 'sto
|
|||
const docInfo = props.storeDocumentInfo;
|
||||
const docExt = docInfo.dataDoc ? docInfo.dataDoc.fileType : '';
|
||||
const docTitle = docInfo.dataDoc ? docInfo.dataDoc.title : '';
|
||||
const isAvailableExt = docExt && docExt !== 'oform';
|
||||
|
||||
useEffect(() => {
|
||||
Common.Gateway.on('init', loadConfig);
|
||||
|
@ -54,7 +55,7 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeReview', 'sto
|
|||
const navbarHeight = navbarBgHeight + subnavbarHeight;
|
||||
|
||||
const onEngineCreated = api => {
|
||||
if(isViewer) {
|
||||
if(isAvailableExt && isViewer) {
|
||||
api.SetMobileTopOffset(navbarHeight, navbarHeight);
|
||||
api.asc_registerCallback('onMobileScrollDelta', scrollHandler);
|
||||
}
|
||||
|
@ -69,14 +70,14 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeReview', 'sto
|
|||
return () => {
|
||||
const api = Common.EditorApi.get();
|
||||
|
||||
if (api) {
|
||||
if (api && isAvailableExt && isViewer) {
|
||||
api.SetMobileTopOffset(navbarHeight, navbarHeight);
|
||||
api.asc_unregisterCallback('onMobileScrollDelta', scrollHandler);
|
||||
}
|
||||
|
||||
Common.Notifications.off('engineCreated', onEngineCreated);
|
||||
}
|
||||
}, [isViewer]);
|
||||
}, [isAvailableExt, isViewer]);
|
||||
|
||||
// Scroll handler
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ class MainPage extends Component {
|
|||
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 isAvailableExt = docExt && docExt !== 'djvu' && docExt !== 'pdf' && docExt !== 'xps' && docExt !== 'oform';
|
||||
const storeToolbarSettings = this.props.storeToolbarSettings;
|
||||
const isDisconnected = this.props.users.isDisconnected;
|
||||
const isViewer = appOptions.isViewer;
|
||||
|
|
Loading…
Reference in a new issue