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