forked from MapComplete/MapComplete
Fix unofficial theme display
This commit is contained in:
parent
6c3b8b2020
commit
d443c7ecb0
1 changed files with 11 additions and 10 deletions
|
@ -43,17 +43,18 @@ export default class MoreScreen extends Combine {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static createUnofficialThemeList(buttonClass: string): BaseUIElement{
|
private static createUnofficialThemeList(buttonClass: string): BaseUIElement{
|
||||||
const customThemes = State.state.installedThemes.data ?? [];
|
return new VariableUiElement(State.state.installedThemes.map(customThemes => {
|
||||||
const els : BaseUIElement[] = []
|
const els : BaseUIElement[] = []
|
||||||
if (customThemes.length > 0) {
|
if (customThemes.length > 0) {
|
||||||
els.push(Translations.t.general.customThemeIntro)
|
els.push(Translations.t.general.customThemeIntro.Clone())
|
||||||
|
|
||||||
const customThemesElement = new Combine(
|
const customThemesElement = new Combine(
|
||||||
customThemes.map(theme => MoreScreen.createLinkButton(theme.layout, theme.definition)?.SetClass(buttonClass))
|
customThemes.map(theme => MoreScreen.createLinkButton(theme.layout, theme.definition)?.SetClass(buttonClass))
|
||||||
)
|
)
|
||||||
els.push(customThemesElement)
|
els.push(customThemesElement)
|
||||||
}
|
}
|
||||||
return new Combine(els)
|
return els;
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static createOfficialThemesList(state: State, buttonClass: string): BaseUIElement {
|
private static createOfficialThemesList(state: State, buttonClass: string): BaseUIElement {
|
||||||
|
|
Loading…
Reference in a new issue