💄(frontend) organize blurring options

Add visual container and a heading to indicate buttons are
blurring options.
This commit is contained in:
lebaudantoine
2024-09-19 19:17:04 +02:00
committed by aleb_the_flash
parent 607a5fc99d
commit 021e52d9eb
4 changed files with 53 additions and 31 deletions

View File

@@ -1,7 +1,7 @@
import { useEffect, useRef, useState } from 'react' import { useEffect, useRef, useState } from 'react'
import { useLocalParticipant } from '@livekit/components-react' import { useLocalParticipant } from '@livekit/components-react'
import { LocalVideoTrack } from 'livekit-client' import { LocalVideoTrack } from 'livekit-client'
import { Text, P, ToggleButton } from '@/primitives' import { Text, P, ToggleButton, Div, H } from '@/primitives'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { HStack, VStack } from '@/styled-system/jsx' import { HStack, VStack } from '@/styled-system/jsx'
import { import {
@@ -92,8 +92,8 @@ export const Effects = () => {
muted muted
style={{ style={{
transform: 'rotateY(180deg)', transform: 'rotateY(180deg)',
minHeight: '173px', minHeight: '175px',
borderRadius: '4px', borderRadius: '8px',
}} }}
/> />
) : ( ) : (
@@ -119,6 +119,24 @@ export const Effects = () => {
</P> </P>
</div> </div>
)} )}
<Div
alignItems={'left'}
width={'100%'}
style={{
border: '1px solid #dadce0',
borderRadius: '8px',
margin: '0 .625rem',
padding: '0.5rem 1rem',
}}
>
<H
lvl={3}
style={{
marginBottom: '0.4rem',
}}
>
{t('heading')}
</H>
{ProcessorWrapper.isSupported ? ( {ProcessorWrapper.isSupported ? (
<HStack> <HStack>
<ToggleButton <ToggleButton
@@ -147,6 +165,7 @@ export const Effects = () => {
) : ( ) : (
<Text variant="sm">{t('notAvailable')}</Text> <Text variant="sm">{t('notAvailable')}</Text>
)} )}
</Div>
</VStack> </VStack>
) )
} }

View File

@@ -76,6 +76,7 @@
"effects": { "effects": {
"activateCamera": "", "activateCamera": "",
"notAvailable": "", "notAvailable": "",
"heading": "",
"blur": { "blur": {
"light": "", "light": "",
"normal": "", "normal": "",

View File

@@ -74,6 +74,7 @@
"effects": { "effects": {
"activateCamera": "Your camera is disabled. Choose an option to enable it.", "activateCamera": "Your camera is disabled. Choose an option to enable it.",
"notAvailable": "The blur effect will be available soon on your browser. We're working on it! In the meantime, you can use Google Chrome :(", "notAvailable": "The blur effect will be available soon on your browser. We're working on it! In the meantime, you can use Google Chrome :(",
"heading": "Blur",
"blur": { "blur": {
"light": "Light blur", "light": "Light blur",
"normal": "Blur", "normal": "Blur",

View File

@@ -74,6 +74,7 @@
"effects": { "effects": {
"activateCamera": "Votre camera est désactivée. Choisissez une option pour l'activer.", "activateCamera": "Votre camera est désactivée. Choisissez une option pour l'activer.",
"notAvailable": "L'effet de flou sera bientôt disponible sur votre navigateur. Nous y travaillons ! En attendant, vous pouvez utiliser Google Chrome :(", "notAvailable": "L'effet de flou sera bientôt disponible sur votre navigateur. Nous y travaillons ! En attendant, vous pouvez utiliser Google Chrome :(",
"heading": "Flou",
"blur": { "blur": {
"light": "Léger flou", "light": "Léger flou",
"normal": "Flou", "normal": "Flou",