✨(frontend) introduce 'effects' menu item
Increased all icons size, as they looked a bit small on screen. Introduce a new component separator, to organize menu items in section. Work in progress, added the 'effects' item, which triggers no action yet.
This commit is contained in:
committed by
aleb_the_flash
parent
7896890ffc
commit
b9d13de591
@@ -1,13 +1,15 @@
|
|||||||
import { menuItemRecipe } from '@/primitives/menuItemRecipe'
|
import { menuItemRecipe } from '@/primitives/menuItemRecipe'
|
||||||
import {
|
import {
|
||||||
|
RiAccountBoxLine,
|
||||||
RiFeedbackLine,
|
RiFeedbackLine,
|
||||||
RiQuestionLine,
|
RiQuestionLine,
|
||||||
RiSettings3Line,
|
RiSettings3Line,
|
||||||
} from '@remixicon/react'
|
} from '@remixicon/react'
|
||||||
import { MenuItem, Menu as RACMenu } from 'react-aria-components'
|
import { MenuItem, Menu as RACMenu, Section } from 'react-aria-components'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { Dispatch, SetStateAction } from 'react'
|
import { Dispatch, SetStateAction } from 'react'
|
||||||
import { DialogState } from '@/features/rooms/livekit/components/controls/Options/OptionsButton'
|
import { DialogState } from './OptionsButton'
|
||||||
|
import { Separator } from '@/primitives/Separator'
|
||||||
|
|
||||||
// @todo try refactoring it to use MenuList component
|
// @todo try refactoring it to use MenuList component
|
||||||
export const OptionsMenuItems = ({
|
export const OptionsMenuItems = ({
|
||||||
@@ -24,29 +26,41 @@ export const OptionsMenuItems = ({
|
|||||||
width: '300px',
|
width: '300px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<MenuItem
|
<Section>
|
||||||
href="https://tchap.gouv.fr/#/room/!aGImQayAgBLjSBycpm:agent.dinum.tchap.gouv.fr?via=agent.dinum.tchap.gouv.fr"
|
<MenuItem
|
||||||
target="_blank"
|
onAction={() => console.log('open dialog')}
|
||||||
className={menuItemRecipe({ icon: true })}
|
className={menuItemRecipe({ icon: true })}
|
||||||
>
|
>
|
||||||
<RiQuestionLine size={18} />
|
<RiAccountBoxLine size={20} />
|
||||||
{t('support')}
|
{t('effects')}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem
|
</Section>
|
||||||
href="https://grist.incubateur.net/o/docs/forms/1YrfNP1QSSy8p2gCxMFnSf/4"
|
<Separator />
|
||||||
target="_blank"
|
<Section>
|
||||||
className={menuItemRecipe({ icon: true })}
|
<MenuItem
|
||||||
>
|
href="https://tchap.gouv.fr/#/room/!aGImQayAgBLjSBycpm:agent.dinum.tchap.gouv.fr?via=agent.dinum.tchap.gouv.fr"
|
||||||
<RiFeedbackLine size={18} />
|
target="_blank"
|
||||||
{t('feedbacks')}
|
className={menuItemRecipe({ icon: true })}
|
||||||
</MenuItem>
|
>
|
||||||
<MenuItem
|
<RiQuestionLine size={20} />
|
||||||
className={menuItemRecipe({ icon: true })}
|
{t('support')}
|
||||||
onAction={() => onOpenDialog('settings')}
|
</MenuItem>
|
||||||
>
|
<MenuItem
|
||||||
<RiSettings3Line size={18} />
|
href="https://grist.incubateur.net/o/docs/forms/1YrfNP1QSSy8p2gCxMFnSf/4"
|
||||||
{t('settings')}
|
target="_blank"
|
||||||
</MenuItem>
|
className={menuItemRecipe({ icon: true })}
|
||||||
|
>
|
||||||
|
<RiFeedbackLine size={20} />
|
||||||
|
{t('feedbacks')}
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem
|
||||||
|
className={menuItemRecipe({ icon: true })}
|
||||||
|
onAction={() => onOpenDialog('settings')}
|
||||||
|
>
|
||||||
|
<RiSettings3Line size={20} />
|
||||||
|
{t('settings')}
|
||||||
|
</MenuItem>
|
||||||
|
</Section>
|
||||||
</RACMenu>
|
</RACMenu>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,7 +69,8 @@
|
|||||||
"feedbacks": "",
|
"feedbacks": "",
|
||||||
"support": "",
|
"support": "",
|
||||||
"settings": "",
|
"settings": "",
|
||||||
"username": ""
|
"username": "",
|
||||||
|
"effects": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"participants": {
|
"participants": {
|
||||||
|
|||||||
@@ -67,7 +67,8 @@
|
|||||||
"feedbacks": "Give us feedbacks",
|
"feedbacks": "Give us feedbacks",
|
||||||
"support": "Get Help on Tchap",
|
"support": "Get Help on Tchap",
|
||||||
"settings": "Settings",
|
"settings": "Settings",
|
||||||
"username": "Update Your Name"
|
"username": "Update Your Name",
|
||||||
|
"effects": "Apply effects"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"participants": {
|
"participants": {
|
||||||
|
|||||||
@@ -67,7 +67,8 @@
|
|||||||
"feedbacks": "Partager votre avis",
|
"feedbacks": "Partager votre avis",
|
||||||
"support": "Obtenir de l'aide sur Tchap",
|
"support": "Obtenir de l'aide sur Tchap",
|
||||||
"settings": "Paramètres",
|
"settings": "Paramètres",
|
||||||
"username": "Choisir votre nom"
|
"username": "Choisir votre nom",
|
||||||
|
"effects": "Appliquer des effets"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"participants": {
|
"participants": {
|
||||||
|
|||||||
10
src/frontend/src/primitives/Separator.tsx
Normal file
10
src/frontend/src/primitives/Separator.tsx
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import { styled } from '@/styled-system/jsx'
|
||||||
|
import { Separator as RACSeparator } from 'react-aria-components'
|
||||||
|
|
||||||
|
export const Separator = styled(RACSeparator, {
|
||||||
|
base: {
|
||||||
|
height: '1px',
|
||||||
|
background: 'gray.400',
|
||||||
|
margin: '4px 0',
|
||||||
|
},
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user