mirror of
https://github.com/suitenumerique/meet.git
synced 2026-07-27 12:19:10 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6593e449e2 | |||
| de6b8e1e22 | |||
| 7ddf9070aa |
@@ -10,6 +10,10 @@ export const SettingsDialog = (props: SettingsDialogProps) => {
|
|||||||
const { t, i18n } = useTranslation('settings')
|
const { t, i18n } = useTranslation('settings')
|
||||||
const { user, isLoggedIn, logout } = useUser()
|
const { user, isLoggedIn, logout } = useUser()
|
||||||
const { languagesList, currentLanguage } = useLanguageLabels()
|
const { languagesList, currentLanguage } = useLanguageLabels()
|
||||||
|
const userDisplay =
|
||||||
|
user?.full_name && user?.email
|
||||||
|
? `${user.full_name} (${user.email})`
|
||||||
|
: user?.email
|
||||||
return (
|
return (
|
||||||
<Dialog title={t('dialog.heading')} {...props}>
|
<Dialog title={t('dialog.heading')} {...props}>
|
||||||
<H lvl={2}>{t('account.heading')}</H>
|
<H lvl={2}>{t('account.heading')}</H>
|
||||||
@@ -18,7 +22,7 @@ export const SettingsDialog = (props: SettingsDialogProps) => {
|
|||||||
<P>
|
<P>
|
||||||
<Trans
|
<Trans
|
||||||
i18nKey="settings:account.currentlyLoggedAs"
|
i18nKey="settings:account.currentlyLoggedAs"
|
||||||
values={{ user: user?.full_name ?? user?.email }}
|
values={{ user: userDisplay }}
|
||||||
components={[<Badge />]}
|
components={[<Badge />]}
|
||||||
/>
|
/>
|
||||||
</P>
|
</P>
|
||||||
|
|||||||
@@ -18,6 +18,10 @@ export const AccountTab = ({ id, onOpenChange }: AccountTabProps) => {
|
|||||||
const room = useRoomContext()
|
const room = useRoomContext()
|
||||||
const { user, isLoggedIn, logout } = useUser()
|
const { user, isLoggedIn, logout } = useUser()
|
||||||
const [name, setName] = useState(room?.localParticipant.name ?? '')
|
const [name, setName] = useState(room?.localParticipant.name ?? '')
|
||||||
|
const userDisplay =
|
||||||
|
user?.full_name && user?.email
|
||||||
|
? `${user.full_name} (${user.email})`
|
||||||
|
: user?.email
|
||||||
|
|
||||||
const handleOnSubmit = () => {
|
const handleOnSubmit = () => {
|
||||||
if (room) room.localParticipant.setName(name)
|
if (room) room.localParticipant.setName(name)
|
||||||
@@ -37,7 +41,7 @@ export const AccountTab = ({ id, onOpenChange }: AccountTabProps) => {
|
|||||||
value={name}
|
value={name}
|
||||||
onChange={setName}
|
onChange={setName}
|
||||||
validate={(value) => {
|
validate={(value) => {
|
||||||
return !value ? <p>{'Votre Nom ne peut pas être vide'}</p> : null
|
return !value ? <p>{t('account.nameError')}</p> : null
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<H lvl={2}>{t('account.authentication')}</H>
|
<H lvl={2}>{t('account.authentication')}</H>
|
||||||
@@ -46,7 +50,7 @@ export const AccountTab = ({ id, onOpenChange }: AccountTabProps) => {
|
|||||||
<P>
|
<P>
|
||||||
<Trans
|
<Trans
|
||||||
i18nKey="settings:account.currentlyLoggedAs"
|
i18nKey="settings:account.currentlyLoggedAs"
|
||||||
values={{ user: user?.full_name || user?.email }}
|
values={{ user: userDisplay }}
|
||||||
components={[<Badge />]}
|
components={[<Badge />]}
|
||||||
/>
|
/>
|
||||||
</P>
|
</P>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export const initializeSupportSession = (user: ApiUser) => {
|
|||||||
if (!Crisp.isCrispInjected()) return
|
if (!Crisp.isCrispInjected()) return
|
||||||
const { id, email } = user
|
const { id, email } = user
|
||||||
Crisp.setTokenId(`meet-${id}`)
|
Crisp.setTokenId(`meet-${id}`)
|
||||||
Crisp.user.setEmail(email)
|
if (email) Crisp.user.setEmail(email)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const terminateSupportSession = () => {
|
export const terminateSupportSession = () => {
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
"heading": "Konto",
|
"heading": "Konto",
|
||||||
"youAreNotLoggedIn": "Sie sind nicht angemeldet.",
|
"youAreNotLoggedIn": "Sie sind nicht angemeldet.",
|
||||||
"nameLabel": "Ihr Name",
|
"nameLabel": "Ihr Name",
|
||||||
"authentication": "Authentifizierung"
|
"authentication": "Authentifizierung",
|
||||||
|
"nameError": "Ihr Name darf nicht leer sein"
|
||||||
},
|
},
|
||||||
"audio": {
|
"audio": {
|
||||||
"microphone": {
|
"microphone": {
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
"heading": "Account",
|
"heading": "Account",
|
||||||
"youAreNotLoggedIn": "You are not logged in.",
|
"youAreNotLoggedIn": "You are not logged in.",
|
||||||
"nameLabel": "Your Name",
|
"nameLabel": "Your Name",
|
||||||
"authentication": "Authentication"
|
"authentication": "Authentication",
|
||||||
|
"nameError": "Your name cannot be empty"
|
||||||
},
|
},
|
||||||
"audio": {
|
"audio": {
|
||||||
"microphone": {
|
"microphone": {
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
"heading": "Compte",
|
"heading": "Compte",
|
||||||
"youAreNotLoggedIn": "Vous n'êtes pas connecté.",
|
"youAreNotLoggedIn": "Vous n'êtes pas connecté.",
|
||||||
"nameLabel": "Votre Nom",
|
"nameLabel": "Votre Nom",
|
||||||
"authentication": "Authentification"
|
"authentication": "Authentification",
|
||||||
|
"nameError": "Votre Nom ne peut pas être vide"
|
||||||
},
|
},
|
||||||
"audio": {
|
"audio": {
|
||||||
"microphone": {
|
"microphone": {
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
"heading": "Account",
|
"heading": "Account",
|
||||||
"youAreNotLoggedIn": "U bent niet ingelogd.",
|
"youAreNotLoggedIn": "U bent niet ingelogd.",
|
||||||
"nameLabel": "Uw naam",
|
"nameLabel": "Uw naam",
|
||||||
"authentication": "Authenticatie"
|
"authentication": "Authenticatie",
|
||||||
|
"nameError": "Uw naam mag niet leeg zijn"
|
||||||
},
|
},
|
||||||
"audio": {
|
"audio": {
|
||||||
"microphone": {
|
"microphone": {
|
||||||
|
|||||||
Reference in New Issue
Block a user