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

Merge branch 'master' into brew_themes_user_selection

Fixes a regression for legacy brews.
This commit is contained in:
David Bolack
2024-07-07 12:03:15 -05:00
6 changed files with 65 additions and 41 deletions

View File

@@ -189,12 +189,14 @@ const BrewRenderer = (props)=>{
};
let brewThemeRendererPath = props?.renderer ? props.renderer : 'Legacy';
// Correct for casing vs theme.json
if(brewThemeRendererPath == 'legacy') { brewThemeRendererPath = 'Legacy'; }
if(props?.theme && (props?.theme[0] === '#')) {
brewThemeRendererPath = 'Brew';
}
let themePath = props.theme ?? '5ePHB';
const Themes = { ...staticThemes, ...props.userThemes };
const baseThemePath = (themePath && themePath[0] !== '#') ? Themes[brewThemeRendererPath][themePath]?.baseTheme : 'Brew';
const baseThemePath = (themePath && themePath[0] !== '#') ? Themes[brewThemeRendererPath][themePath].baseTheme : 'Brew';
// Override static theme values if a Brew theme.