More refactoring, still very broken

This commit is contained in:
Pieter Vander Vennet 2021-06-11 22:51:45 +02:00
parent d5d90afc74
commit 62f471df1e
23 changed files with 428 additions and 356 deletions

View file

@ -6,11 +6,12 @@ import Combine from "./Base/Combine";
import State from "../State";
import {FixedUiElement} from "./Base/FixedUiElement";
import SpecialVisualizations from "./SpecialVisualizations";
import BaseUIElement from "./BaseUIElement";
export class SubstitutedTranslation extends UIElement {
private readonly tags: UIEventSource<any>;
private readonly translation: Translation;
private content: UIElement[];
private content: BaseUIElement[];
private constructor(
translation: Translation,
@ -54,7 +55,7 @@ export class SubstitutedTranslation extends UIElement {
return new Combine(this.content);
}
private CreateContent(): UIElement[] {
private CreateContent(): BaseUIElement[] {
let txt = this.translation?.txt;
if (txt === undefined) {
return []
@ -64,7 +65,7 @@ export class SubstitutedTranslation extends UIElement {
return this.EvaluateSpecialComponents(txt);
}
private EvaluateSpecialComponents(template: string): UIElement[] {
private EvaluateSpecialComponents(template: string): BaseUIElement[] {
for (const knownSpecial of SpecialVisualizations.specialVisualizations) {