mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-07 07:42:39 +00:00
Brew Theme Fixes.
This adds the User Brew themes, where applicible, to the /new path. This adds a semi-graceful failure to the metadata panel when a Brew Theme is declared as used but is not present. More gracefully handles loading with themes not present.
This commit is contained in:
@@ -215,7 +215,8 @@ const MetadataEditor = createClass({
|
||||
};
|
||||
|
||||
const currentThemePath = this.props.metadata?.theme && this.props.metadata.theme[0] === '#' ? 'Brew' : this.props.metadata.renderer;
|
||||
const currentTheme = mergedThemes[`${_.upperFirst(currentThemePath)}`][this.props.metadata.theme];
|
||||
// const currentTheme = mergedThemes[`${_.upperFirst(currentThemePath)}`][this.props.metadata.theme];
|
||||
const currentTheme = mergedThemes[`${_.upperFirst(currentThemePath)}`].hasOwnProperty(this.props.metadata.theme) ? mergedThemes[`${_.upperFirst(currentThemePath)}`][this.props.metadata.theme] : { name: `!!! THEME MISSING !!! ID=${this.props.metadata.theme.slice(1)}`};
|
||||
let dropdown;
|
||||
|
||||
if(this.props.metadata.renderer == 'legacy') {
|
||||
|
||||
Reference in New Issue
Block a user