0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-31 15:12:39 +00:00

Partial implementation

This commit is contained in:
David Bolack
2024-11-01 14:02:27 -05:00
parent bb057ba057
commit 4448410c3e
6 changed files with 75 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ const _ = require('lodash');
const cx = require('classnames');
import { loadHistory } from '../../utils/versionHistory.js';
import { brewSnippetsToJSON } from '../../../../shared/helpers.js';
//Import all themes
const ThemeSnippets = {};
@@ -114,6 +115,9 @@ const Snippetbar = createClass({
oldSnippets = _.keyBy(compiledSnippets, 'groupName');
}
const userSnippetsasJSON = brewSnippetsToJSON(this.props.brew.title, this.props.brew.snippets, this.props.snippetsBundle);
compiledSnippets.push(userSnippetsasJSON);
return compiledSnippets;
},

View File

@@ -61,6 +61,7 @@ const EditPage = createClass({
currentEditorCursorPageNum : 1,
currentBrewRendererPageNum : 1,
displayLockMessage : this.props.brew.lock || false,
snippetsBundle : {},
themeBundle : {}
};
},
@@ -440,6 +441,7 @@ const EditPage = createClass({
reportError={this.errorReported}
renderer={this.state.brew.renderer}
userThemes={this.props.userThemes}
snippets={this.props.snippets}
snippetBundle={this.state.themeBundle.snippets}
updateBrew={this.updateBrew}
onCursorPageChange={this.handleEditorCursorPageChange}