🚸(frontend) explain to a user her was ejected

Add a clear feedback message explaining to users when they are ejected from a
meeting, explicitly stating that the action was taken by an admin.
This commit is contained in:
lebaudantoine
2026-01-10 14:39:13 +01:00
committed by aleb_the_flash
parent 8072d2c950
commit d7f1b7b94c
7 changed files with 25 additions and 9 deletions

View File

@@ -13,6 +13,7 @@ and this project adheres to
- ✨(summary) add dutch and german languages - ✨(summary) add dutch and german languages
- 🔧(agents) make Silero VAD optional - 🔧(agents) make Silero VAD optional
- 🚸(frontend) explain to a user they were ejected
### Changed ### Changed

View File

@@ -233,11 +233,12 @@ export const Conference = ({
navigateTo('feedback') navigateTo('feedback')
return return
case DisconnectReason.DUPLICATE_IDENTITY: case DisconnectReason.DUPLICATE_IDENTITY:
case DisconnectReason.PARTICIPANT_REMOVED:
navigateTo( navigateTo(
'feedback', 'feedback',
{}, {},
{ {
state: { reason: 'duplicateIdentity' }, state: { reason: e },
} }
) )
return return

View File

@@ -4,6 +4,8 @@ import { Screen } from '@/layout/Screen'
import { Center, HStack, styled, VStack } from '@/styled-system/jsx' import { Center, HStack, styled, VStack } from '@/styled-system/jsx'
import { Rating } from '@/features/rooms/components/Rating.tsx' import { Rating } from '@/features/rooms/components/Rating.tsx'
import { useLocation } from 'wouter' import { useLocation } from 'wouter'
import { useMemo } from 'react'
import { DisconnectReason } from 'livekit-client'
// fixme - duplicated with home, refactor in a proper style // fixme - duplicated with home, refactor in a proper style
const Heading = styled('h1', { const Heading = styled('h1', {
@@ -24,15 +26,23 @@ export const FeedbackRoute = () => {
const { t } = useTranslation('rooms') const { t } = useTranslation('rooms')
const [, setLocation] = useLocation() const [, setLocation] = useLocation()
const state = window.history.state const reasonKey = useMemo(() => {
const state = window.history.state
if (!state?.reason) return
switch (state.reason) {
case DisconnectReason.DUPLICATE_IDENTITY:
return 'duplicateIdentity'
case DisconnectReason.PARTICIPANT_REMOVED:
return 'participantRemoved'
}
}, [])
return ( return (
<Screen layout="centered" footer={false}> <Screen layout="centered" footer={false}>
<Center> <Center>
<VStack> <VStack>
<Heading> <Heading>{t(`feedback.heading.${reasonKey || 'normal'}`)}</Heading>
{t(`feedback.heading.${state?.reason || 'normal'}`)}
</Heading>
<HStack> <HStack>
<Button variant="secondary" onPress={() => window.history.back()}> <Button variant="secondary" onPress={() => window.history.back()}>
{t('feedback.back')} {t('feedback.back')}

View File

@@ -2,7 +2,8 @@
"feedback": { "feedback": {
"heading": { "heading": {
"normal": "Sie haben das Meeting verlassen", "normal": "Sie haben das Meeting verlassen",
"duplicateIdentity": "Sie haben dem Meeting von einem anderen Gerät aus beigetreten" "duplicateIdentity": "Sie haben dem Meeting von einem anderen Gerät aus beigetreten",
"participantRemoved": "Sie wurden von einem Administrator aus dem Anruf entfernt"
}, },
"home": "Zur Startseite zurückkehren", "home": "Zur Startseite zurückkehren",
"back": "Dem Meeting erneut beitreten" "back": "Dem Meeting erneut beitreten"

View File

@@ -2,7 +2,8 @@
"feedback": { "feedback": {
"heading": { "heading": {
"normal": "You have left the meeting", "normal": "You have left the meeting",
"duplicateIdentity": "You have joined the meeting from another device" "duplicateIdentity": "You have joined the meeting from another device",
"participantRemoved": "You have been removed from the meeting by an administrator"
}, },
"home": "Return to home", "home": "Return to home",
"back": "Rejoin the meeting" "back": "Rejoin the meeting"

View File

@@ -2,7 +2,8 @@
"feedback": { "feedback": {
"heading": { "heading": {
"normal": "Vous avez quitté la réunion", "normal": "Vous avez quitté la réunion",
"duplicateIdentity": "Vous avez rejoint la réunion depuis un autre appareil" "duplicateIdentity": "Vous avez rejoint la réunion depuis un autre appareil",
"participantRemoved": "Vous avez été exclu de l'appel par un administrateur"
}, },
"home": "Retourner à l'accueil", "home": "Retourner à l'accueil",
"back": "Réintégrer la réunion" "back": "Réintégrer la réunion"

View File

@@ -2,7 +2,8 @@
"feedback": { "feedback": {
"heading": { "heading": {
"normal": "Je hebt de vergadering verlaten", "normal": "Je hebt de vergadering verlaten",
"duplicateIdentity": "U heeft de vergadering via een ander apparaat geopend" "duplicateIdentity": "U heeft de vergadering via een ander apparaat geopend",
"participantRemoved": "U bent door een beheerder uit het gesprek verwijderd"
}, },
"home": "Keer terug naar het hoofdscherm", "home": "Keer terug naar het hoofdscherm",
"back": "Sluit weer bij de vergadering aan" "back": "Sluit weer bij de vergadering aan"