mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-10 02:42:43 +00:00
Reorder snippets
This commit is contained in:
@@ -151,7 +151,6 @@ const MetadataEditor = createClass({
|
|||||||
renderThemeDropdown : function(){
|
renderThemeDropdown : function(){
|
||||||
const listThemes = (renderer)=>{
|
const listThemes = (renderer)=>{
|
||||||
return _.map(_.values(Themes[renderer]), (theme)=>{
|
return _.map(_.values(Themes[renderer]), (theme)=>{
|
||||||
console.log(theme);
|
|
||||||
return <div className='item' key={''} onClick={()=>this.handleTheme(theme)} title={''}>
|
return <div className='item' key={''} onClick={()=>this.handleTheme(theme)} title={''}>
|
||||||
{`${theme.renderer} : ${theme.name}`}
|
{`${theme.renderer} : ${theme.name}`}
|
||||||
<img src={`/themes/${theme.renderer}/${theme.path}/dropdownTexture.png`}/>
|
<img src={`/themes/${theme.renderer}/${theme.path}/dropdownTexture.png`}/>
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ const Snippetbar = createClass({
|
|||||||
|
|
||||||
mergeCustomizer : function(valueA, valueB, key) {
|
mergeCustomizer : function(valueA, valueB, key) {
|
||||||
if(key == "snippets") {
|
if(key == "snippets") {
|
||||||
const result = _.unionBy(valueB, valueA, 'name'); // Join snippets together, with preference for the current theme over the base theme
|
const result = _.reverse(_.unionBy(_.reverse(valueB), _.reverse(valueA), 'name')); // Join snippets together, with preference for the current theme over the base theme
|
||||||
return _.filter(result, 'gen'); //Only keep snippets with a 'gen' property.
|
return _.filter(result, 'gen'); //Only keep snippets with a 'gen' property.
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user