Cleanup documentations

This commit is contained in:
2025-02-08 21:02:34 -05:00
parent 3288c32ae8
commit 3309e1bc59
15 changed files with 770 additions and 663 deletions

View File

@@ -1,170 +1,173 @@
<template>
<!-- Modal -->
<v-dialog v-model="dialogEditFullnameShown" max-width="800px">
<fullname-dialog
:firstname="userProfileStore.user.firstname"
:lastname="userProfileStore.user.lastname"
@close="handleCloseEditFullname"
@save="handleSaveEditFullname"
></fullname-dialog>
</v-dialog>
<div class="flex flex-col min-h-screen max-w-[960px] mx-auto">
<!-- Modal -->
<v-dialog v-model="dialogEditFullnameShown" max-width="800px">
<fullname-dialog
:firstname="userProfileStore.user.firstname"
:lastname="userProfileStore.user.lastname"
@close="handleCloseEditFullname"
@save="handleSaveEditFullname"
></fullname-dialog>
</v-dialog>
<v-dialog v-model="dialogEditAliasShown" max-width="800px">
<alias-dialog
:alias="userProfileStore.user.alias"
@close="handleCloseEditAlias"
@save="handleSaveEditAlias"
></alias-dialog>
</v-dialog>
<v-dialog v-model="dialogEditAliasShown" max-width="800px">
<alias-dialog
:alias="userProfileStore.user.alias"
@close="handleCloseEditAlias"
@save="handleSaveEditAlias"
></alias-dialog>
</v-dialog>
<!-- Creator Section (integrated directly) -->
<v-dialog v-model="dialog" max-width="800px">
<div class="card">
<!-- Creator Section (integrated directly) -->
<v-dialog v-model="dialog" max-width="800px">
<div class="card">
<component
:is="currentComponent"
:creator="creatorProfileStore.creator"
@closeRequested="closeDialog"
></component>
</div>
</v-dialog>
</v-dialog>
<div class="space-y-6 p-4">
<div class="space-y-6 p-4">
<div class="card">
<div class="card">
<div class="title">
{{ $t('personnalinformation.informations') }}
</div>
<div class="title">
{{ $t('personnalinformation.informations') }}
</div>
<div class="content">
<button
class="action"
@click="openEditFullname">
<span class="label">{{ $t('personnalinformation.fullname') }}</span>
<span class="value">{{ userProfileStore.fullname }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
<div class="content">
<button
class="action"
@click="openEditFullname">
<span class="label">{{ $t('personnalinformation.fullname') }}</span>
<span class="value">{{ userProfileStore.fullname }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
<button
class="action"
@click="openEditAlias">
<span class="label">{{ $t('personnalinformation.alias') }}</span>
<span class="value">{{ userProfileStore.user.alias }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
</div>
</div>
<!-- Phone & email -->
<div class="card">
<div class="title">
{{ $t('personnalinformation.contactdetails') }}
</div>
<div class="content">
<button class="action" @click="openDialog('EmailDialog')">
<span class="label">{{ $t('personnalinformation.email') }}</span>
<span class="value">{{ userProfileStore.user.email }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
</div>
</div>
<!-- Lorsque l'utilisateur n'a pas de creator name-->
<div class="card">
<div class="title">
{{ $t('creatorinfopage.informations') }}
</div>
<div class="content">
<!-- NAME -->
<button class="action">
<span class="label">{{ $t('creatorinfopage.name') }}</span>
<span class="value">{{ creatorProfileStore.creator.name }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
<!-- TITLE -->
<button class="action" @click="openDialog('ChangeTitleDialog')">
<span class="label">{{ $t('creatorinfopage.title') }}</span>
<span class="value">{{ creatorProfileStore.creator.title }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
<!-- STRIPE -->
<button class="action" @click="openDialog('ChangeStripeIdDialog')">
<span class="label">Stripe Account ID</span>
<span class="value">{{ creatorProfileStore.creator.stripeId }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
<button
class="action"
@click="openEditAlias">
<span class="label">{{ $t('personnalinformation.alias') }}</span>
<span class="value">{{ userProfileStore.user.alias }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
</div>
</div>
</div>
<!-- Phone & email -->
<div class="card">
<div class="card">
<div class="title">
{{ $t('personnalinformation.contactdetails') }}
</div>
<div class="title">
{{ $t('creatorinfopage.socialnetwork') }}
</div>
<div class="content">
<button class="action" @click="openDialog('SocialsDialog')">
<span class="label"><v-icon>mdi-facebook</v-icon></span>
<span class="value">{{ creatorProfileStore.creator.socials?.facebookUrl }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
<button class="action" @click="openDialog('SocialsDialog')">
<span class="label"><v-icon>mdi-instagram</v-icon></span>
<span class="value">{{ creatorProfileStore.creator.socials?.instagramUrl }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
<button class="action" @click="openDialog('SocialsDialog')">
<span class="label"><x-icon class="w-6 h-6"></x-icon></span>
<span class="value">{{ creatorProfileStore.creator.socials?.xUrl }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
<button class="action" @click="openDialog('SocialsDialog')">
<span class="label"><v-icon>mdi-linkedin</v-icon></span>
<span class="value">{{ creatorProfileStore.creator.socials?.linkedInUrl }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
<button class="action" @click="openDialog('SocialsDialog')">
<span class="label"><x-icon class="w-6 h-6"></x-icon></span>
<span class="value">{{ creatorProfileStore.creator.socials?.tikTokUrl }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
<button class="action" @click="openDialog('SocialsDialog')">
<span class="label"><v-icon>mdi-youtube</v-icon></span>
<span class="value">{{ creatorProfileStore.creator.socials?.youtubeUrl }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
<button class="action" @click="openDialog('SocialsDialog')">
<span class="label"><v-icon>mdi-reddit</v-icon></span>
<span class="value">{{ creatorProfileStore.creator.socials?.redditUrl }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
<button class="action" @click="openDialog('SocialsDialog')">
<span class="label"><v-icon>mdi-web</v-icon></span>
<span class="value">{{ creatorProfileStore.creator.socials?.websiteUrl }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
<div class="content">
<button class="action" @click="openDialog('EmailDialog')">
<span class="label">{{ $t('personnalinformation.email') }}</span>
<span class="value">{{ userProfileStore.user.email }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
</div>
</div>
<!-- Lorsque l'utilisateur n'a pas de creator name-->
<div class="card">
<div class="title">
{{ $t('creatorinfopage.informations') }}
</div>
<div class="content">
<!-- NAME -->
<button class="action">
<span class="label">{{ $t('creatorinfopage.name') }}</span>
<span class="value">{{ creatorProfileStore.creator.name }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
<!-- TITLE -->
<button class="action" @click="openDialog('ChangeTitleDialog')">
<span class="label">{{ $t('creatorinfopage.title') }}</span>
<span class="value">{{ creatorProfileStore.creator.title }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
<!-- STRIPE -->
<button class="action" @click="openDialog('ChangeStripeIdDialog')">
<span class="label">Stripe Account ID</span>
<span class="value">{{ creatorProfileStore.creator.stripeId }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
</div>
</div>
<div class="card">
<div class="title">
{{ $t('creatorinfopage.socialnetwork') }}
</div>
<div class="content">
<button class="action" @click="openDialog('SocialsDialog')">
<span class="label"><v-icon>mdi-facebook</v-icon></span>
<span class="value">{{ creatorProfileStore.creator.socials?.facebookUrl }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
<button class="action" @click="openDialog('SocialsDialog')">
<span class="label"><v-icon>mdi-instagram</v-icon></span>
<span class="value">{{ creatorProfileStore.creator.socials?.instagramUrl }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
<button class="action" @click="openDialog('SocialsDialog')">
<span class="label"><x-icon class="w-6 h-6"></x-icon></span>
<span class="value">{{ creatorProfileStore.creator.socials?.xUrl }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
<button class="action" @click="openDialog('SocialsDialog')">
<span class="label"><v-icon>mdi-linkedin</v-icon></span>
<span class="value">{{ creatorProfileStore.creator.socials?.linkedInUrl }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
<button class="action" @click="openDialog('SocialsDialog')">
<span class="label"><x-icon class="w-6 h-6"></x-icon></span>
<span class="value">{{ creatorProfileStore.creator.socials?.tikTokUrl }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
<button class="action" @click="openDialog('SocialsDialog')">
<span class="label"><v-icon>mdi-youtube</v-icon></span>
<span class="value">{{ creatorProfileStore.creator.socials?.youtubeUrl }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
<button class="action" @click="openDialog('SocialsDialog')">
<span class="label"><v-icon>mdi-reddit</v-icon></span>
<span class="value">{{ creatorProfileStore.creator.socials?.redditUrl }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
<button class="action" @click="openDialog('SocialsDialog')">
<span class="label"><v-icon>mdi-web</v-icon></span>
<span class="value">{{ creatorProfileStore.creator.socials?.websiteUrl }}</span>
<span class="chevron"><v-icon>mdi-chevron-right</v-icon></span>
</button>
</div>
</div>
</div>
</div>
@@ -186,12 +189,15 @@ const userProfileStore = useUserProfileStore()
// ### Fullname
const dialogEditFullnameShown = ref(false)
function openEditFullname() {
dialogEditFullnameShown.value = true
}
function handleCloseEditFullname() {
dialogEditFullnameShown.value = false
}
function handleSaveEditFullname(firstname, lastname) {
userProfileStore.changeFullname(firstname, lastname)
dialogEditFullnameShown.value = false
@@ -199,12 +205,15 @@ function handleSaveEditFullname(firstname, lastname) {
// ### Alias
const dialogEditAliasShown = ref(false)
function openEditAlias() {
dialogEditAliasShown.value = true
}
function handleCloseEditAlias() {
dialogEditAliasShown.value = false
}
function handleSaveEditAlias(alias) {
userProfileStore.changeAlias(alias)
dialogEditAliasShown.value = false
@@ -212,12 +221,15 @@ function handleSaveEditAlias(alias) {
// ### Email
const dialogEditEmailShown = ref(false)
function openEditEmail() {
dialogEditEmailShown.value = true
}
function handleCloseEditEmail() {
dialogEditEmailShown.value = false
}
function handleSaveEditEmail(firstname, lastname) {
userProfileStore.changeEmail(firstname, lastname)
dialogEditEmailShown.value = false