0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

Update Theme Selector display

For User/Brew Themes, display the first author instead of Brew/V3 in the first column.
This commit is contained in:
David Bolack
2024-05-13 22:24:41 -05:00
parent 8c5f4e0605
commit 66e39d9c65
2 changed files with 5 additions and 3 deletions

View File

@@ -202,7 +202,7 @@ const MetadataEditor = createClass({
const preview = theme?.thumbnail ? theme.thumbnail : `/themes/${theme.renderer}/${theme.path}/dropdownPreview.png`;
const texture = theme?.thumbnail ? theme.thumbnail : `/themes/${theme.renderer}/${theme.path}/dropdownTexture.png`;
return <div className='item' key={`${renderer}_${theme.name}`} onClick={()=>this.handleTheme(theme, renderer)} title={''}>
{`${renderer} : ${theme.name}`}
{`${theme?.author ? theme.author : renderer} : ${theme.name}`}
<div className='texture-container'>
<img src={`${texture}`}/>
</div>
@@ -230,7 +230,7 @@ const MetadataEditor = createClass({
dropdown =
<Nav.dropdown className='value' trigger='click'>
<div>
{`${_.upperFirst(currentThemePath)} : ${currentTheme.name}`} <i className='fas fa-caret-down'></i>
{`${currentTheme?.author ? currentTheme.author : _.upperFirst(currentThemePath)} : ${currentTheme.name}`} <i className='fas fa-caret-down'></i>
</div>
{/*listThemes('Legacy')*/}
{listThemes('V3')}

View File

@@ -75,7 +75,8 @@ const api = {
'editId',
'thumbnail',
'textBin',
'text'
'text',
'authors'
];
const userThemes = {
@@ -93,6 +94,7 @@ const api = {
renderer : 'V3',
baseTheme : '',
baseSnippets : false,
author : brew.authors[0],
path : `#${brew.editId}`,
thumbnail : brew.thumbnail.length > 0 ? brew.thumbnail : '/assets/naturalCritLogoWhite.svg'
};