[DE mobile] Add check to show logo in navbar
This commit is contained in:
parent
eb6a25140d
commit
87fb7fe1bd
|
@ -9,7 +9,10 @@
|
|||
@autoColor: @black;
|
||||
|
||||
.navbar.main-navbar {
|
||||
height: 26px;
|
||||
height: 0;
|
||||
&.navbar-with-logo {
|
||||
height: 26px;
|
||||
}
|
||||
.navbar-inner {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
@ -22,8 +25,13 @@
|
|||
}
|
||||
}
|
||||
|
||||
.page.page-with-subnavbar .page-content {
|
||||
--f7-page-subnavbar-offset: 26px;
|
||||
.page.page-with-subnavbar {
|
||||
.page-content {
|
||||
--f7-page-subnavbar-offset: 0px;
|
||||
}
|
||||
&.page-with-logo .page-content {
|
||||
--f7-page-subnavbar-offset: 26px;
|
||||
}
|
||||
}
|
||||
|
||||
.popup, .popover, .sheet-modal {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import React, { Component } from 'react';
|
||||
import { f7 } from 'framework7-react';
|
||||
import { Page, View, Navbar, Subnavbar, Icon } from 'framework7-react';
|
||||
import { inject } from "mobx-react";
|
||||
import { observer, inject } from "mobx-react";
|
||||
|
||||
import EditOptions from '../view/edit/Edit';
|
||||
import AddOptions from '../view/add/Add';
|
||||
|
@ -13,7 +13,7 @@ import { Search, SearchSettings } from '../controller/Search';
|
|||
import ContextMenu from '../controller/ContextMenu';
|
||||
import { Toolbar } from "../controller/Toolbar";
|
||||
|
||||
export default class MainPage extends Component {
|
||||
class MainPage extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
|
@ -62,14 +62,17 @@ export default class MainPage extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const appOptions = this.props.storeAppOptions;
|
||||
const config = appOptions.config;
|
||||
const showLogo = !(appOptions.canBrandingExt && (config.customization && (config.customization.loaderName || config.customization.loaderLogo)));
|
||||
return (
|
||||
<Page name="home">
|
||||
<Page name="home" className={showLogo && 'page-with-logo'}>
|
||||
{/* Top Navbar */}
|
||||
<Navbar id='editor-navbar' className='main-navbar'>
|
||||
<div className="main-logo"><Icon icon="icon-logo"></Icon></div>
|
||||
<Navbar id='editor-navbar' className={`main-navbar${showLogo ? ' navbar-with-logo' : ''}`}>
|
||||
{showLogo && <div className="main-logo"><Icon icon="icon-logo"></Icon></div>}
|
||||
<Subnavbar>
|
||||
<Toolbar openOptions={this.handleClickToOpenOptions} closeOptions={this.handleOptionsViewClosed}/>
|
||||
<Search useSuspense={false} />
|
||||
<Toolbar openOptions={this.handleClickToOpenOptions} closeOptions={this.handleOptionsViewClosed}/>
|
||||
<Search useSuspense={false}/>
|
||||
</Subnavbar>
|
||||
</Navbar>
|
||||
{/* Page content */}
|
||||
|
@ -100,4 +103,6 @@ export default class MainPage extends Component {
|
|||
</Page>
|
||||
)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export default inject("storeAppOptions")(observer(MainPage));
|
|
@ -16,7 +16,9 @@ export class storeAppOptions {
|
|||
changeEditingRights: action,
|
||||
|
||||
readerMode: observable,
|
||||
changeReaderMode: action
|
||||
changeReaderMode: action,
|
||||
|
||||
canBrandingExt: observable
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -35,6 +37,8 @@ export class storeAppOptions {
|
|||
this.readerMode = !this.readerMode;
|
||||
}
|
||||
|
||||
canBrandingExt = false;
|
||||
|
||||
config = {};
|
||||
setConfigOptions (config) {
|
||||
this.config = config;
|
||||
|
|
Loading…
Reference in a new issue