[DE PE SSE mobile] For Bug 59658

This commit is contained in:
SergeyEzhin 2022-11-21 17:20:32 +04:00
parent a96c7a5bf4
commit 949b95f6e7
3 changed files with 49 additions and 32 deletions

View file

@ -135,12 +135,13 @@ class MainPage extends Component {
const disabledSettings = storeToolbarSettings.disabledSettings; const disabledSettings = storeToolbarSettings.disabledSettings;
const config = appOptions.config; const config = appOptions.config;
let showLogo = !(appOptions.canBrandingExt && (config.customization && (config.customization.loaderName || config.customization.loaderLogo))); let showLogo = !(config.customization && (config.customization.loaderName || config.customization.loaderLogo));
if (!Object.keys(config).length) { if (!Object.keys(config).length) {
showLogo = !/&(?:logo)=/.test(window.location.search); showLogo = !/&(?:logo)=/.test(window.location.search);
} }
const showPlaceholder = !appOptions.isDocReady && (!config.customization || !(config.customization.loaderName || config.customization.loaderLogo)); const showPlaceholder = !appOptions.isDocReady && (!config.customization || !(config.customization.loaderName || config.customization.loaderLogo));
const isBranding = appOptions.canBranding || appOptions.canBrandingExt;
if ($$('.skl-container').length) { if ($$('.skl-container').length) {
$$('.skl-container').remove(); $$('.skl-container').remove();
} }
@ -148,16 +149,20 @@ class MainPage extends Component {
return ( return (
<Page name="home" className={`editor${showLogo ? ' page-with-logo' : ''}`}> <Page name="home" className={`editor${showLogo ? ' page-with-logo' : ''}`}>
{/* Top Navbar */} {/* Top Navbar */}
<Navbar id='editor-navbar' className={`main-navbar${showLogo ? ' navbar-with-logo' : ''}`}> {config?.customization &&
{showLogo && appOptions.canBranding !== undefined && <div className="main-logo" onClick={() => { <Navbar id='editor-navbar'
window.open(`${__PUBLISHER_URL__}`, "_blank"); className={`main-navbar${(!isBranding && showLogo) ? ' navbar-with-logo' : ''}`}>
}}><Icon icon="icon-logo"></Icon></div>} {(!isBranding && showLogo) &&
<Subnavbar> <div className="main-logo" onClick={() => {
<Toolbar openOptions={this.handleClickToOpenOptions} window.open(`${__PUBLISHER_URL__}`, "_blank");
closeOptions={this.handleOptionsViewClosed}/> }}><Icon icon="icon-logo"></Icon></div>}
<Search useSuspense={false}/> <Subnavbar>
</Subnavbar> <Toolbar openOptions={this.handleClickToOpenOptions}
</Navbar> closeOptions={this.handleOptionsViewClosed}/>
<Search useSuspense={false}/>
</Subnavbar>
</Navbar>
}
{/* Page content */} {/* Page content */}

View file

@ -13,6 +13,7 @@ import ContextMenu from '../controller/ContextMenu';
import { Toolbar } from "../controller/Toolbar"; import { Toolbar } from "../controller/Toolbar";
import { AddLinkController } from '../controller/add/AddLink'; import { AddLinkController } from '../controller/add/AddLink';
import { EditLinkController } from '../controller/edit/EditLink'; import { EditLinkController } from '../controller/edit/EditLink';
class MainPage extends Component { class MainPage extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
@ -112,26 +113,32 @@ class MainPage extends Component {
const appOptions = this.props.storeAppOptions; const appOptions = this.props.storeAppOptions;
const config = appOptions.config; const config = appOptions.config;
let showLogo = !(appOptions.canBrandingExt && (config.customization && (config.customization.loaderName || config.customization.loaderLogo))); let showLogo = !(config.customization && (config.customization.loaderName || config.customization.loaderLogo));
if ( !Object.keys(config).length ) { if ( !Object.keys(config).length ) {
showLogo = !/&(?:logo)=/.test(window.location.search); showLogo = !/&(?:logo)=/.test(window.location.search);
} }
const showPlaceholder = !appOptions.isDocReady && (!config.customization || !(config.customization.loaderName || config.customization.loaderLogo)); const showPlaceholder = !appOptions.isDocReady && (!config.customization || !(config.customization.loaderName || config.customization.loaderLogo));
const isBranding = appOptions.canBranding || appOptions.canBrandingExt;
return ( return (
<Fragment> <Fragment>
{!this.state.previewVisible ? null : <Preview onclosed={this.handleOptionsViewClosed.bind(this, 'preview')} />} {!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${ showLogo ? ' page-with-logo' : ''}`}>
{/* Top Navbar */} {/* Top Navbar */}
<Navbar id='editor-navbar' className={`main-navbar${showLogo ? ' navbar-with-logo' : ''}`}> {config?.customization &&
{showLogo && appOptions.canBranding !== undefined && <div className="main-logo" onClick={() => { <Navbar id='editor-navbar'
window.open(`${__PUBLISHER_URL__}`, "_blank"); className={`main-navbar${(!isBranding && showLogo) ? ' navbar-with-logo' : ''}`}>
}}><Icon icon="icon-logo"></Icon></div>} {(!isBranding && showLogo) && <div className="main-logo" onClick={() => {
<Subnavbar> window.open(`${__PUBLISHER_URL__}`, "_blank");
<Toolbar openOptions={this.handleClickToOpenOptions} closeOptions={this.handleOptionsViewClosed}/> }}><Icon icon="icon-logo"></Icon></div>}
<Search useSuspense={false}/> <Subnavbar>
</Subnavbar> <Toolbar openOptions={this.handleClickToOpenOptions}
</Navbar> closeOptions={this.handleOptionsViewClosed}/>
<Search useSuspense={false}/>
</Subnavbar>
</Navbar>
}
{/* Page content */} {/* Page content */}
<View id="editor_sdk" /> <View id="editor_sdk" />

View file

@ -107,12 +107,14 @@ class MainPage extends Component {
const wsLock = storeWorksheets.wsLock; const wsLock = storeWorksheets.wsLock;
const config = appOptions.config; const config = appOptions.config;
let showLogo = !(appOptions.canBrandingExt && (config.customization && (config.customization.loaderName || config.customization.loaderLogo))); let showLogo = !(config.customization && (config.customization.loaderName || config.customization.loaderLogo));
if ( !Object.keys(config).length ) { if ( !Object.keys(config).length ) {
showLogo = !/&(?:logo)=/.test(window.location.search); showLogo = !/&(?:logo)=/.test(window.location.search);
} }
const showPlaceholder = !appOptions.isDocReady && (!config.customization || !(config.customization.loaderName || config.customization.loaderLogo)); const showPlaceholder = !appOptions.isDocReady && (!config.customization || !(config.customization.loaderName || config.customization.loaderLogo));
const isBranding = appOptions.canBranding || appOptions.canBrandingExt;
if ( $$('.skl-container').length ) { if ( $$('.skl-container').length ) {
$$('.skl-container').remove(); $$('.skl-container').remove();
} }
@ -120,16 +122,19 @@ class MainPage extends Component {
return ( return (
<Page name="home" className={`editor${ showLogo ? ' page-with-logo' : ''}`}> <Page name="home" className={`editor${ showLogo ? ' page-with-logo' : ''}`}>
{/* Top Navbar */} {/* Top Navbar */}
<Navbar id='editor-navbar' className={`main-navbar${showLogo ? ' navbar-with-logo' : ''}`}> {config?.customization &&
{showLogo && appOptions.canBranding !== undefined && <div className="main-logo" onClick={ <Navbar id='editor-navbar'
() => { className={`main-navbar${(!isBranding && showLogo) ? ' navbar-with-logo' : ''}`}>
window.open(`${__PUBLISHER_URL__}`, "_blank"); {(!isBranding && showLogo) && <div className="main-logo" onClick={() => {
}}><Icon icon="icon-logo"></Icon></div>} window.open(`${__PUBLISHER_URL__}`, "_blank");
<Subnavbar> }}><Icon icon="icon-logo"></Icon></div>}
<Toolbar openOptions={this.handleClickToOpenOptions} closeOptions={this.handleOptionsViewClosed}/> <Subnavbar>
<Search useSuspense={false}/> <Toolbar openOptions={this.handleClickToOpenOptions}
</Subnavbar> closeOptions={this.handleOptionsViewClosed}/>
</Navbar> <Search useSuspense={false}/>
</Subnavbar>
</Navbar>
}
<CellEditor onClickToOpenAddOptions={(panels, button) => this.handleClickToOpenOptions('add', {panels: panels, button: button})}/> <CellEditor onClickToOpenAddOptions={(panels, button) => this.handleClickToOpenOptions('add', {panels: panels, button: button})}/>
{/* Page content */} {/* Page content */}
<View id="editor_sdk" /> <View id="editor_sdk" />