mirror of
https://github.com/warp-tech/warpgate.git
synced 2025-09-08 15:44:25 +08:00
fixed #1258 - hide the version info until logged in
This commit is contained in:
parent
a0a93942da
commit
7e154224c1
4 changed files with 16 additions and 11 deletions
|
@ -22,7 +22,7 @@ pub struct PortsInfo {
|
|||
|
||||
#[derive(Serialize, Object)]
|
||||
pub struct Info {
|
||||
version: String,
|
||||
version: Option<String>,
|
||||
username: Option<String>,
|
||||
selected_target: Option<String>,
|
||||
external_host: Option<String>,
|
||||
|
@ -58,7 +58,9 @@ impl Api {
|
|||
let parameters = Parameters::Entity::get(&*services.db.lock().await).await?;
|
||||
|
||||
Ok(InstanceInfoResponse::Ok(Json(Info {
|
||||
version: env!("CARGO_PKG_VERSION").to_string(),
|
||||
version: session
|
||||
.is_authenticated()
|
||||
.then(|| env!("CARGO_PKG_VERSION").to_string()),
|
||||
username: session.get_username(),
|
||||
selected_target: session.get_target_name(),
|
||||
external_host,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"openapi": "3.0.0",
|
||||
"info": {
|
||||
"title": "Warpgate Web Admin",
|
||||
"version": "0.12.0"
|
||||
"version": "0.13.0"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
|
@ -63,7 +63,7 @@
|
|||
"content": {
|
||||
"application/json; charset=utf-8": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/PaginatedSessionSnapshot"
|
||||
"$ref": "#/components/schemas/PaginatedResponse_SessionSnapshot"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2101,7 +2101,7 @@
|
|||
},
|
||||
"number_of_uses": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
"format": "int16"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2310,7 +2310,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"PaginatedSessionSnapshot": {
|
||||
"PaginatedResponse_SessionSnapshot": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"items",
|
||||
|
@ -2887,7 +2887,7 @@
|
|||
},
|
||||
"uses_left": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
"format": "int16"
|
||||
},
|
||||
"expiry": {
|
||||
"type": "string",
|
||||
|
|
|
@ -86,9 +86,13 @@
|
|||
</main>
|
||||
|
||||
<footer class="mt-5">
|
||||
<span class="me-auto ms-3">
|
||||
v{$serverInfo?.version}
|
||||
{#if $serverInfo?.version}
|
||||
<span class="ms-3 me-auto">
|
||||
v{$serverInfo.version}
|
||||
</span>
|
||||
{:else}
|
||||
<div class="me-auto"></div>
|
||||
{/if}
|
||||
<ThemeSwitcher />
|
||||
</footer>
|
||||
{/if}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"openapi": "3.0.0",
|
||||
"info": {
|
||||
"title": "Warpgate HTTP proxy",
|
||||
"version": "0.12.0"
|
||||
"version": "0.13.0"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
|
@ -840,7 +840,6 @@
|
|||
"Info": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"version",
|
||||
"ports",
|
||||
"authorized_via_ticket",
|
||||
"authorized_via_sso_with_single_logout",
|
||||
|
|
Loading…
Add table
Reference in a new issue