Merge pull request #2179 from ONLYOFFICE/feature/fix-bugs

Feature/fix bugs
This commit is contained in:
maxkadushkin 2023-01-09 19:20:22 +03:00 committed by GitHub
commit def3d7b72f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 4 deletions

View file

@ -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;

View file

@ -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

View file

@ -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;