💄 Improve design and add translations for mobile ribbons

This commit is contained in:
Manuel Ruwe
2023-01-04 20:33:29 +01:00
parent 3f957ee67c
commit d0c016aab6
3 changed files with 27 additions and 13 deletions

View File

@@ -0,0 +1,3 @@
{
"title": "{{position}} sidebar"
}

View File

@@ -1,4 +1,5 @@
import { Drawer, Title } from '@mantine/core'; import { Drawer, Title } from '@mantine/core';
import { useTranslation } from 'next-i18next';
import { DashboardSidebar } from '../../Wrappers/Sidebar/Sidebar'; import { DashboardSidebar } from '../../Wrappers/Sidebar/Sidebar';
interface MobileRibbonSidebarDrawerProps { interface MobileRibbonSidebarDrawerProps {
@@ -10,16 +11,25 @@ interface MobileRibbonSidebarDrawerProps {
export const MobileRibbonSidebarDrawer = ({ export const MobileRibbonSidebarDrawer = ({
location, location,
...props ...props
}: MobileRibbonSidebarDrawerProps) => ( }: MobileRibbonSidebarDrawerProps) => {
const { t } = useTranslation('layout/mobile/drawer');
return (
<Drawer <Drawer
padding={10}
position={location} position={location}
title={<Title order={4}>{location} sidebar</Title>} title={<Title order={4}>{t('title', { position: location })}</Title>}
style={{ style={{
display: 'flex', display: 'flex',
justifyContent: 'center', justifyContent: 'center',
}} }}
styles={{
title: {
width: '100%',
},
}}
{...props} {...props}
> >
<DashboardSidebar location={location} /> <DashboardSidebar location={location} />
</Drawer> </Drawer>
); );
};

View File

@@ -6,6 +6,7 @@ export const dashboardNamespaces = [
'layout/modals/change-position', 'layout/modals/change-position',
'layout/modals/about', 'layout/modals/about',
'layout/header/actions/toggle-edit-mode', 'layout/header/actions/toggle-edit-mode',
'layout/mobile/drawer',
'settings/common', 'settings/common',
'settings/general/theme-selector', 'settings/general/theme-selector',
'settings/general/config-changer', 'settings/general/config-changer',