0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-14 10:42:38 +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:
David Bolack
2024-05-13 11:14:35 -05:00
parent ed210da4af
commit 8c5f4e0605
4 changed files with 5 additions and 4 deletions

View File

@@ -99,7 +99,7 @@ const PrintPage = createClass({
}
let themePath = this.state.brew.theme ?? '5ePHB';
const Themes = { ...staticThemes, ...this.state.brew.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.