From d6449760bb083fa336a4464a6b7b9cf1bea1271f Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Fri, 23 Apr 2021 13:09:05 +0200 Subject: [PATCH] Deleted the old about reference --- .../js/events/ClientGlobalControlHandler.ts | 4 +- shared/js/ui/modal/ModalAbout.ts | 39 ------------------- 2 files changed, 2 insertions(+), 41 deletions(-) delete mode 100644 shared/js/ui/modal/ModalAbout.ts diff --git a/shared/js/events/ClientGlobalControlHandler.ts b/shared/js/events/ClientGlobalControlHandler.ts index 80326bf7..70bd1285 100644 --- a/shared/js/events/ClientGlobalControlHandler.ts +++ b/shared/js/events/ClientGlobalControlHandler.ts @@ -13,13 +13,13 @@ import {tr, tra} from "../i18n/localize"; import {spawnGlobalSettingsEditor} from "tc-shared/ui/modal/global-settings-editor/Controller"; import {spawnModalCssVariableEditor} from "tc-shared/ui/modal/css-editor/Controller"; import {server_connections} from "tc-shared/ConnectionManager"; -import {spawnAbout} from "tc-shared/ui/modal/ModalAbout"; import {spawnVideoSourceSelectModal} from "tc-shared/ui/modal/video-source/Controller"; import {LogCategory, logError, logWarn} from "tc-shared/log"; import {spawnEchoTestModal} from "tc-shared/ui/modal/echo-test/Controller"; import {spawnConnectModalNew} from "tc-shared/ui/modal/connect/Controller"; import {spawnBookmarkModal} from "tc-shared/ui/modal/bookmarks/Controller"; import {Sound} from "tc-shared/audio/Sounds"; +import {spawnAboutModal} from "tc-shared/ui/modal/about/Controller"; /* function initialize_sounds(event_registry: Registry) { @@ -150,7 +150,7 @@ export function initialize(event_registry: Registry) break; case "about": - spawnAbout(); + spawnAboutModal(); break; case "server-echo-test": diff --git a/shared/js/ui/modal/ModalAbout.ts b/shared/js/ui/modal/ModalAbout.ts deleted file mode 100644 index 8548d714..00000000 --- a/shared/js/ui/modal/ModalAbout.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {createModal} from "../../ui/elements/Modal"; -import {getBackend} from "tc-shared/backend"; -import {tr} from "tc-shared/i18n/localize"; -import {spawnAboutModal} from "tc-shared/ui/modal/about/Controller"; - -function format_date(date: number) { - const d = new Date(date); - - return ('00' + d.getDay()).substr(-2) + "." + ('00' + d.getMonth()).substr(-2) + "." + d.getFullYear() + " - " + ('00' + d.getHours()).substr(-2) + ":" + ('00' + d.getMinutes()).substr(-2); -} - -export function spawnAbout() { - spawnAboutModal(); - return; - - const connectModal = createModal({ - header: tr("About"), - body: () => { - return $("#tmpl_about").renderTag({ - client: __build.target !== "web", - - version_client: __build.target === "web" ? __build.version || "in-dev" : "loading...", - version_ui: __build.version || "in-dev", - - version_timestamp: format_date(__build.timestamp) - }); - }, - footer: null, - - width: "60em" - }); - connectModal.htmlTag.find(".modal-body").addClass("modal-about"); - connectModal.open(); - - if (__build.target !== "web") { - const version = getBackend("native").getVersionInfo(); - connectModal.htmlTag.find(".version-client").text(version.version); - } -} \ No newline at end of file