web/admin: better show dev build

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer 2023-01-11 11:16:53 +01:00
parent 5b7c6f1b0e
commit a35b8f5862
No known key found for this signature in database

View file

@ -25,15 +25,7 @@ export class VersionStatusCard extends AdminStatusCard<Version> {
if (value.buildHash) { if (value.buildHash) {
return Promise.resolve<AdminStatus>({ return Promise.resolve<AdminStatus>({
icon: "fa fa-check-circle pf-m-success", icon: "fa fa-check-circle pf-m-success",
message: html` message: html`${t`Based on ${value.versionCurrent}`}`,
${t`Build hash: `}
<a
href="https://github.com/goauthentik/authentik/commit/${value.buildHash}"
target="_blank"
>
${value.buildHash?.substring(0, 7)}
</a>
`,
}); });
} }
if (value.outdated) { if (value.outdated) {
@ -49,6 +41,16 @@ export class VersionStatusCard extends AdminStatusCard<Version> {
} }
renderValue(): TemplateResult { renderValue(): TemplateResult {
if (this.value?.buildHash) {
return html`
<a
href="https://github.com/goauthentik/authentik/commit/${this.value.buildHash}"
target="_blank"
>
${this.value.buildHash?.substring(0, 7)}
</a>
`;
}
return html`${this.value?.versionCurrent}`; return html`${this.value?.versionCurrent}`;
} }
} }