prettier fixes #16

This commit is contained in:
Michael Dausmann
2023-10-24 21:18:03 +11:00
parent dc9d64ebf5
commit a7f8c37f99
56 changed files with 1706 additions and 935 deletions

View File

@@ -3,23 +3,30 @@
const config = useRuntimeConfig();
const notifyStore = useNotifyStore();
const loading = ref(false)
const email = ref('')
const loading = ref(false);
const email = ref('');
const sendResetPasswordLink = async () => {
try {
loading.value = true
const { data, error } = await supabase.auth.resetPasswordForEmail(email.value, {
redirectTo: `${config.public.siteRootUrl}/resetpassword`,
})
if (error) throw error
else notifyStore.notify("Password Reset link sent, check your email.", NotificationType.Success);
loading.value = true;
const { data, error } = await supabase.auth.resetPasswordForEmail(
email.value,
{
redirectTo: `${config.public.siteRootUrl}/resetpassword`
}
);
if (error) throw error;
else
notifyStore.notify(
'Password Reset link sent, check your email.',
NotificationType.Success
);
} catch (error) {
notifyStore.notify(error, NotificationType.Error);
} finally {
loading.value = false
loading.value = false;
}
}
};
</script>
<template>
<div class="flex flex-col items-center justify-center h-screen bg-gray-100">
@@ -28,11 +35,20 @@
<form @submit.prevent="sendResetPasswordLink" class="space-y-4">
<div>
<label for="email" class="block mb-2 font-bold">Email</label>
<input v-model="email" id="email" type="email" class="w-full p-2 border border-gray-400 rounded-md"
placeholder="Enter your email" required>
<input
v-model="email"
id="email"
type="email"
class="w-full p-2 border border-gray-400 rounded-md"
placeholder="Enter your email"
required />
</div>
<button :disabled="loading || email === ''" type="submit"
class="w-full py-2 text-white bg-indigo-600 rounded-md hover:bg-indigo-700">Send Reset Password Link</button>
<button
:disabled="loading || email === ''"
type="submit"
class="w-full py-2 text-white bg-indigo-600 rounded-md hover:bg-indigo-700">
Send Reset Password Link
</button>
</form>
</div>
</div>