Refactoring: Remove some unused or deprecated classes

This commit is contained in:
Pieter Vander Vennet 2024-08-01 19:42:32 +02:00
parent ee1ef81f48
commit 2822eafef6
6 changed files with 1 additions and 72 deletions

View file

@ -1,25 +0,0 @@
import Translations from "../i18n/Translations"
import BaseUIElement from "../BaseUIElement"
export class Button extends BaseUIElement {
private _text: BaseUIElement
constructor(text: string | BaseUIElement, onclick: () => void | Promise<void>) {
super()
this._text = Translations.W(text)
this.onClick(onclick)
}
protected InnerConstructElement(): HTMLElement {
const el = this._text.ConstructElement()
if (el === undefined) {
return undefined
}
const form = document.createElement("form")
const button = document.createElement("button")
button.type = "button"
button.appendChild(el)
form.appendChild(button)
return form
}
}

View file

@ -1,19 +0,0 @@
import BaseUIElement from "../BaseUIElement"
/**
* Introduces a new element which has an ID
* Mostly a workaround for the import viewer
*/
export default class DivContainer extends BaseUIElement {
private readonly _id: string
constructor(id: string) {
super()
this._id = id
}
protected InnerConstructElement(): HTMLElement {
const e = document.createElement("div")
e.id = this._id
return e
}
}

View file

@ -1,12 +1,6 @@
import { Utils } from "../../Utils"
import Combine from "./Combine"
import BaseUIElement from "../BaseUIElement"
import Title from "./Title"
import Table from "./Table"
import { Store, UIEventSource } from "../../Logic/UIEventSource"
import { VariableUiElement } from "./VariableUIElement"
import { UIEventSource } from "../../Logic/UIEventSource"
import { Translation } from "../i18n/Translation"
import { FixedUiElement } from "./FixedUiElement"
import Translations from "../i18n/Translations"
import MarkdownUtils from "../../Utils/MarkdownUtils"
import Locale from "../i18n/Locale"

View file

@ -2,7 +2,6 @@ import BaseUIElement from "../BaseUIElement"
import List from "./List"
import { marked } from "marked"
import { parse as parse_html } from "node-html-parser"
import { default as turndown } from "turndown"
import { Utils } from "../../Utils"
export default class TableOfContents {