Skip to content

Commit

Permalink
Merge branch 'main' into breedloj/deserFix
Browse files Browse the repository at this point in the history
  • Loading branch information
breedloj authored Nov 21, 2024
2 parents d1ce81b + bb3a474 commit ebe4453
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion plugin/webview/src/q-ui/components/ssoLoginForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
@change="handleRegionInput"
tabindex="0"
>
<option v-for="region in regions" :key="region.id" :value="region.id">
<option v-for="region in sortedRegions" :key="region.id" :value="region.id">
{{ `${region.name} (${region.id})` }}
</option>
</select>
Expand Down Expand Up @@ -74,6 +74,14 @@ export default defineComponent({
}
},
computed: {
sortedRegions() {
const usEast1 = this.regions.find(r => r.id === 'us-east-1');
const otherRegions = this.regions
.filter(r => r.id !== 'us-east-1')
.sort((a, b) => a.name.localeCompare(b.name));

return usEast1 ? [usEast1, ...otherRegions] : otherRegions;
},
regions(): Region[] {
return this.$store.state.ssoRegions
},
Expand Down

0 comments on commit ebe4453

Please sign in to comment.