From 132ce29247268befec50ef5fc8e070b70169d582 Mon Sep 17 00:00:00 2001 From: Vishesh Date: Tue, 28 Jan 2025 15:10:14 +0530 Subject: [PATCH] Fill fields in login, forgotPassword and resetPassword from url --- ui/src/views/auth/ForgotPassword.vue | 4 +++- ui/src/views/auth/Login.vue | 4 +++- ui/src/views/auth/ResetPassword.vue | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ui/src/views/auth/ForgotPassword.vue b/ui/src/views/auth/ForgotPassword.vue index 2d45938417fb..87f2d1d0c33e 100644 --- a/ui/src/views/auth/ForgotPassword.vue +++ b/ui/src/views/auth/ForgotPassword.vue @@ -129,7 +129,9 @@ export default { initForm () { this.formRef = ref() this.form = reactive({ - server: (this.server.apiHost || '') + this.server.apiBase + server: (this.server.apiHost || '') + this.server.apiBase, + username: this.$route.query?.username || '', + domain: this.$route.query?.domain || '' }) this.rules = { username: [{ diff --git a/ui/src/views/auth/Login.vue b/ui/src/views/auth/Login.vue index 10963073c189..47e2f34c57e9 100644 --- a/ui/src/views/auth/Login.vue +++ b/ui/src/views/auth/Login.vue @@ -253,7 +253,9 @@ export default { initForm () { this.formRef = ref() this.form = reactive({ - server: (this.server.apiHost || '') + this.server.apiBase + server: (this.server.apiHost || '') + this.server.apiBase, + username: this.$route.query?.username || '', + domain: this.$route.query?.domain || '' }) this.rules = reactive({}) this.setRules() diff --git a/ui/src/views/auth/ResetPassword.vue b/ui/src/views/auth/ResetPassword.vue index 8a9047c5d3eb..0250e60008ac 100644 --- a/ui/src/views/auth/ResetPassword.vue +++ b/ui/src/views/auth/ResetPassword.vue @@ -157,6 +157,7 @@ export default { this.form = reactive({ server: (this.server.apiHost || '') + this.server.apiBase, username: this.$route.query?.username || '', + domain: this.$route.query?.domain || '', token: this.$route.query?.token || '' }) this.rules = {