mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 07:25:48 +01:00
💄 Improve design and add translations for mobile ribbons
This commit is contained in:
3
public/locales/en/layout/mobile/drawer.json
Normal file
3
public/locales/en/layout/mobile/drawer.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"title": "{{position}} sidebar"
|
||||||
|
}
|
||||||
@@ -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) => {
|
||||||
<Drawer
|
const { t } = useTranslation('layout/mobile/drawer');
|
||||||
position={location}
|
return (
|
||||||
title={<Title order={4}>{location} sidebar</Title>}
|
<Drawer
|
||||||
style={{
|
padding={10}
|
||||||
display: 'flex',
|
position={location}
|
||||||
justifyContent: 'center',
|
title={<Title order={4}>{t('title', { position: location })}</Title>}
|
||||||
}}
|
style={{
|
||||||
{...props}
|
display: 'flex',
|
||||||
>
|
justifyContent: 'center',
|
||||||
<DashboardSidebar location={location} />
|
}}
|
||||||
</Drawer>
|
styles={{
|
||||||
);
|
title: {
|
||||||
|
width: '100%',
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
{...props}
|
||||||
|
>
|
||||||
|
<DashboardSidebar location={location} />
|
||||||
|
</Drawer>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|||||||
@@ -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',
|
||||||
|
|||||||
Reference in New Issue
Block a user