0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-07 12:02:44 +00:00

Fully disable theme selection when in Legacy mode

Making Legacy a "theme" implies we will add more themes to Legacy, which we aren't planning to.
This commit is contained in:
Trevor Buckner
2022-03-01 00:34:19 -05:00
parent da5ce35c3c
commit 8e0629062d
3 changed files with 29 additions and 10 deletions

View File

@@ -144,16 +144,29 @@ const MetadataEditor = createClass({
};
const currentTheme = this.getThemeData(this.props.metadata.renderer, this.props.metadata.theme);
let dropdown;
if(this.props.metadata.renderer == 'legacy') {
dropdown =
<Nav.dropdown className='disabled' trigger='disabled'>
<div>
{`Themes are not suppdorted in the Legacy Renderer`} <i className='fas fa-caret-down'></i>
</div>
</Nav.dropdown>;
} else {
dropdown =
<Nav.dropdown trigger='click'>
<div>
{`${_.upperFirst(currentTheme.renderer)} : ${currentTheme.name}`} <i className='fas fa-caret-down'></i>
</div>
{/*listThemes('Legacy')*/}
{listThemes('V3')}
</Nav.dropdown>;
}
return <div className='field themes'>
<label>theme</label>
<Nav.dropdown trigger='click'>
<div>
{`${_.upperFirst(currentTheme.renderer)} : ${currentTheme.name}`} <i className='fas fa-caret-down'></i>
</div>
{listThemes('Legacy')}
{listThemes('V3')}
</Nav.dropdown>
{dropdown}
</div>;
},