0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-10 17:52:47 +00:00

Added a quick build task and created the warnings component

This commit is contained in:
Scott Tolksdorf
2017-01-14 13:53:09 -08:00
parent 306e4f024c
commit 6e86d9c123
8 changed files with 121 additions and 12 deletions

View File

@@ -6,19 +6,20 @@ const Nav = require('naturalcrit/nav/nav.jsx');
const Navbar = React.createClass({
getInitialState: function() {
return {
showNonChromeWarning : false,
//showNonChromeWarning : false,
ver : '0.0.0'
};
},
componentDidMount: function() {
const isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
//const isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
this.setState({
showNonChromeWarning : !isChrome,
//showNonChromeWarning : !isChrome,
ver : window.version
})
},
/*
renderChromeWarning : function(){
if(!this.state.showNonChromeWarning) return;
return <Nav.item className='warning' icon='fa-exclamation-triangle'>
@@ -28,7 +29,7 @@ const Navbar = React.createClass({
</div>
</Nav.item>
},
*/
render : function(){
return <Nav.base>
<Nav.section>
@@ -38,7 +39,7 @@ const Navbar = React.createClass({
</Nav.item>
<Nav.item>{`v${this.state.ver}`}</Nav.item>
{this.renderChromeWarning()}
{/*this.renderChromeWarning()*/}
</Nav.section>
{this.props.children}
</Nav.base>

View File

@@ -1,4 +1,4 @@
@navbarHeight : 28px;
.homebrew nav{
.homebrewLogo{
.animate(color);