mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-13 13:02:45 +00:00
Added smart componenets, page line number highlighting
This commit is contained in:
@@ -8,9 +8,11 @@ module.exports = function(props){
|
||||
</Nav.item>
|
||||
}
|
||||
let url = '';
|
||||
/*
|
||||
if(typeof window !== 'undefined'){
|
||||
url = window.location.href
|
||||
}
|
||||
*/
|
||||
return <Nav.item href={`http://naturalcrit.com/login?redirect=${url}`} color='teal' icon='fa-sign-in'>
|
||||
login
|
||||
</Nav.item>
|
||||
|
||||
@@ -2,24 +2,20 @@ const React = require('react');
|
||||
const _ = require('lodash');
|
||||
|
||||
const Nav = require('naturalcrit/nav/nav.jsx');
|
||||
const Store = require('homebrewery/brew.store.js');
|
||||
|
||||
const Navbar = React.createClass({
|
||||
getInitialState: function() {
|
||||
return {
|
||||
//showNonChromeWarning : false,
|
||||
ver : '0.0.0'
|
||||
showNonChromeWarning : false,
|
||||
};
|
||||
},
|
||||
|
||||
componentDidMount: function() {
|
||||
//const isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
|
||||
this.setState({
|
||||
//showNonChromeWarning : !isChrome,
|
||||
ver : window.version
|
||||
showNonChromeWarning : !isChrome,
|
||||
})
|
||||
},
|
||||
|
||||
/*
|
||||
renderChromeWarning : function(){
|
||||
if(!this.state.showNonChromeWarning) return;
|
||||
return <Nav.item className='warning' icon='fa-exclamation-triangle'>
|
||||
@@ -29,7 +25,6 @@ const Navbar = React.createClass({
|
||||
</div>
|
||||
</Nav.item>
|
||||
},
|
||||
*/
|
||||
render : function(){
|
||||
return <Nav.base>
|
||||
<Nav.section>
|
||||
@@ -37,7 +32,7 @@ const Navbar = React.createClass({
|
||||
<Nav.item href='/' className='homebrewLogo'>
|
||||
<div>The Homebrewery</div>
|
||||
</Nav.item>
|
||||
<Nav.item>{`v${this.state.ver}`}</Nav.item>
|
||||
<Nav.item>{`v${Store.getVersion()}`}</Nav.item>
|
||||
|
||||
{/*this.renderChromeWarning()*/}
|
||||
</Nav.section>
|
||||
|
||||
Reference in New Issue
Block a user