1
0
mirror of https://github.com/stolksdorf/homebrewery.git synced 2025-12-22 16:21:29 +00:00

Remove chrome warnings from after rebase

This commit is contained in:
Scott Tolksdorf
2017-01-22 12:55:00 -05:00
parent 894e345a44
commit 1aa79b32d9
3 changed files with 18 additions and 42 deletions

View File

@@ -5,26 +5,6 @@ const Nav = require('naturalcrit/nav/nav.jsx');
const Store = require('homebrewery/brew.store.js'); const Store = require('homebrewery/brew.store.js');
const Navbar = React.createClass({ const Navbar = React.createClass({
getInitialState: function() {
return {
showNonChromeWarning : false,
};
},
componentDidMount: function() {
//const isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
this.setState({
showNonChromeWarning : !isChrome,
})
},
renderChromeWarning : function(){
if(!this.state.showNonChromeWarning) return;
return <Nav.item className='warning' icon='fa-exclamation-triangle'>
Optimized for Chrome
<div className='dropdown'>
If you are experiencing rendering issues, use Chrome instead
</div>
</Nav.item>
},
render : function(){ render : function(){
return <Nav.base> return <Nav.base>
<Nav.section> <Nav.section>
@@ -33,8 +13,6 @@ const Navbar = React.createClass({
<div>The Homebrewery</div> <div>The Homebrewery</div>
</Nav.item> </Nav.item>
<Nav.item>{`v${Store.getVersion()}`}</Nav.item> <Nav.item>{`v${Store.getVersion()}`}</Nav.item>
{/*this.renderChromeWarning()*/}
</Nav.section> </Nav.section>
{this.props.children} {this.props.children}
</Nav.base> </Nav.base>

View File

@@ -102,29 +102,27 @@ const BrewEditor = React.createClass({
this.highlightPageLines(); this.highlightPageLines();
return( return<div className='brewEditor' ref='main'>
<div className='brewEditor' ref='main'> <SnippetBar
<SnippetBar brew={this.props.value}
brew={this.props.value} onInject={this.handleInject}
onInject={this.handleInject} onToggle={this.handgleToggle}
onToggle={this.handgleToggle} showmeta={this.state.showMetadataEditor} />
showmeta={this.state.showMetadataEditor} /> {this.renderMetadataEditor()}
{this.renderMetadataEditor()} <CodeEditor
<CodeEditor ref='codeEditor'
ref='codeEditor' wrap={true}
wrap={true} language='gfm'
language='gfm' value={this.props.value}
value={this.props.value} onChange={this.handleTextChange}
onChange={this.handleTextChange} onCursorActivity={this.handleCursorActivty} />
onCursorActivity={this.handleCursorActivty} /> </div>
</div>
{/* /*
<div className='brewJump' onClick={this.brewJump}> <div className='brewJump' onClick={this.brewJump}>
<i className='fa fa-arrow-right' /> <i className='fa fa-arrow-right' />
</div> </div>
*/} */
);
} }
}); });

View File

@@ -132,7 +132,7 @@ describe('Middleware', () => {
.expect(200); .expect(200);
}); });
it('should block you if basic auth is wrong', () => { it('should block you if basic auth is wrong', () => {
app.use(mw.adminAuth); app.use(mw.adminLogin);
app.use(requestHandler); app.use(requestHandler);
app.use(Error.expressHandler); app.use(Error.expressHandler);
return request(app).get('/') return request(app).get('/')