mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-10-23 03:31:56 +00:00
25 lines
628 B
TypeScript
25 lines
628 B
TypeScript
import {app} from "@electron/remote";
|
|
|
|
import {bundleUrl} from "../../../common/paths.js";
|
|
|
|
export class AboutView {
|
|
static async create(): Promise<AboutView> {
|
|
return new AboutView(
|
|
await (await fetch(new URL("app/renderer/about.html", bundleUrl))).text(),
|
|
);
|
|
}
|
|
|
|
readonly $view: HTMLElement;
|
|
|
|
private constructor(templateHtml: string) {
|
|
this.$view = document.createElement("div");
|
|
const $shadow = this.$view.attachShadow({mode: "open"});
|
|
$shadow.innerHTML = templateHtml;
|
|
$shadow.querySelector("#version")!.textContent = `v${app.getVersion()}`;
|
|
}
|
|
|
|
destroy() {
|
|
// Do nothing.
|
|
}
|
|
}
|