mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-13 08:55:48 +01:00
feat: improve design and layout of design selector
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
import {
|
import {
|
||||||
ActionIcon,
|
ActionIcon,
|
||||||
Box,
|
|
||||||
Center,
|
Center,
|
||||||
Checkbox,
|
Checkbox,
|
||||||
createStyles,
|
createStyles,
|
||||||
|
Flex,
|
||||||
Group,
|
Group,
|
||||||
Paper,
|
Paper,
|
||||||
Stack,
|
Stack,
|
||||||
@@ -11,7 +11,6 @@ import {
|
|||||||
Title,
|
Title,
|
||||||
useMantineTheme,
|
useMantineTheme,
|
||||||
} from '@mantine/core';
|
} from '@mantine/core';
|
||||||
import { IconBrandDocker, IconLayout, IconSearch } from '@tabler/icons';
|
|
||||||
import { ChangeEvent, Dispatch, SetStateAction, useState } from 'react';
|
import { ChangeEvent, Dispatch, SetStateAction, useState } from 'react';
|
||||||
import { useConfigContext } from '../../../../config/provider';
|
import { useConfigContext } from '../../../../config/provider';
|
||||||
import { useConfigStore } from '../../../../config/store';
|
import { useConfigStore } from '../../../../config/store';
|
||||||
@@ -65,17 +64,8 @@ export const LayoutSelector = ({ defaultLayout }: LayoutSelectorProps) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box className={classes.box} p="xl" pb="sm">
|
|
||||||
<Stack spacing="xs">
|
<Stack spacing="xs">
|
||||||
<Group spacing={5}>
|
|
||||||
<IconLayout size={20} />
|
|
||||||
<Title order={6}>Dashboard layout</Title>
|
<Title order={6}>Dashboard layout</Title>
|
||||||
</Group>
|
|
||||||
|
|
||||||
<Text color="dimmed" size="sm">
|
|
||||||
You can adjust the layout of the Dashboard to your preferences. The main are cannot be
|
|
||||||
turned on or off
|
|
||||||
</Text>
|
|
||||||
|
|
||||||
<Paper px="xs" py={4} withBorder>
|
<Paper px="xs" py={4} withBorder>
|
||||||
<Group position="apart">
|
<Group position="apart">
|
||||||
@@ -98,27 +88,37 @@ export const LayoutSelector = ({ defaultLayout }: LayoutSelectorProps) => {
|
|||||||
|
|
||||||
<Group align="stretch">
|
<Group align="stretch">
|
||||||
{leftSidebar && (
|
{leftSidebar && (
|
||||||
<Paper p="xs" withBorder>
|
<Paper className={classes.secondaryWrapper} p="xs" withBorder>
|
||||||
<Center style={{ height: '100%' }}>
|
<Flex align="center" justify="center" direction="column">
|
||||||
<Text align="center">Sidebar</Text>
|
<Text align="center">Sidebar</Text>
|
||||||
</Center>
|
<Text color="dimmed" size="xs" align="center">
|
||||||
|
Only for
|
||||||
|
<br />
|
||||||
|
services &<br />
|
||||||
|
integrations
|
||||||
|
</Text>
|
||||||
|
</Flex>
|
||||||
</Paper>
|
</Paper>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Paper className={classes.main} p="xs" withBorder>
|
<Paper className={classes.primaryWrapper} p="xs" withBorder>
|
||||||
<Text align="center">Main</Text>
|
<Text align="center">Main</Text>
|
||||||
<Text color="dimmed" size="xs" align="center">
|
<Text color="dimmed" size="xs" align="center">
|
||||||
Can be used for categories,
|
Cannot be turned of.
|
||||||
<br />
|
|
||||||
services and integrations
|
|
||||||
</Text>
|
</Text>
|
||||||
</Paper>
|
</Paper>
|
||||||
|
|
||||||
{rightSidebar && (
|
{rightSidebar && (
|
||||||
<Paper p="xs" withBorder>
|
<Paper className={classes.secondaryWrapper} p="xs" withBorder>
|
||||||
<Center style={{ height: '100%' }}>
|
<Flex align="center" justify="center" direction="column">
|
||||||
<Text align="center">Sidebar</Text>
|
<Text align="center">Sidebar</Text>
|
||||||
</Center>
|
<Text color="dimmed" size="xs" align="center">
|
||||||
|
Only for
|
||||||
|
<br />
|
||||||
|
services &<br />
|
||||||
|
integrations
|
||||||
|
</Text>
|
||||||
|
</Flex>
|
||||||
</Paper>
|
</Paper>
|
||||||
)}
|
)}
|
||||||
</Group>
|
</Group>
|
||||||
@@ -153,16 +153,15 @@ export const LayoutSelector = ({ defaultLayout }: LayoutSelectorProps) => {
|
|||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Box>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const useStyles = createStyles((theme) => ({
|
const useStyles = createStyles((theme) => ({
|
||||||
main: {
|
primaryWrapper: {
|
||||||
flexGrow: 1,
|
flexGrow: 2,
|
||||||
},
|
},
|
||||||
box: {
|
secondaryWrapper: {
|
||||||
backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.colors.gray[1],
|
flexGrow: 1,
|
||||||
borderRadius: theme.radius.md,
|
maxWidth: 100,
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|||||||
Reference in New Issue
Block a user