move exit to header

This commit is contained in:
Jeremy Kauffman 2016-08-07 18:25:29 -04:00 committed by Alex Liebowitz
parent 2ec42aad26
commit 7b18774e81
4 changed files with 16 additions and 4 deletions

View file

@ -23,7 +23,6 @@ var Drawer = React.createClass({
}.bind(this));
},
render: function() {
var isLinux = /linux/i.test(navigator.userAgent); // @TODO: find a way to use getVersionInfo() here without messy state management
return (
<nav id="drawer">
<div id="drawer-handle">
@ -36,7 +35,6 @@ var Drawer = React.createClass({
<DrawerItem href="/?wallet" viewingPage={this.props.viewingPage} label={ lbry.formatCredits(this.state.balance) } icon="icon-bank" />
<DrawerItem href='/?settings' viewingPage={this.props.viewingPage} label="Settings" icon='icon-gear' />
<DrawerItem href='/?help' viewingPage={this.props.viewingPage} label="Help" icon='icon-question-circle' />
{isLinux ? <DrawerItem href="/?start" viewingPage={this.props.viewingPage} label="Exit LBRY" icon="icon-close" /> : null}
</nav>
);
}

View file

@ -13,9 +13,11 @@ var Header = React.createClass({
);
},
render: function() {
var isLinux = /linux/i.test(navigator.userAgent); // @TODO: find a way to use getVersionInfo() here without messy state management
return (
<header id="header">
<Link onClick={this.props.onOpenDrawer} icon="icon-bars" className="open-drawer-link" />
{isLinux ? <Link href="/?start" icon="icon-close" className="close-lbry-link" /> : null}
<h1>{ this.state.title }</h1>
</header>
);

View file

@ -2,10 +2,13 @@ var StartPage = React.createClass({
componentWillMount: function() {
lbry.stop();
},
componentDidMount: function() {
document.title = "LBRY is Closed";
},
render: function() {
return (
<main className="page">
<h1>LBRY has closed</h1>
<h3>LBRY is Closed</h3>
<Link href="lbry://lbry" label="Click here to start LBRY" />
</main>
);

View file

@ -70,15 +70,24 @@ body
#main-content
{
background: $color-canvas;
min-height: 100vh;
}
$header-icon-size: 1.5em;
.open-drawer-link, .close-drawer-link
{
display: inline-block;
font-size: 1.5em;
font-size: $header-icon-size;
padding: 0 18px 0 6px;
float: left;
}
.close-lbry-link
{
font-size: $header-icon-size;
float: right;
padding: 0 6px 0 18px;
}
.page {
margin-left: auto;