aboutsummaryrefslogtreecommitdiff
path: root/static/ts/components/changelog.ts
diff options
context:
space:
mode:
Diffstat (limited to 'static/ts/components/changelog.ts')
-rw-r--r--static/ts/components/changelog.ts39
1 files changed, 25 insertions, 14 deletions
diff --git a/static/ts/components/changelog.ts b/static/ts/components/changelog.ts
index 720d1656..8f8adc1c 100644
--- a/static/ts/components/changelog.ts
+++ b/static/ts/components/changelog.ts
@@ -1,32 +1,43 @@
/**
- * `<changelog />`
- *
- * Display of a VEvents changelog. @ref{ChangeLogEntry}
- *
- * @privateRemarks @anchor{VEventChangelog}
- *
- * @category Web Components
- * @mergeTarget components
- * @module
- */
+ `<changelog />`
+
+ Display of a VEvents changelog. @ref{ChangeLogEntry}
+
+ TODO rename this file!
+
+
+ @privateRemarks @anchor{VEventChangelog}
+
+ @category Web Components
+ @mergeTarget components
+ @module
+*/
import { makeElement } from '../lib'
import { ComponentVEvent } from './vevent'
import { VEvent } from '../vevent'
export { VEventChangelog }
+/**
+ Component displaying veevents changelog.
+
+ This component is dumb, and (almost) doesn't keep any internal state. Instead
+ other parts of the program should call it with a `VEvent`, which contains the
+ actual changelog.
+*/
class VEventChangelog extends ComponentVEvent {
- readonly ul: HTMLElement
+ /** The list holding the changelog */
+ readonly #ul: HTMLElement
constructor(uid?: string) {
super(uid);
- this.ul = makeElement('ul');
+ this.#ul = makeElement('ul');
}
connectedCallback() {
- this.replaceChildren(this.ul);
+ this.replaceChildren(this.#ul);
}
redraw(data: VEvent) {
@@ -55,6 +66,6 @@ class VEventChangelog extends ComponentVEvent {
children.push(makeElement('li', { textContent: msg }));
}
- this.ul.replaceChildren(...children)
+ this.#ul.replaceChildren(...children)
}
}