Fixed the about modal for the native client

master
WolverinDEV 2021-02-13 23:07:02 +01:00
parent c297c441b0
commit 1e66f2302c
1 changed files with 3 additions and 7 deletions

View File

@ -1,5 +1,5 @@
import {createModal} from "../../ui/elements/Modal";
import {LogCategory, logError} from "../../log";
import {getBackend} from "tc-shared/backend";
import {tr} from "tc-shared/i18n/localize";
function format_date(date: number) {
@ -30,11 +30,7 @@ export function spawnAbout() {
connectModal.open();
if (__build.target !== "web") {
(window as any).native.client_version().then(version => {
connectModal.htmlTag.find(".version-client").text(version);
}).catch(error => {
logError(LogCategory.GENERAL, tr("Failed to load client version: %o"), error);
connectModal.htmlTag.find(".version-client").text("unknown");
});
const version = getBackend("native").getVersionInfo();
connectModal.htmlTag.find(".version-client").text(version.version);
}
}