File tree Expand file tree Collapse file tree
core/frontend/src/components/version-chooser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -611,7 +611,7 @@ export default Vue.extend({
611611 })
612612 this .updating_bootstrap = false
613613 },
614- async setBootstrapVersion(version : string ) {
614+ async setBootstrapVersion(version : string , reload = true ) {
615615 await back_axios ({
616616 method: ' post' ,
617617 url: ' /version-chooser/v1.0/bootstrap/current' ,
@@ -633,12 +633,19 @@ export default Vue.extend({
633633 ` Successfully updated bootstrap version to ${version } ` ,
634634 true ,
635635 )
636- window .location .reload ()
636+ if (reload ) {
637+ window .location .reload ()
638+ }
637639 })
638640 },
639641 async setVersion(args : string | string []) {
640642 const fullname: string = Array .isArray (args ) ? args [0 ] : args
641643 const [repository, tag] = fullname .split (' :' )
644+
645+ if (this .isStable (tag )) {
646+ await this .setBootstrapVersion (tag , false )
647+ }
648+
642649 await back_axios ({
643650 method: ' post' ,
644651 url: ' /version-chooser/v1.0/version/current' ,
@@ -708,6 +715,9 @@ export default Vue.extend({
708715 isBeingDeleted(image : Version ) {
709716 return this .deleting === ` ${image .repository }:${image .tag } `
710717 },
718+ isStable(tag : string ) {
719+ return VCU .isSemVer (tag ) && ! tag .includes (' beta' )
720+ },
711721 },
712722})
713723 </script >
You can’t perform that action at this time.
0 commit comments