forked from noxious/client
Renamed component, inform user when password reset mail has been sent, added comment for #238
This commit is contained in:
parent
9c244e980c
commit
270d12821a
@ -32,7 +32,7 @@ import { useCookies } from '@vueuse/integrations/useCookies'
|
|||||||
import LoginForm from '@/components/screens/partials/login/LoginForm.vue'
|
import LoginForm from '@/components/screens/partials/login/LoginForm.vue'
|
||||||
import RegisterForm from '@/components/screens/partials/login/RegisterForm.vue'
|
import RegisterForm from '@/components/screens/partials/login/RegisterForm.vue'
|
||||||
import NewPasswordForm from '@/components/screens/partials/login/NewPasswordForm.vue'
|
import NewPasswordForm from '@/components/screens/partials/login/NewPasswordForm.vue'
|
||||||
import ResetPassword from '@/components/screens/partials/login/ResetPassword.vue'
|
import ResetPassword from '@/components/screens/partials/login/ResetPasswordModal.vue'
|
||||||
|
|
||||||
const isPasswordResetFormShown = ref(false)
|
const isPasswordResetFormShown = ref(false)
|
||||||
const doesUrlHaveToken = window.location.hash.includes('#')
|
const doesUrlHaveToken = window.location.hash.includes('#')
|
||||||
|
@ -59,6 +59,15 @@ async function newPasswordFunc() {
|
|||||||
newPasswordError.value = response.error
|
newPasswordError.value = response.error
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @TODO: #238, this wont work if we redirect to the login page
|
||||||
|
* Find a way to just "close" this screen instead of redirecting
|
||||||
|
*/
|
||||||
|
gameStore.addNotification({
|
||||||
|
title: 'Success',
|
||||||
|
message: 'Password changed successfully'
|
||||||
|
})
|
||||||
window.location.href = '/'
|
window.location.href = '/'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,9 +26,11 @@
|
|||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { resetPassword } from '@/services/authentication'
|
import { resetPassword } from '@/services/authentication'
|
||||||
import Modal from '@/components/utilities/Modal.vue'
|
import Modal from '@/components/utilities/Modal.vue'
|
||||||
|
import { useGameStore } from '@/stores/gameStore'
|
||||||
|
|
||||||
const emit = defineEmits(['close'])
|
const emit = defineEmits(['close'])
|
||||||
|
|
||||||
|
const gameStore = useGameStore()
|
||||||
const email = ref('')
|
const email = ref('')
|
||||||
const resetPasswordError = ref('')
|
const resetPasswordError = ref('')
|
||||||
|
|
||||||
@ -47,6 +49,11 @@ async function resetPasswordFunc() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gameStore.addNotification({
|
||||||
|
title: 'Success',
|
||||||
|
message: 'Password reset email sent'
|
||||||
|
})
|
||||||
|
|
||||||
emit('close')
|
emit('close')
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
Loading…
x
Reference in New Issue
Block a user