mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-09 09:22:38 +00:00
Fixed saving authors and systems to brews
This commit is contained in:
10
changelog.md
10
changelog.md
@@ -1,10 +1,12 @@
|
|||||||
# changelog
|
# changelog
|
||||||
|
|
||||||
### Tuesday, 17/01/2017 - v2.7cont
|
### Thursday, 19/01/2017 - v2.7.0
|
||||||
- Added in code position to brew page jumping
|
- Fixed saving multiple authors and multiple systems on brew metadata (thanks u/PalaNolho re:282)
|
||||||
|
- Adding in line highlight for new pages
|
||||||
|
|
||||||
### Saturday, 14/01/2017 - v2.7.0cont
|
|
||||||
- - Added a new Render Warning overlay. It detects situations where the brew may not be rendering correctly (wrong browser, browser is zoomed in...) and let's the user know
|
### Saturday, 14/01/2017 - v2.7.0
|
||||||
|
- Added a new Render Warning overlay. It detects situations where the brew may not be rendering correctly (wrong browser, browser is zoomed in...) and let's the user know
|
||||||
|
|
||||||
|
|
||||||
### Sunday, 25/12/2016 - v2.7.0
|
### Sunday, 25/12/2016 - v2.7.0
|
||||||
|
|||||||
@@ -73,6 +73,22 @@ const Editor = React.createClass({
|
|||||||
return r;
|
return r;
|
||||||
}, 1);
|
}, 1);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
highlightPageLines : function(){
|
||||||
|
if(!this.refs.codeEditor) return;
|
||||||
|
const codeMirror = this.refs.codeEditor.codeMirror;
|
||||||
|
|
||||||
|
const lineNumbers = _.reduce(this.props.value.split('\n'), (r, line, lineNumber)=>{
|
||||||
|
if(line.indexOf('\\page') !== -1){
|
||||||
|
codeMirror.addLineClass(lineNumber, 'background', 'pageLine');
|
||||||
|
r.push(lineNumber);
|
||||||
|
}
|
||||||
|
return r;
|
||||||
|
}, []);
|
||||||
|
return lineNumbers
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
brewJump : function(){
|
brewJump : function(){
|
||||||
const currentPage = this.getCurrentPage();
|
const currentPage = this.getCurrentPage();
|
||||||
window.location.hash = 'p' + currentPage;
|
window.location.hash = 'p' + currentPage;
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ const Snippetbar = React.createClass({
|
|||||||
{this.renderSnippetGroups()}
|
{this.renderSnippetGroups()}
|
||||||
<div className={cx('toggleMeta', {selected: this.props.showmeta})}
|
<div className={cx('toggleMeta', {selected: this.props.showmeta})}
|
||||||
onClick={this.props.onToggle}>
|
onClick={this.props.onToggle}>
|
||||||
<i className='fa fa-settings' />
|
<i className='fa fa-bars' />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,10 @@ router.put('/api/update/:id', (req, res)=>{
|
|||||||
brew = _.merge(brew, req.body);
|
brew = _.merge(brew, req.body);
|
||||||
brew.updatedAt = new Date();
|
brew.updatedAt = new Date();
|
||||||
if(req.account) brew.authors = _.uniq(_.concat(brew.authors, req.account.username));
|
if(req.account) brew.authors = _.uniq(_.concat(brew.authors, req.account.username));
|
||||||
|
|
||||||
|
brew.markModified('authors');
|
||||||
|
brew.markModified('systems');
|
||||||
|
|
||||||
brew.save((err, obj)=>{
|
brew.save((err, obj)=>{
|
||||||
if(err) throw err;
|
if(err) throw err;
|
||||||
return res.status(200).send(obj);
|
return res.status(200).send(obj);
|
||||||
|
|||||||
Reference in New Issue
Block a user