✨(frontend) add placeholder for accessibility menu in settings panel
prepares UI for future accessibility options without implementing logic yet
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
|||||||
RiSettings3Line,
|
RiSettings3Line,
|
||||||
RiSpeakerLine,
|
RiSpeakerLine,
|
||||||
RiVideoOnLine,
|
RiVideoOnLine,
|
||||||
|
RiEyeLine,
|
||||||
} from '@remixicon/react'
|
} from '@remixicon/react'
|
||||||
import { AccountTab } from './tabs/AccountTab'
|
import { AccountTab } from './tabs/AccountTab'
|
||||||
import { NotificationsTab } from './tabs/NotificationsTab'
|
import { NotificationsTab } from './tabs/NotificationsTab'
|
||||||
@@ -22,6 +23,7 @@ import { useRef } from 'react'
|
|||||||
import { useMediaQuery } from '@/features/rooms/livekit/hooks/useMediaQuery'
|
import { useMediaQuery } from '@/features/rooms/livekit/hooks/useMediaQuery'
|
||||||
import { SettingsDialogExtendedKey } from '@/features/settings/type'
|
import { SettingsDialogExtendedKey } from '@/features/settings/type'
|
||||||
import { useIsAdminOrOwner } from '@/features/rooms/livekit/hooks/useIsAdminOrOwner'
|
import { useIsAdminOrOwner } from '@/features/rooms/livekit/hooks/useIsAdminOrOwner'
|
||||||
|
import AccessibilityTab from './tabs/AccessibilityTab'
|
||||||
|
|
||||||
const tabsStyle = css({
|
const tabsStyle = css({
|
||||||
maxHeight: '40.625rem', // fixme size copied from meet settings modal
|
maxHeight: '40.625rem', // fixme size copied from meet settings modal
|
||||||
@@ -112,6 +114,11 @@ export const SettingsDialogExtended = (props: SettingsDialogExtended) => {
|
|||||||
t(`tabs.${SettingsDialogExtendedKey.TRANSCRIPTION}`)}
|
t(`tabs.${SettingsDialogExtendedKey.TRANSCRIPTION}`)}
|
||||||
</Tab>
|
</Tab>
|
||||||
)}
|
)}
|
||||||
|
<Tab icon highlight id={SettingsDialogExtendedKey.ACCESSIBILITY}>
|
||||||
|
<RiEyeLine />
|
||||||
|
{isWideScreen &&
|
||||||
|
t(`tabs.${SettingsDialogExtendedKey.ACCESSIBILITY}`)}
|
||||||
|
</Tab>
|
||||||
</TabList>
|
</TabList>
|
||||||
</div>
|
</div>
|
||||||
<div className={tabPanelContainerStyle}>
|
<div className={tabPanelContainerStyle}>
|
||||||
@@ -125,6 +132,7 @@ export const SettingsDialogExtended = (props: SettingsDialogExtended) => {
|
|||||||
<NotificationsTab id={SettingsDialogExtendedKey.NOTIFICATIONS} />
|
<NotificationsTab id={SettingsDialogExtendedKey.NOTIFICATIONS} />
|
||||||
{/* Transcription tab won't be accessible if the tab is not active in the tab list */}
|
{/* Transcription tab won't be accessible if the tab is not active in the tab list */}
|
||||||
<TranscriptionTab id={SettingsDialogExtendedKey.TRANSCRIPTION} />
|
<TranscriptionTab id={SettingsDialogExtendedKey.TRANSCRIPTION} />
|
||||||
|
<AccessibilityTab id={SettingsDialogExtendedKey.ACCESSIBILITY} />
|
||||||
</div>
|
</div>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
import { Field, H } from '@/primitives'
|
||||||
|
import { TabPanel, TabPanelProps } from '@/primitives/Tabs'
|
||||||
|
import { css } from '@/styled-system/css'
|
||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
||||||
|
export type AccessibilityTabProps = Pick<TabPanelProps, 'id'>
|
||||||
|
|
||||||
|
export const AccessibilityTab = ({ id }: AccessibilityTabProps) => {
|
||||||
|
const { t } = useTranslation('settings', { keyPrefix: 'tabs' })
|
||||||
|
|
||||||
|
return (
|
||||||
|
<TabPanel padding={'md'} flex id={id}>
|
||||||
|
<H lvl={2}>{t('accessibility')}</H>
|
||||||
|
<ul
|
||||||
|
className={css({
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
gap: '1rem',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<li>
|
||||||
|
<Field type="switch" label={t('accessibility.label')} />
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</TabPanel>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AccessibilityTab
|
||||||
@@ -5,4 +5,5 @@ export enum SettingsDialogExtendedKey {
|
|||||||
GENERAL = 'general',
|
GENERAL = 'general',
|
||||||
NOTIFICATIONS = 'notifications',
|
NOTIFICATIONS = 'notifications',
|
||||||
TRANSCRIPTION = 'transcription',
|
TRANSCRIPTION = 'transcription',
|
||||||
|
ACCESSIBILITY = 'accessibility',
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,6 +114,7 @@
|
|||||||
"video": "Video",
|
"video": "Video",
|
||||||
"general": "General",
|
"general": "General",
|
||||||
"notifications": "Notifications",
|
"notifications": "Notifications",
|
||||||
|
"accessibility": "Accessibility",
|
||||||
"transcription": "Transcription"
|
"transcription": "Transcription"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,6 +114,7 @@
|
|||||||
"video": "Vidéo",
|
"video": "Vidéo",
|
||||||
"general": "Général",
|
"general": "Général",
|
||||||
"notifications": "Notifications",
|
"notifications": "Notifications",
|
||||||
|
"accessibility": "Accessibilité",
|
||||||
"transcription": "Transcription"
|
"transcription": "Transcription"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user