admin: refactor update check (#11272)

* admin: refactor update check

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* fix tests

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L.
2024-09-08 01:35:07 +02:00
committed by GitHub
parent c3b6d8ea70
commit c90ecf4ebe
3 changed files with 21 additions and 20 deletions

View File

@ -513,16 +513,14 @@ ${JSON.stringify(value.new_value, null, 4)}</pre
}
renderUpdateAvailable() {
let url = `https://github.com/goauthentik/authentik/releases/tag/version%2F${this.event.context.new_version}`;
if (this.event.context.changelog) {
url = this.event.context.changelog as string;
}
return html`<div class="pf-c-card__title">${msg("New version available")}</div>
<a
target="_blank"
href="https://github.com/goauthentik/authentik/releases/tag/version%2F${this.event
.context.new_version}"
>
${this.event.context.new_version}
</a>`;
// Action types which typically don't record any extra context.
// If context is not empty, we fall to the default response.
<div class="pf-c-card__body">
<a target="_blank" href=${url}> ${this.event.context.new_version} </a>
</div>`;
}
renderLogin() {