diff --git a/apps/common/mobile/resources/css/skeleton.css b/apps/common/mobile/resources/css/skeleton.css index b2824cfc08..2e4109c042 100644 --- a/apps/common/mobile/resources/css/skeleton.css +++ b/apps/common/mobile/resources/css/skeleton.css @@ -17,7 +17,7 @@ body.theme-type-dark { } .skl-navbar { - --box-logo-height: 26px; + --box-logo-height: 0; --skl-navbar-height: 44px; --skl-pixel-ratio: 1; } @@ -36,6 +36,10 @@ body.theme-type-dark { position: relative; } +.navbar.main-navbar { + height: 0; +} + .skl-navbar.skl-navbar--md { /*height: calc(56px + 26px);*/ } @@ -142,14 +146,17 @@ body.theme-type-dark { .md .word-editor { --f7-navbar-bg-color: var(--background-navbar-word, #446995); --f7-subnavbar-bg-color: var(--background-navbar-word, #446995); + --f7-subnavbar-height: 56px; } .md .cell-editor { --f7-navbar-bg-color: var(--background-navbar-word, #40865c); --f7-subnavbar-bg-color: var(--background-navbar-word, #40865c); + --f7-subnavbar-height: 56px; } .md .slide-editor { --f7-navbar-bg-color: var(--background-navbar-word, #aa5252); --f7-subnavbar-bg-color: var(--background-navbar-word, #aa5252); -} \ No newline at end of file + --f7-subnavbar-height: 56px; +} diff --git a/apps/documenteditor/mobile/src/controller/ContextMenu.jsx b/apps/documenteditor/mobile/src/controller/ContextMenu.jsx index 9ceb25d483..c1a797643b 100644 --- a/apps/documenteditor/mobile/src/controller/ContextMenu.jsx +++ b/apps/documenteditor/mobile/src/controller/ContextMenu.jsx @@ -138,8 +138,8 @@ class ContextMenu extends ContextMenuController { checkShapeSelection() { const objects = this.props.objects; const contextMenuElem = document.querySelector('#idx-context-menu-popover'); - - if(objects.indexOf('shape') > -1) { + + if(objects?.indexOf('shape') > -1) { contextMenuElem.style.top = `${+(contextMenuElem.style.top.replace(/px$/, '')) - 40}px`; } } diff --git a/apps/documenteditor/mobile/src/page/main.jsx b/apps/documenteditor/mobile/src/page/main.jsx index 9eef8105eb..99781564ca 100644 --- a/apps/documenteditor/mobile/src/page/main.jsx +++ b/apps/documenteditor/mobile/src/page/main.jsx @@ -137,22 +137,29 @@ class MainPage extends Component { const isProtected = appOptions.isProtected; const isFabShow = isViewer && !disabledSettings && !disabledControls && !isDisconnected && isAvailableExt && isEdit && !isProtected; const config = appOptions.config; + const isShowPlaceholder = !appOptions.isDocReady && (!config.customization || !(config.customization.loaderName || config.customization.loaderLogo)); - let showLogo = !(config.customization && (config.customization.loaderName || config.customization.loaderLogo)); - if (!Object.keys(config).length) { - showLogo = !/&(?:logo)=/.test(window.location.search); + let isHideLogo = true, + isCustomization = true, + isBranding = true; + + if (!appOptions.isDisconnected && config?.customization) { + isCustomization = !!(config.customization && (config.customization.loaderName || config.customization.loaderLogo)); + isBranding = appOptions.canBranding || appOptions.canBrandingExt; + + if (!Object.keys(config).length) { + isCustomization = !/&(?:logo)=/.test(window.location.search); + } + + isHideLogo = isCustomization && isBranding; } - - const showPlaceholder = !appOptions.isDocReady && (!config.customization || !(config.customization.loaderName || config.customization.loaderLogo)); - const isBranding = appOptions.canBranding || appOptions.canBrandingExt; - return ( - + {/* Top Navbar */} - {(!isBranding && showLogo) && + className={`main-navbar${!isHideLogo ? ' navbar-with-logo' : ''}`}> + {!isHideLogo &&
{ window.open(`${__PUBLISHER_URL__}`, "_blank"); }}>
} @@ -168,7 +175,7 @@ class MainPage extends Component { - {showPlaceholder ? + {isShowPlaceholder ?
diff --git a/apps/documenteditor/mobile/src/store/appOptions.js b/apps/documenteditor/mobile/src/store/appOptions.js index 1d2aa0d3b2..537f7df89a 100644 --- a/apps/documenteditor/mobile/src/store/appOptions.js +++ b/apps/documenteditor/mobile/src/store/appOptions.js @@ -72,8 +72,8 @@ export class storeAppOptions { this.readerMode = !this.readerMode; } - canBrandingExt = false; - canBranding = false; + canBrandingExt = true; + canBranding = true; isDocReady = false; changeDocReady (value) { diff --git a/apps/documenteditor/mobile/src/view/Toolbar.jsx b/apps/documenteditor/mobile/src/view/Toolbar.jsx index e813b89bc6..e5de507955 100644 --- a/apps/documenteditor/mobile/src/view/Toolbar.jsx +++ b/apps/documenteditor/mobile/src/view/Toolbar.jsx @@ -62,7 +62,7 @@ const ToolbarView = props => { onRedoClick: props.onRedo })} {/*isAvailableExt && !props.disabledControls &&*/} - {((isViewer || !Device.phone) && isAvailableExt) && { + {((isViewer || !Device.phone) && isAvailableExt && !props.disabledControls) && { props.changeMobileView(); props.openOptions('snackbar'); }}>} diff --git a/apps/presentationeditor/mobile/src/controller/ContextMenu.jsx b/apps/presentationeditor/mobile/src/controller/ContextMenu.jsx index 478b8f9170..ce463fb69f 100644 --- a/apps/presentationeditor/mobile/src/controller/ContextMenu.jsx +++ b/apps/presentationeditor/mobile/src/controller/ContextMenu.jsx @@ -111,7 +111,7 @@ class ContextMenu extends ContextMenuController { const objects = this.props.objects; const contextMenuElem = document.querySelector('#idx-context-menu-popover'); - if(objects.indexOf('shape') > -1) { + if(objects?.indexOf('shape') > -1) { contextMenuElem.style.top = `${+(contextMenuElem.style.top.replace(/px$/, '')) - 40}px`; } } diff --git a/apps/presentationeditor/mobile/src/page/main.jsx b/apps/presentationeditor/mobile/src/page/main.jsx index d3e8d3af3b..9dbcb97581 100644 --- a/apps/presentationeditor/mobile/src/page/main.jsx +++ b/apps/presentationeditor/mobile/src/page/main.jsx @@ -112,23 +112,31 @@ class MainPage extends Component { render() { const appOptions = this.props.storeAppOptions; const config = appOptions.config; + const isShowPlaceholder = !appOptions.isDocReady && (!config.customization || !(config.customization.loaderName || config.customization.loaderLogo)); - let showLogo = !(config.customization && (config.customization.loaderName || config.customization.loaderLogo)); - if ( !Object.keys(config).length ) { - showLogo = !/&(?:logo)=/.test(window.location.search); + let isHideLogo = true, + isCustomization = true, + isBranding = true; + + if (!appOptions.isDisconnected && config?.customization) { + isCustomization = !!(config.customization && (config.customization.loaderName || config.customization.loaderLogo)); + isBranding = appOptions.canBranding || appOptions.canBrandingExt; + + if (!Object.keys(config).length) { + isCustomization = !/&(?:logo)=/.test(window.location.search); + } + + isHideLogo = isCustomization && isBranding; } - const showPlaceholder = !appOptions.isDocReady && (!config.customization || !(config.customization.loaderName || config.customization.loaderLogo)); - const isBranding = appOptions.canBranding || appOptions.canBrandingExt; - return ( {!this.state.previewVisible ? null : } - + {/* Top Navbar */} - {(!isBranding && showLogo) &&
{ + className={`main-navbar${!isHideLogo ? ' navbar-with-logo' : ''}`}> + {!isHideLogo &&
{ window.open(`${__PUBLISHER_URL__}`, "_blank"); }}>
} @@ -140,7 +148,7 @@ class MainPage extends Component { {/* Page content */} - {showPlaceholder ? + {isShowPlaceholder ?
diff --git a/apps/presentationeditor/mobile/src/store/appOptions.js b/apps/presentationeditor/mobile/src/store/appOptions.js index 91c0077cb5..abf97ac028 100644 --- a/apps/presentationeditor/mobile/src/store/appOptions.js +++ b/apps/presentationeditor/mobile/src/store/appOptions.js @@ -21,8 +21,8 @@ export class storeAppOptions { isEdit = false; canViewComments = false; - canBrandingExt = false; - canBranding = false; + canBrandingExt = true; + canBranding = true; config = {}; lostEditingRights = false; diff --git a/apps/spreadsheeteditor/mobile/src/controller/ContextMenu.jsx b/apps/spreadsheeteditor/mobile/src/controller/ContextMenu.jsx index 8c4bb505a0..4d4270edd3 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/ContextMenu.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/ContextMenu.jsx @@ -314,7 +314,7 @@ class ContextMenu extends ContextMenuController { const focusOn = this.props.focusOn; const contextMenuElem = document.querySelector('#idx-context-menu-popover'); - if(objects.indexOf('shape') > -1 && focusOn === 'obj') { + if(objects?.indexOf('shape') > -1 && focusOn === 'obj') { contextMenuElem.style.top = `${+(contextMenuElem.style.top.replace(/px$/, '')) - 40}px`; } } diff --git a/apps/spreadsheeteditor/mobile/src/page/main.jsx b/apps/spreadsheeteditor/mobile/src/page/main.jsx index b49c1ba358..6d0979df3c 100644 --- a/apps/spreadsheeteditor/mobile/src/page/main.jsx +++ b/apps/spreadsheeteditor/mobile/src/page/main.jsx @@ -100,31 +100,39 @@ class MainPage extends Component { }, 1); }; - render() { - const appOptions = this.props.storeAppOptions; - const storeWorksheets = this.props.storeWorksheets; - const wsProps = storeWorksheets.wsProps; - const wsLock = storeWorksheets.wsLock; - const config = appOptions.config; + render() { + const appOptions = this.props.storeAppOptions; + const storeWorksheets = this.props.storeWorksheets; + const wsProps = storeWorksheets.wsProps; + const wsLock = storeWorksheets.wsLock; + const config = appOptions.config; + const isShowPlaceholder = !appOptions.isDocReady && (!config.customization || !(config.customization.loaderName || config.customization.loaderLogo)); - let showLogo = !(config.customization && (config.customization.loaderName || config.customization.loaderLogo)); - if ( !Object.keys(config).length ) { - showLogo = !/&(?:logo)=/.test(window.location.search); - } + let isHideLogo = true, + isCustomization = true, + isBranding = true; - const showPlaceholder = !appOptions.isDocReady && (!config.customization || !(config.customization.loaderName || config.customization.loaderLogo)); - const isBranding = appOptions.canBranding || appOptions.canBrandingExt; + if (!appOptions.isDisconnected && config?.customization) { + isCustomization = !!(config.customization && (config.customization.loaderName || config.customization.loaderLogo)); + isBranding = appOptions.canBranding || appOptions.canBrandingExt; - if ( $$('.skl-container').length ) { - $$('.skl-container').remove(); - } + if (!Object.keys(config).length) { + isCustomization = !/&(?:logo)=/.test(window.location.search); + } - return ( - + isHideLogo = isCustomization && isBranding; + } + + if ($$('.skl-container').length) { + $$('.skl-container').remove(); + } + + return ( + {/* Top Navbar */} - {(!isBranding && showLogo) &&
{ + className={`main-navbar${!isHideLogo ? ' navbar-with-logo' : ''}`}> + {!isHideLogo &&
{ window.open(`${__PUBLISHER_URL__}`, "_blank"); }}>
} @@ -137,7 +145,7 @@ class MainPage extends Component { this.handleClickToOpenOptions('add', {panels: panels, button: button})}/> {/* Page content */} - {showPlaceholder ? + {isShowPlaceholder ?
@@ -181,8 +189,8 @@ class MainPage extends Component { {/* hidden component*/} - ) - } + ) + } } export default inject("storeAppOptions", "storeWorksheets")(observer(MainPage)); \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/src/store/appOptions.js b/apps/spreadsheeteditor/mobile/src/store/appOptions.js index 1e8685ccc0..0e15323217 100644 --- a/apps/spreadsheeteditor/mobile/src/store/appOptions.js +++ b/apps/spreadsheeteditor/mobile/src/store/appOptions.js @@ -11,7 +11,9 @@ export class storeAppOptions { lostEditingRights: observable, changeEditingRights: action, + canBranding: observable, + canBrandingExt: observable, isDocReady: observable, changeDocReady: action @@ -26,7 +28,9 @@ export class storeAppOptions { this.canViewComments = value; } - canBranding = undefined; + canBranding = true; + canBrandingExt = true; + lostEditingRights = false; changeEditingRights (value) { this.lostEditingRights = value;