Skip to content

Commit

Permalink
Fill fields in login, forgotPassword and resetPassword from url
Browse files Browse the repository at this point in the history
  • Loading branch information
vishesh92 committed Jan 29, 2025
1 parent 33a37da commit 132ce29
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ui/src/views/auth/ForgotPassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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: [{
Expand Down
4 changes: 3 additions & 1 deletion ui/src/views/auth/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions ui/src/views/auth/ResetPassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 132ce29

Please sign in to comment.