1/n Fixing dark mode
This commit is contained in:
parent
f42e57d464
commit
8d886e0961
6 changed files with 31 additions and 35 deletions
|
|
@ -4,10 +4,10 @@ import { AppContext, APIContext } from "./context";
|
|||
import { RootContent } from "./components/RootContent";
|
||||
import { customSetInterval } from "./helper/customSetInterval";
|
||||
import { IconButton } from "./components/buttons/IconButton";
|
||||
import { BsBodyText } from "react-icons/bs";
|
||||
import { BsBodyText, BsMoon } from "react-icons/bs";
|
||||
import { LogStreamModal } from "./components/modal/LogStreamModal";
|
||||
import { Header } from "./components/Header";
|
||||
import DarkModeToggle from "./components/buttons/DarkModeToggle";
|
||||
import { DarkMode } from "./helper/darkMode";
|
||||
|
||||
export interface ErrorWithLabel {
|
||||
text: string;
|
||||
|
|
@ -68,7 +68,7 @@ export const RqbitWebUI = (props: {
|
|||
return (
|
||||
<AppContext.Provider value={context}>
|
||||
<Header title={props.title} />
|
||||
<div className="relative dark:bg-gray-900 pt-3 min-h-screen h-full">
|
||||
<div className="relative dark:bg-gray-900">
|
||||
{/* Menu buttons */}
|
||||
<div className="absolute top-0 start-0 pl-2 z-10">
|
||||
{props.menuButtons &&
|
||||
|
|
@ -76,6 +76,9 @@ export const RqbitWebUI = (props: {
|
|||
<IconButton onClick={() => setLogsOpened(true)}>
|
||||
<BsBodyText />
|
||||
</IconButton>
|
||||
<IconButton onClick={DarkMode.toggle}>
|
||||
<BsMoon />
|
||||
</IconButton>
|
||||
</div>
|
||||
|
||||
<RootContent
|
||||
|
|
@ -87,7 +90,6 @@ export const RqbitWebUI = (props: {
|
|||
</div>
|
||||
|
||||
<LogStreamModal show={logsOpened} onClose={() => setLogsOpened(false)} />
|
||||
<DarkModeToggle />
|
||||
</AppContext.Provider>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue