feat: mobile drawer editors ui enhancement
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { IconChevronLeft, IconSettings } from "@tabler/icons-react";
|
import { IconChevronLeft, IconSettings } from "@tabler/icons-react";
|
||||||
import { Box, Group, Stack, Text } from "@mantine/core";
|
import { Box, Group, Stack, Title } from "@mantine/core";
|
||||||
import Boards from "@/app/deals/components/shared/Boards/Boards";
|
import Boards from "@/app/deals/components/shared/Boards/Boards";
|
||||||
import { useBoardsContext } from "@/app/deals/contexts/BoardsContext";
|
import { useBoardsContext } from "@/app/deals/contexts/BoardsContext";
|
||||||
import { useProjectsContext } from "@/app/deals/contexts/ProjectsContext";
|
import { useProjectsContext } from "@/app/deals/contexts/ProjectsContext";
|
||||||
@ -51,7 +51,7 @@ const MainBlockHeader = () => {
|
|||||||
onClick={openProjectsEditorDrawer}>
|
onClick={openProjectsEditorDrawer}>
|
||||||
<IconChevronLeft />
|
<IconChevronLeft />
|
||||||
</Box>
|
</Box>
|
||||||
<Text>{selectedProject?.name}</Text>
|
<Title order={6}>{selectedProject?.name}</Title>
|
||||||
<Box
|
<Box
|
||||||
p={"md"}
|
p={"md"}
|
||||||
onClick={openBoardsEditorDrawer}>
|
onClick={openBoardsEditorDrawer}>
|
||||||
|
|||||||
@ -30,7 +30,6 @@ const BoardsMobileEditorDrawer: FC<DrawerProps<Props>> = ({
|
|||||||
height: "100%",
|
height: "100%",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
gap: "xs",
|
|
||||||
},
|
},
|
||||||
}}>
|
}}>
|
||||||
<BoardsMobileContextProvider project={project}>
|
<BoardsMobileContextProvider project={project}>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import React, { FC, ReactNode } from "react";
|
import React, { FC, ReactNode } from "react";
|
||||||
import { IconChevronLeft, IconGripVertical } from "@tabler/icons-react";
|
import { IconChevronLeft, IconGripVertical } from "@tabler/icons-react";
|
||||||
import { Box, Center, Divider, Group, Text } from "@mantine/core";
|
import { Box, Center, Divider, Group, Stack, Title } from "@mantine/core";
|
||||||
import BoardMobile from "@/app/deals/drawers/BoardsMobileEditorDrawer/components/BoardMobile";
|
import BoardMobile from "@/app/deals/drawers/BoardsMobileEditorDrawer/components/BoardMobile";
|
||||||
import CreateBoardButton from "@/app/deals/drawers/BoardsMobileEditorDrawer/components/CreateBoardButton";
|
import CreateBoardButton from "@/app/deals/drawers/BoardsMobileEditorDrawer/components/CreateBoardButton";
|
||||||
import { useBoardsMobileContext } from "@/app/deals/drawers/BoardsMobileEditorDrawer/contexts/BoardsMobileContext";
|
import { useBoardsMobileContext } from "@/app/deals/drawers/BoardsMobileEditorDrawer/contexts/BoardsMobileContext";
|
||||||
@ -37,7 +37,7 @@ const BoardsDrawerBody: FC<Props> = ({ onClose }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<Stack gap={"xs"}>
|
||||||
<Group justify={"space-between"}>
|
<Group justify={"space-between"}>
|
||||||
<Box
|
<Box
|
||||||
onClick={onClose}
|
onClick={onClose}
|
||||||
@ -45,7 +45,7 @@ const BoardsDrawerBody: FC<Props> = ({ onClose }) => {
|
|||||||
<IconChevronLeft />
|
<IconChevronLeft />
|
||||||
</Box>
|
</Box>
|
||||||
<Center>
|
<Center>
|
||||||
<Text>{project.name}</Text>
|
<Title order={6}>{project.name}</Title>
|
||||||
</Center>
|
</Center>
|
||||||
<Box p={"lg"} />
|
<Box p={"lg"} />
|
||||||
</Group>
|
</Group>
|
||||||
@ -58,8 +58,9 @@ const BoardsDrawerBody: FC<Props> = ({ onClose }) => {
|
|||||||
dragHandleStyle={{ width: "auto" }}
|
dragHandleStyle={{ width: "auto" }}
|
||||||
vertical
|
vertical
|
||||||
/>
|
/>
|
||||||
|
{boards.length > 0 && <Divider />}
|
||||||
<CreateBoardButton onCreateBoard={boardsCrud.onCreate} />
|
<CreateBoardButton onCreateBoard={boardsCrud.onCreate} />
|
||||||
</>
|
</Stack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import React, { FC } from "react";
|
import React, { FC } from "react";
|
||||||
import { Center, Divider, Drawer, Text } from "@mantine/core";
|
import { Center, Divider, Drawer, Stack, Title } from "@mantine/core";
|
||||||
import { ProjectsContextProvider } from "@/app/deals/contexts/ProjectsContext";
|
import { ProjectsContextProvider } from "@/app/deals/contexts/ProjectsContext";
|
||||||
import ProjectsDrawerBody from "@/app/deals/drawers/StatusesMobileEditorDrawer/components/ProjectsDrawerBody";
|
import ProjectsDrawerBody from "@/app/deals/drawers/StatusesMobileEditorDrawer/components/ProjectsDrawerBody";
|
||||||
import { DrawerProps } from "@/drawers/types";
|
import { DrawerProps } from "@/drawers/types";
|
||||||
@ -30,11 +30,11 @@ const ProjectsMobileEditorDrawer: FC<DrawerProps<Props>> = ({
|
|||||||
height: "100%",
|
height: "100%",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
gap: "xs",
|
|
||||||
},
|
},
|
||||||
}}>
|
}}>
|
||||||
<Center>
|
<Stack gap={"xs"}>
|
||||||
<Text>Проекты</Text>
|
<Center p={"xs"}>
|
||||||
|
<Title order={6}>Проекты</Title>
|
||||||
</Center>
|
</Center>
|
||||||
<Divider />
|
<Divider />
|
||||||
<ProjectsContextProvider>
|
<ProjectsContextProvider>
|
||||||
@ -43,6 +43,7 @@ const ProjectsMobileEditorDrawer: FC<DrawerProps<Props>> = ({
|
|||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
/>
|
/>
|
||||||
</ProjectsContextProvider>
|
</ProjectsContextProvider>
|
||||||
|
</Stack>
|
||||||
</Drawer>
|
</Drawer>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -34,9 +34,7 @@ const ProjectMobile: FC<Props> = ({ project, onSelect, closeDrawer }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Group
|
<Group
|
||||||
w={"100%"}
|
p={"xs"}
|
||||||
pl={"xs"}
|
|
||||||
py={"xs"}
|
|
||||||
justify={"space-between"}
|
justify={"space-between"}
|
||||||
wrap={"nowrap"}
|
wrap={"nowrap"}
|
||||||
className={styles.project}
|
className={styles.project}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import React, { FC } from "react";
|
import React, { FC } from "react";
|
||||||
import { Stack } from "@mantine/core";
|
import { Divider, Stack } from "@mantine/core";
|
||||||
import { useProjectsContext } from "@/app/deals/contexts/ProjectsContext";
|
import { useProjectsContext } from "@/app/deals/contexts/ProjectsContext";
|
||||||
import CreateProjectButton from "@/app/deals/drawers/ProjectsMobileEditorDrawer/components/CreateProjectButton";
|
import CreateProjectButton from "@/app/deals/drawers/ProjectsMobileEditorDrawer/components/CreateProjectButton";
|
||||||
import ProjectMobile from "@/app/deals/drawers/ProjectsMobileEditorDrawer/components/ProjectMobile";
|
import ProjectMobile from "@/app/deals/drawers/ProjectsMobileEditorDrawer/components/ProjectMobile";
|
||||||
@ -25,6 +25,7 @@ const ProjectsDrawerBody: FC<Props> = ({ onSelect, onClose }) => {
|
|||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</Stack>
|
</Stack>
|
||||||
|
<Divider />
|
||||||
<CreateProjectButton />
|
<CreateProjectButton />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user