Simplify status + content display (#7264)

This commit is contained in:
Jaco Greeff 2017-12-12 11:25:57 +01:00 committed by GitHub
parent 50ed1f9d1e
commit 11b0cb8da8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 55 additions and 61 deletions

View File

@ -19,7 +19,9 @@
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
min-height: 100vh; height: 100vh;
overflow: hidden;
width: 100%;
.logo { .logo {
top: 0; top: 0;
@ -27,8 +29,8 @@
left: 0; left: 0;
bottom: 0; bottom: 0;
opacity: 0.2; opacity: 0.2;
position: fixed; position: absolute;
padding: 7em; padding: 2em;
text-align: center; text-align: center;
z-index: 0; z-index: 0;
@ -37,21 +39,24 @@
margin: 0 auto; margin: 0 auto;
} }
} }
}
.container { .content {
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
flex-grow: 1; flex-grow: 1;
flex-direction: column; overflow: hidden;
} position: relative;
.content { > div:not(.logo) {
padding: 0; display: flex;
} flex-grow: 1;
overflow-y: scroll;
}
}
.error { .error {
padding: 2em; padding: 2em;
background: red; background: red;
color: white; color: white;
}
} }

View File

@ -109,32 +109,30 @@ class Application extends Component {
renderApp () { renderApp () {
const { children } = this.props; const { children } = this.props;
return ( return [
<div className={ styles.container }> <Extension key='extension' />,
<Extension /> <FirstRun key='firstrun' />,
<FirstRun /> <Snackbar key='snackbar' />,
<Snackbar /> <UpgradeParity key='upgrade' upgradeStore={ this.upgradeStore } />,
<UpgradeParity upgradeStore={ this.upgradeStore } /> <Errors key='errors' />,
<Errors /> <div key='content' className={ styles.content }>
<div className={ styles.content }> { children }
{ children }
</div>
</div> </div>
); ];
} }
renderMinimized () { renderMinimized () {
const { children } = this.props; const { children } = this.props;
return ( return [
<div className={ styles.container }> <Errors key='errors' />,
<div key='content' className={ styles.content }>
<div className={ styles.logo }> <div className={ styles.logo }>
<img src={ parityLogo } /> <img src={ parityLogo } />
</div> </div>
<Errors />
{ children } { children }
</div> </div>
); ];
} }
} }

View File

@ -15,22 +15,20 @@
/* along with Parity. If not, see <http://www.gnu.org/licenses/>. /* along with Parity. If not, see <http://www.gnu.org/licenses/>.
*/ */
.frame { .frame,
.full {
background: white; background: white;
box-sizing: border-box; box-sizing: border-box;
border: 0; border: 0;
flex-grow: 1; flex-grow: 1;
margin: 0;
padding: 0;
opacity: 0; opacity: 0;
width: 100%; width: 100%;
z-index: 1; z-index: 1;
} }
.full { .full {
width: 100vw;
height: 100vh;
margin: 0;
padding: 0;
background: white;
font-family: 'Roboto', sans-serif; font-family: 'Roboto', sans-serif;
font-size: 16px; font-size: 16px;
font-weight: 300; font-weight: 300;

View File

@ -50,19 +50,17 @@ class Dapps extends Component {
const applications = [].concat(this.store.visibleLocal, this.store.visibleViews, this.store.visibleBuiltin, this.store.visibleNetwork); const applications = [].concat(this.store.visibleLocal, this.store.visibleViews, this.store.visibleBuiltin, this.store.visibleNetwork);
return ( return (
<Page> <Page className={ styles.dapps }>
<div className={ styles.dapps }> {
{ applications.map((app, index) => (
applications.map((app, index) => ( <DappCard
<DappCard app={ app }
app={ app } availability={ availability }
availability={ availability } className={ styles.dapp }
className={ styles.dapp } key={ `${index}_${app.id}` }
key={ `${index}_${app.id}` } />
/> ))
)) }
}
</div>
{ {
this.store.externalOverlayVisible this.store.externalOverlayVisible
? ( ? (

View File

@ -16,6 +16,7 @@
*/ */
$textColor: #ccc; $textColor: #ccc;
$statusHeight: 2.75em;
.home { .home {
color: $textColor !important; color: $textColor !important;
@ -26,15 +27,9 @@ $textColor: #ccc;
.container { .container {
flex: 0; flex: 0;
box-sizing: border-box; box-sizing: border-box;
height: 2.75em;
.fixed { .bar {
box-sizing: border-box; height: $statusHeight;
position: fixed;
top: 0;
right: 0;
left: 0;
height: 2.75em;
z-index: 1000; z-index: 1000;
border-bottom: 1px solid #405161; border-bottom: 1px solid #405161;
color: $textColor; color: $textColor;

View File

@ -44,7 +44,7 @@ function Status ({ className = '', upgradeStore }, { api }) {
return ( return (
<div className={ `${styles.container} ${className}` }> <div className={ `${styles.container} ${className}` }>
<GradientBg className={ styles.fixed }> <GradientBg className={ styles.bar }>
<div className={ styles.status }> <div className={ styles.status }>
<a href='#/' className={ styles.home }> <a href='#/' className={ styles.home }>
<HomeIcon /> <HomeIcon />
@ -93,8 +93,8 @@ function Status ({ className = '', upgradeStore }, { api }) {
<NetChain className={ styles.chain } /> <NetChain className={ styles.chain } />
</div> </div>
</div> </div>
<SyncWarning className={ styles.warning } />
</GradientBg> </GradientBg>
<SyncWarning className={ styles.warning } />
</div> </div>
); );
} }