Updated about window for the native client
parent
5a824ecd43
commit
d9d370d7dc
|
@ -3,7 +3,7 @@
|
|||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
$WEB_CLIENT = http_response_code() !== false;
|
||||
$WEB_CLIENT = (!isset($CLIENT) || !$CLIENT) && http_response_code() !== false;
|
||||
$localhost = false;
|
||||
if(gethostname() == "WolverinDEV")
|
||||
$localhost = true;
|
||||
|
|
|
@ -4632,7 +4632,7 @@
|
|||
<div class="versions">
|
||||
{{if client}}
|
||||
<div class="version version-native">
|
||||
<a>TeaClient:</a><a class="value">{{>version_client}}</a>
|
||||
<a>TeaClient:</a><a class="value version-client">{{>version_client}}</a>
|
||||
</div>
|
||||
<div class="version version-web">
|
||||
<a>UI:</a><a class="value">{{>version_ui}}</a>
|
||||
|
@ -4646,7 +4646,7 @@
|
|||
</div>
|
||||
<div class="container-right">
|
||||
{{if client}}
|
||||
<h1>TeaSpeak-Client build {{>version_client}} ({{>version_timestamp}})</h1>
|
||||
<h1>TeaSpeak-Client build <span class="version-client">{{>version_client}}</span><!-- ({{>version_timestamp}}) --></h1>
|
||||
{{else}}
|
||||
<h1>TeaSpeak-Web build {{>version_client}} <!-- ({{>version_timestamp}}) --></h1>
|
||||
<!-- We currently dont have a timestamp for the web client -->
|
||||
|
|
|
@ -27,9 +27,9 @@ namespace Modals {
|
|||
header: tr("About"),
|
||||
body: () => {
|
||||
let tag = $("#tmpl_about").renderTag({
|
||||
client: false,
|
||||
client: !app.is_web(),
|
||||
|
||||
version_client: app_version || "in-dev",
|
||||
version_client: app.is_web() ? app_version || "in-dev" : "loading...",
|
||||
version_ui: app_version || "in-dev",
|
||||
|
||||
version_timestamp: !!app_version ? format_date(Date.now()) : "--"
|
||||
|
@ -42,5 +42,12 @@ namespace Modals {
|
|||
});
|
||||
connectModal.htmlTag.find(".modal-body").addClass("modal-about");
|
||||
connectModal.open();
|
||||
|
||||
(window as any).native.client_version().then(version => {
|
||||
connectModal.htmlTag.find(".version-client").text(version);
|
||||
}).catch(error => {
|
||||
log.error(LogCategory.GENERAL, tr("Failed to load client version: %o"), error);
|
||||
connectModal.htmlTag.find(".version-client").text("unknown");
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue