mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-06 20:52:40 +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:
@@ -189,7 +189,7 @@ const BrewRenderer = (props)=>{
|
||||
}
|
||||
let themePath = props.theme ?? '5ePHB';
|
||||
const Themes = { ...staticThemes, ...props.userThemes };
|
||||
let baseThemePath = Themes[rendererPath][themePath]?.baseTheme;
|
||||
let baseThemePath = (themePath && themePath[0] !== '#') ? Themes[rendererPath][themePath]?.baseTheme : 'Brew';
|
||||
|
||||
// Override static theme values if a Brew theme.
|
||||
|
||||
@@ -201,7 +201,6 @@ const BrewRenderer = (props)=>{
|
||||
}
|
||||
|
||||
if(rendererPath == '') {
|
||||
baseThemePath = 'Brew';
|
||||
baseRendererPath = '';
|
||||
} else {
|
||||
baseRendererPath += '/';
|
||||
|
||||
Reference in New Issue
Block a user