Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: auto-focus first available tab in signin form (#17399)

boojack2400535d761b
diff --git a/frontend/src/views/auth/Signin.vue b/frontend/src/views/auth/Signin.vue
index f1227bd8c0..4208ce3bbe 100644
--- a/frontend/src/views/auth/Signin.vue
+++ b/frontend/src/views/auth/Signin.vue
@@ -7,7 +7,7 @@
<NCard v-if="showSignInForm">
<NTabs
class="card-tabs"
- default-value="standard"
+ :default-value="defaultTabValue"
size="small"
animated
pane-style="padding: 12px 0 0 0"
@@ -252,6 +252,16 @@ const showSignInForm = computed(() => {
);
});
+const defaultTabValue = computed(() => {
+ if (!disallowPasswordSignin.value) {
+ return "standard";
+ }
+ if (groupedIdentityProviderList.value.length > 0) {
+ return groupedIdentityProviderList.value[0].name;
+ }
+ return "standard";
+});
+
watchEffect(() => {
// Navigate to signup if needs admin setup.
// Unable to achieve it in router.beforeEach because actuator/info is fetched async and returns