mirror of
https://github.com/Paris-est-Ludique/ForceOrange.git
synced 2025-09-11 06:26:29 +02:00
🐛 fixing profile data and some QA issues
This commit is contained in:
@@ -14,7 +14,7 @@ const links = computed(() => {
|
||||
|
||||
if (!user.value) {
|
||||
tmp.push({
|
||||
label: 'Rejoindre FO',
|
||||
label: 'S\'inscrire sur FO',
|
||||
to: '/join'
|
||||
})
|
||||
} else {
|
||||
@@ -31,6 +31,8 @@ const signOut = async () => {
|
||||
const { error } = await auth.signOut()
|
||||
if (error) console.log(error)
|
||||
router.push('/')
|
||||
|
||||
// TOFIX
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@@ -2,6 +2,7 @@
|
||||
import { object, string, type InferType } from 'yup'
|
||||
import type { Database } from '@pel/supabase/types'
|
||||
import type { FormSubmitEvent } from '#ui/types'
|
||||
import { lowerString } from '~/utils/commons';
|
||||
|
||||
definePageMeta({
|
||||
name: 'EmailUpdateForm',
|
||||
@@ -15,7 +16,7 @@ const { inputStyle, formGroupStyle } = useFoStyle()
|
||||
|
||||
const loading = ref(false)
|
||||
const schema = object({
|
||||
email: string().lowercase().trim().email('Il semble que l\'email ne soit pas bon').required('Champ obligatoire'),
|
||||
email: string().lowercase().trim().email('Il semble que l\'email ne soit pas bon').max(500, 'hmmmm c\'est un peu beaucoup là non ?').required('Champ obligatoire'),
|
||||
})
|
||||
|
||||
type Schema = InferType<typeof schema>
|
||||
@@ -29,7 +30,7 @@ async function onSave(event: FormSubmitEvent<Schema>) {
|
||||
|
||||
const formSubmit = event.data
|
||||
const { data, error } = await auth.updateUser({
|
||||
email: formSubmit.email,
|
||||
email: lowerString(formSubmit.email),
|
||||
})
|
||||
|
||||
if (error) {
|
||||
|
@@ -17,7 +17,7 @@ const { inputStyle, formGroupStyle } = useFoStyle()
|
||||
const loading = ref(false)
|
||||
|
||||
const schema = object({
|
||||
password: string().min(6, 'Il faudrait un minimum de 6 charactères').test({
|
||||
password: string().min(6, 'Il faudrait un minimum de 6 charactères').max(500, 'hmmmm c\'est un peu beaucoup là non ?').test({
|
||||
name: 'password',
|
||||
message: 'Le mot de passe n\'est pas assez fort ~~',
|
||||
test: (value) => {
|
||||
|
Reference in New Issue
Block a user