From d12888c818f04f7998ea1b190f29771676ae1ace Mon Sep 17 00:00:00 2001 From: nicoschmdt Date: Mon, 3 Nov 2025 11:14:41 -0300 Subject: [PATCH] frontend: version-chooser: update bootstrap when changing BlueOS to a stable --- .../components/version-chooser/VersionChooser.vue | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/core/frontend/src/components/version-chooser/VersionChooser.vue b/core/frontend/src/components/version-chooser/VersionChooser.vue index 290a888410..a0f2c7cf33 100644 --- a/core/frontend/src/components/version-chooser/VersionChooser.vue +++ b/core/frontend/src/components/version-chooser/VersionChooser.vue @@ -611,7 +611,7 @@ export default Vue.extend({ }) this.updating_bootstrap = false }, - async setBootstrapVersion(version: string) { + async setBootstrapVersion(version: string, reload = true) { await back_axios({ method: 'post', url: '/version-chooser/v1.0/bootstrap/current', @@ -633,12 +633,19 @@ export default Vue.extend({ `Successfully updated bootstrap version to ${version}`, true, ) - window.location.reload() + if (reload) { + window.location.reload() + } }) }, async setVersion(args: string | string[]) { const fullname: string = Array.isArray(args) ? args[0] : args const [repository, tag] = fullname.split(':') + + if (this.isStable(tag)) { + await this.setBootstrapVersion(tag, false) + } + await back_axios({ method: 'post', url: '/version-chooser/v1.0/version/current', @@ -708,6 +715,9 @@ export default Vue.extend({ isBeingDeleted(image: Version) { return this.deleting === `${image.repository}:${image.tag}` }, + isStable(tag: string) { + return VCU.isSemVer(tag) && !tag.includes('beta') + }, }, })