web/user: only render expand element when required (#6641)

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L
2023-08-26 23:43:36 +02:00
committed by GitHub
parent dc782498b4
commit 7a90b435cc
2 changed files with 29 additions and 19 deletions

View File

@ -43,11 +43,11 @@ export class VersionStatusCard extends AdminStatusCard<Version> {
renderValue(): TemplateResult {
let text = this.value?.versionCurrent;
let link = "https://goauthentik.io/docs/releases/${this.value?.versionCurrent}";
let link = `https://goauthentik.io/docs/releases/${this.value?.versionCurrent}`;
if (this.value?.buildHash) {
text = this.value.buildHash?.substring(0, 7);
link = "https://github.com/goauthentik/authentik/commit/${this.value.buildHash}";
link = `https://github.com/goauthentik/authentik/commit/${this.value.buildHash}`;
}
return html`<a href=${link} target="_blank"> ${text} </a>`;
return html`<a href=${link} target="_blank">${text}</a>`;
}
}