Skip to content

Commit

Permalink
fix: add some background color
Browse files Browse the repository at this point in the history
  • Loading branch information
vaayne committed Aug 27, 2024
1 parent 6e84d3a commit 0eb5055
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
5 changes: 4 additions & 1 deletion web/src/components/header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ import { Flex } from "@mantine/core";
import React from "react";
import { HeaderMenu } from "./header-menu";
import { ShowNavbarButton } from "./header-show-navbar-button";
import useStore from "../libs/store";

export default function Header({ hasNavBar }) {
const isDarkMode = useStore((state) => state.isDarkMode);
return (
<>
<Flex
Expand All @@ -12,7 +14,8 @@ export default function Header({ hasNavBar }) {
align="center"
gap="lg"
px="sm"
m="0"
h="100%"
bg={isDarkMode ? "dark.8" : "gray.3"}
>
<ShowNavbarButton hasNavBar={hasNavBar} />

Expand Down
3 changes: 2 additions & 1 deletion web/src/components/layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const theme = createTheme({
},
}),
},
// autoContrast: true,
primaryColor: "primary",
colors: {
// Default: For neutral, non-emphasized UI elements
Expand Down Expand Up @@ -171,7 +172,7 @@ export default function Layout({ main, nav = null, header = null }) {
<AppShell.Header>
{header ? header : <Header hasNavBar={hasNavBar} />}
</AppShell.Header>
<AppShell.Navbar p="md">{nav}</AppShell.Navbar>
<AppShell.Navbar>{nav}</AppShell.Navbar>
<AppShell.Main>{main}</AppShell.Main>
</AppShell>
</ModalsProvider>
Expand Down
5 changes: 4 additions & 1 deletion web/src/components/thread-header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { ShowNavbarButton } from "./header-show-navbar-button";
import { ThreadAddButton } from "./thread-add-button";

export default function ThreadHeader() {
const isDarkMode = useStore((state) => state.isDarkMode);
const setThreadIsOpenSettings = useStore(
(state) => state.setThreadIsOpenSettings,
);
Expand All @@ -18,7 +19,9 @@ export default function ThreadHeader() {
justify="space-between"
align="center"
gap="lg"
mx="sm"
px="sm"
h="100%"
bg={isDarkMode ? "dark.8" : "gray.4"}
>
<Group gap="2" align="center">
<ShowNavbarButton hasNavBar={true} />
Expand Down
3 changes: 3 additions & 0 deletions web/src/components/thread-sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import useStore from "../libs/store";
import { ThreadAddButton } from "./thread-add-button";

export default function Sidebar() {
const isDarkMode = useStore((state) => state.isDarkMode);
const isLogin = useStore((state) => state.isLogin);
const assistant = useStore((state) => state.assistant);
const thread = useStore((state) => state.thread);
Expand Down Expand Up @@ -82,7 +83,9 @@ export default function Sidebar() {
gap="md"
p="sm"
h="100%"
m="0"
radius="md"
bg={isDarkMode ? "dark.6" : "gray.2"}
>
<Stack align="stretch" justify="start" gap="md">
<Flex justify="center" align="center" gap="md">
Expand Down

0 comments on commit 0eb5055

Please sign in to comment.