website: always show build version in version dropdown

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

#3940
This commit is contained in:
Jens Langhammer 2023-02-16 14:38:27 +01:00
parent 9397598376
commit ecf9c8fcdd
No known key found for this signature in database
1 changed files with 7 additions and 7 deletions

View File

@ -48,15 +48,15 @@ module.exports = {
}, },
{ {
type: "dropdown", type: "dropdown",
label: `Version: latest`, label: `Version: ${releases[0].replace(
/releases\/\d+\/v/,
""
)}`,
position: "right", position: "right",
items: releases.map((release) => { items: releases.map((release) => {
const subdomain = release const version = release.replace(/releases\/\d+\/v/, "");
.replace(/releases\/\d+\/v/, "") const subdomain = version.replace(".", "-");
.replace(".", "-"); const label = `Version: ${version}`;
const label =
"Version: " +
release.replace(/releases\/\d+\/v/, "");
return { return {
label: label, label: label,
href: `https://version-${subdomain}.goauthentik.io`, href: `https://version-${subdomain}.goauthentik.io`,