Skip to content

Commit

Permalink
Make us-east-1 the default region in IDC region dropdown (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
taldekar authored Nov 21, 2024
1 parent 53f14d9 commit bb3a474
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 bb3a474

Please sign in to comment.