Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The `QueueInfo` is removed for now. I will add it back in follow up PR. Most of the change are UI code, there is no logic here, it safe to merge Desktop <details> <summary>Light mode</summary> ![image](https://user-images.githubusercontent.com/33456881/233029668-d04702cd-9f3b-4315-a4e2-8d99d78c68aa.png) </details> <details> <summary>Dark mode</summary> ![image](https://user-images.githubusercontent.com/33456881/233029734-eaf0b350-43c8-487f-a1a4-13972280bb57.png) </details> Mobile <details> <summary>Light mode</summary> ![image](https://user-images.githubusercontent.com/33456881/233031042-45d5fd2c-ca70-48c4-b41a-abb6c70ac502.png)</details> <details> <summary>Dark mode</summary> ![image](https://user-images.githubusercontent.com/33456881/233031086-508eabc4-1910-4d81-b079-0a5720d7e67d.png)</details> --------- Co-authored-by: AbdBarho <ka70911@gmail.com>
- Loading branch information
Showing
24 changed files
with
432 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { Box } from "@chakra-ui/react"; | ||
import { useTranslation } from "next-i18next"; | ||
import { memo } from "react"; | ||
import SimpleBar from "simplebar-react"; | ||
|
||
import { ChatConfigForm } from "./ChatConfigForm"; | ||
|
||
export const ChatConfigDesktop = memo(function ChatConfigDesktop() { | ||
const { t } = useTranslation("chat"); | ||
return ( | ||
<Box | ||
py="4" | ||
pl="4" | ||
gap="1" | ||
height="full" | ||
minH="0" | ||
flexDirection="column" | ||
w="270px" | ||
display={{ base: "none", xl: "flex" }} | ||
_dark={{ | ||
bg: "blackAlpha.400", | ||
}} | ||
> | ||
<Box fontSize="xl" borderBottomWidth="1px" mb="4" pb="4"> | ||
{t("config_title")} | ||
</Box> | ||
|
||
<SimpleBar | ||
style={{ maxHeight: "100%", height: "100%", minHeight: "0" }} | ||
classNames={{ | ||
contentEl: "mr-4 flex flex-col overflow-y-auto items-center", | ||
}} | ||
> | ||
<ChatConfigForm></ChatConfigForm> | ||
</SimpleBar> | ||
</Box> | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { | ||
Drawer, | ||
DrawerBody, | ||
DrawerCloseButton, | ||
DrawerContent, | ||
DrawerHeader, | ||
DrawerOverlay, | ||
useDisclosure, | ||
} from "@chakra-ui/react"; | ||
import { Settings } from "lucide-react"; | ||
import { useTranslation } from "next-i18next"; | ||
import { memo } from "react"; | ||
|
||
import { ChatConfigForm } from "./ChatConfigForm"; | ||
import { ChatInputIconButton } from "./ChatInputIconButton"; | ||
|
||
export const ChatConfigDrawer = memo(function ChatConfigDrawer() { | ||
const { isOpen, onOpen, onClose } = useDisclosure(); | ||
|
||
const { t } = useTranslation("chat"); | ||
return ( | ||
<> | ||
<ChatInputIconButton | ||
aria-label={t("config_title")} | ||
icon={Settings} | ||
onClick={onOpen} | ||
borderRadius="xl" | ||
display={{ base: "flex", xl: "none" }} | ||
/> | ||
<Drawer placement="right" onClose={onClose} isOpen={isOpen}> | ||
<DrawerOverlay /> | ||
<DrawerContent> | ||
<DrawerCloseButton /> | ||
<DrawerHeader borderBottomWidth="1px">{t("config_title")}</DrawerHeader> | ||
<DrawerBody> | ||
<ChatConfigForm /> | ||
</DrawerBody> | ||
</DrawerContent> | ||
</Drawer> | ||
</> | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Box, BoxProps } from "@chakra-ui/react"; | ||
import { LucideIcon } from "lucide-react"; | ||
|
||
export const ChatInputIconButton = ({ icon: Icon, ...props }: { icon: LucideIcon } & BoxProps) => ( | ||
<Box | ||
as="button" | ||
color="gray.500" | ||
_light={{ | ||
_hover: { color: "gray.700" }, | ||
}} | ||
_dark={{ | ||
_hover: { color: "white" }, | ||
}} | ||
{...props} | ||
type="button" | ||
> | ||
<Icon size="20px"></Icon> | ||
</Box> | ||
); |
Oops, something went wrong.