0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-08 01:02:51 +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>;
},

View File

@@ -86,11 +86,16 @@
font-size: 13.33px;
.navDropdownContainer {
background-color: white;
width: 100%;
&:hover {
background-color: rgb(187, 187, 187);
}
&.disabled {
font-style:italic;
font-style: italic;
background-color: darkgray;
color: dimgray;
}
&>div:first-child {
border : 2px solid rgb(118,118,118);
padding : 6px 3px;