Moved reset password, adjusted modal open logic (also WIP)
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<Modal :is-modal-open="gameStore.uiSettings.isPasswordResetOpen" @modal:close="() => gameStore.togglePasswordReset()" :modal-width="400" :modal-height="300" :is-resizable="false">
|
||||
<Modal :isModalOpen="isPasswordResetOpen" @modal:close="() => isPasswordResetOpen = !isPasswordResetOpen" :modal-width="400" :modal-height="300" :is-resizable="false">
|
||||
<template #modalHeader>
|
||||
<h3 class="m-0 font-medium shrink-0 text-white">Reset Password</h3>
|
||||
</template>
|
||||
@ -13,7 +13,7 @@
|
||||
<span v-if="resetPasswordError" class="text-red-200 text-xs absolute top-full mt-1">{{ resetPasswordError }}</span>
|
||||
</div>
|
||||
<div class="grid grid-flow-col justify-stretch gap-4">
|
||||
<button class="btn-empty py-1.5 px-4 min-w-24 inline-block" @click.stop="gameStore.togglePasswordReset">Cancel</button>
|
||||
<button class="btn-empty py-1.5 px-4 min-w-24 inline-block" @click.stop="isPasswordResetOpen = !isPasswordResetOpen">Cancel</button>
|
||||
<button class="btn-cyan py-1.5 px-4 min-w-24 inline-block" type="submit">Send mail</button>
|
||||
</div>
|
||||
</form>
|
||||
@ -31,6 +31,7 @@ import Modal from '@/components/utilities/Modal.vue'
|
||||
const gameStore = useGameStore()
|
||||
const email = ref('')
|
||||
const resetPasswordError = ref('')
|
||||
const isPasswordResetOpen = ref(false)
|
||||
|
||||
async function resetPasswordFunc() {
|
||||
// check if email is valid
|
||||
@ -47,4 +48,4 @@ async function resetPasswordFunc() {
|
||||
return
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
Reference in New Issue
Block a user