mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-25 08:16:10 +08:00
Merge pull request #2256 from ONLYOFFICE/feature/fix-bugs
[DE PE SSE mobile] For Bug 59658
This commit is contained in:
11
apps/common/mobile/resources/css/skeleton.css
vendored
11
apps/common/mobile/resources/css/skeleton.css
vendored
@ -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);
|
||||
}
|
||||
--f7-subnavbar-height: 56px;
|
||||
}
|
||||
|
||||
@ -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`;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 (
|
||||
<Page name="home" className={`editor${showLogo ? ' page-with-logo' : ''}`}>
|
||||
<Page name="home" className={`editor${!isHideLogo ? ' page-with-logo' : ''}`}>
|
||||
{/* Top Navbar */}
|
||||
<Navbar id='editor-navbar'
|
||||
className={`main-navbar${(!isBranding && showLogo) ? ' navbar-with-logo' : ''}`}>
|
||||
{(!isBranding && showLogo) &&
|
||||
className={`main-navbar${!isHideLogo ? ' navbar-with-logo' : ''}`}>
|
||||
{!isHideLogo &&
|
||||
<div className="main-logo" onClick={() => {
|
||||
window.open(`${__PUBLISHER_URL__}`, "_blank");
|
||||
}}><Icon icon="icon-logo"></Icon></div>}
|
||||
@ -168,7 +175,7 @@ class MainPage extends Component {
|
||||
<View id="editor_sdk">
|
||||
</View>
|
||||
|
||||
{showPlaceholder ?
|
||||
{isShowPlaceholder ?
|
||||
<div className="doc-placeholder-container">
|
||||
<div className="doc-placeholder">
|
||||
<div className="line"></div>
|
||||
|
||||
@ -72,8 +72,8 @@ export class storeAppOptions {
|
||||
this.readerMode = !this.readerMode;
|
||||
}
|
||||
|
||||
canBrandingExt = false;
|
||||
canBranding = false;
|
||||
canBrandingExt = true;
|
||||
canBranding = true;
|
||||
|
||||
isDocReady = false;
|
||||
changeDocReady (value) {
|
||||
|
||||
@ -62,7 +62,7 @@ const ToolbarView = props => {
|
||||
onRedoClick: props.onRedo
|
||||
})}
|
||||
{/*isAvailableExt && !props.disabledControls &&*/}
|
||||
{((isViewer || !Device.phone) && isAvailableExt) && <Link className={props.disabledControls && 'disabled'} icon={isMobileView ? 'icon-standard-view' : 'icon-mobile-view'} href={false} onClick={() => {
|
||||
{((isViewer || !Device.phone) && isAvailableExt && !props.disabledControls) && <Link icon={isMobileView ? 'icon-standard-view' : 'icon-mobile-view'} href={false} onClick={() => {
|
||||
props.changeMobileView();
|
||||
props.openOptions('snackbar');
|
||||
}}></Link>}
|
||||
|
||||
@ -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`;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 (
|
||||
<Fragment>
|
||||
{!this.state.previewVisible ? null : <Preview onclosed={this.handleOptionsViewClosed.bind(this, 'preview')} />}
|
||||
<Page name="home" className={`editor${ showLogo ? ' page-with-logo' : ''}`}>
|
||||
<Page name="home" className={`editor${!isHideLogo ? ' page-with-logo' : ''}`}>
|
||||
{/* Top Navbar */}
|
||||
<Navbar id='editor-navbar'
|
||||
className={`main-navbar${(!isBranding && showLogo) ? ' navbar-with-logo' : ''}`}>
|
||||
{(!isBranding && showLogo) && <div className="main-logo" onClick={() => {
|
||||
className={`main-navbar${!isHideLogo ? ' navbar-with-logo' : ''}`}>
|
||||
{!isHideLogo && <div className="main-logo" onClick={() => {
|
||||
window.open(`${__PUBLISHER_URL__}`, "_blank");
|
||||
}}><Icon icon="icon-logo"></Icon></div>}
|
||||
<Subnavbar>
|
||||
@ -140,7 +148,7 @@ class MainPage extends Component {
|
||||
{/* Page content */}
|
||||
<View id="editor_sdk" />
|
||||
|
||||
{showPlaceholder ?
|
||||
{isShowPlaceholder ?
|
||||
<div className="doc-placeholder">
|
||||
<div className="slide-h">
|
||||
<div className="slide-v">
|
||||
|
||||
@ -21,8 +21,8 @@ export class storeAppOptions {
|
||||
|
||||
isEdit = false;
|
||||
canViewComments = false;
|
||||
canBrandingExt = false;
|
||||
canBranding = false;
|
||||
canBrandingExt = true;
|
||||
canBranding = true;
|
||||
config = {};
|
||||
|
||||
lostEditingRights = false;
|
||||
|
||||
@ -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`;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 (
|
||||
<Page name="home" className={`editor${ showLogo ? ' page-with-logo' : ''}`}>
|
||||
isHideLogo = isCustomization && isBranding;
|
||||
}
|
||||
|
||||
if ($$('.skl-container').length) {
|
||||
$$('.skl-container').remove();
|
||||
}
|
||||
|
||||
return (
|
||||
<Page name="home" className={`editor${!isHideLogo ? ' page-with-logo' : ''}`}>
|
||||
{/* Top Navbar */}
|
||||
<Navbar id='editor-navbar'
|
||||
className={`main-navbar${(!isBranding && showLogo) ? ' navbar-with-logo' : ''}`}>
|
||||
{(!isBranding && showLogo) && <div className="main-logo" onClick={() => {
|
||||
className={`main-navbar${!isHideLogo ? ' navbar-with-logo' : ''}`}>
|
||||
{!isHideLogo && <div className="main-logo" onClick={() => {
|
||||
window.open(`${__PUBLISHER_URL__}`, "_blank");
|
||||
}}><Icon icon="icon-logo"></Icon></div>}
|
||||
<Subnavbar>
|
||||
@ -137,7 +145,7 @@ class MainPage extends Component {
|
||||
<CellEditor onClickToOpenAddOptions={(panels, button) => this.handleClickToOpenOptions('add', {panels: panels, button: button})}/>
|
||||
{/* Page content */}
|
||||
<View id="editor_sdk" />
|
||||
{showPlaceholder ?
|
||||
{isShowPlaceholder ?
|
||||
<div className="doc-placeholder">
|
||||
<div className="columns"></div>
|
||||
<div className="columns"></div>
|
||||
@ -181,8 +189,8 @@ class MainPage extends Component {
|
||||
|
||||
<FunctionGroups /> {/* hidden component*/}
|
||||
</Page>
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default inject("storeAppOptions", "storeWorksheets")(observer(MainPage));
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user