diff --git a/quasar.config.js b/quasar.config.js
index 3f089c3..07dd468 100644
--- a/quasar.config.js
+++ b/quasar.config.js
@@ -93,7 +93,8 @@ export default defineConfig((/* ctx */) => {
// Quasar plugins
plugins: [
'Notify',
- 'Loading'
+ 'Loading',
+ 'Dialog'
]
},
diff --git a/src/pages/LoginPage.vue b/src/pages/LoginPage.vue
index 21794eb..2fce1e9 100644
--- a/src/pages/LoginPage.vue
+++ b/src/pages/LoginPage.vue
@@ -29,8 +29,26 @@
Not reigistered? Created an
Account
- Not verified? Resend
- email
+ Not verified? Resend
+ email
+
+
+
+ Your email
+
+
+
+
+
+
+
+
+
+
+
+
+ Forgot password?
@@ -93,6 +111,8 @@ let onLogin = ref(true)
let isPwd = ref(true)
let isPwd1 = ref(true)
let isPwd2 = ref(true)
+let prompt = ref(false)
+let email_verification = ref('')
const registrar = async () => {
try {
@@ -115,7 +135,10 @@ const registrar = async () => {
}
catch (error) {
if (error instanceof Error) {
- alert(error.message)
+ $q.notify({
+ type: 'negative',
+ message: error.message
+ })
}
}
finally {
@@ -142,7 +165,40 @@ const login = async () => {
}
catch (error) {
if (error instanceof Error) {
- alert(error.message)
+ $q.notify({
+ type: 'negative',
+ message: error.message
+ })
+ }
+ }
+ finally {
+ $q.loading.hide()
+ }
+}
+
+const resendEmail = async () => {
+ try {
+ $q.loading.show({
+ delay: 200 // ms
+ })
+ const { error } = await supabase.auth.resend({
+ type: 'signup',
+ email: email_verification.value,
+ options: {
+ emailRedirectTo: 'http://localhost:9000/verify-email',
+ },
+ })
+ email_verification.value = ''
+ if (error) throw error
+ $q.loading.hide()
+ $q.notify('Check your email for verification link')
+ }
+ catch (error) {
+ if (error instanceof Error) {
+ $q.notify({
+ type: 'negative',
+ message: error.message
+ })
}
}
finally {