Skip to content

Commit 8e1f5b1

Browse files
authored
Fill fields in login, forgotPassword and resetPassword from url (#10291)
1 parent 42a77c7 commit 8e1f5b1

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

ui/src/views/auth/ForgotPassword.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ export default {
129129
initForm () {
130130
this.formRef = ref()
131131
this.form = reactive({
132-
server: (this.server.apiHost || '') + this.server.apiBase
132+
server: (this.server.apiHost || '') + this.server.apiBase,
133+
username: this.$route.query?.username || '',
134+
domain: this.$route.query?.domain || ''
133135
})
134136
this.rules = {
135137
username: [{

ui/src/views/auth/Login.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,9 @@ export default {
253253
initForm () {
254254
this.formRef = ref()
255255
this.form = reactive({
256-
server: (this.server.apiHost || '') + this.server.apiBase
256+
server: (this.server.apiHost || '') + this.server.apiBase,
257+
username: this.$route.query?.username || '',
258+
domain: this.$route.query?.domain || ''
257259
})
258260
this.rules = reactive({})
259261
this.setRules()

ui/src/views/auth/ResetPassword.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ export default {
157157
this.form = reactive({
158158
server: (this.server.apiHost || '') + this.server.apiBase,
159159
username: this.$route.query?.username || '',
160+
domain: this.$route.query?.domain || '',
160161
token: this.$route.query?.token || ''
161162
})
162163
this.rules = {

0 commit comments

Comments
 (0)