2/n Fixing dark mode bugs

This commit is contained in:
Igor Katson 2023-12-16 11:09:51 +00:00
parent 8d886e0961
commit 33c8b11c6e
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
15 changed files with 78 additions and 96 deletions

View file

@ -67,29 +67,34 @@ export const RqbitWebUI = (props: {
return (
<AppContext.Provider value={context}>
<Header title={props.title} />
<div className="relative dark:bg-gray-900">
{/* Menu buttons */}
<div className="absolute top-0 start-0 pl-2 z-10">
{props.menuButtons &&
props.menuButtons.map((b, i) => <span key={i}>{b}</span>)}
<IconButton onClick={() => setLogsOpened(true)}>
<BsBodyText />
</IconButton>
<IconButton onClick={DarkMode.toggle}>
<BsMoon />
</IconButton>
<div className="dark:bg-gray-900 dark:text-zinc-50 min-h-screen">
<Header title={props.title} />
<div className="relative">
{/* Menu buttons */}
<div className="absolute top-0 start-0 pl-2 z-10">
{props.menuButtons &&
props.menuButtons.map((b, i) => <span key={i}>{b}</span>)}
<IconButton onClick={() => setLogsOpened(true)}>
<BsBodyText />
</IconButton>
<IconButton onClick={DarkMode.toggle}>
<BsMoon />
</IconButton>
</div>
<RootContent
closeableError={closeableError}
otherError={otherError}
torrents={torrents}
torrentsLoading={torrentsLoading}
/>
</div>
<RootContent
closeableError={closeableError}
otherError={otherError}
torrents={torrents}
torrentsLoading={torrentsLoading}
<LogStreamModal
show={logsOpened}
onClose={() => setLogsOpened(false)}
/>
</div>
<LogStreamModal show={logsOpened} onClose={() => setLogsOpened(false)} />
</AppContext.Provider>
);
};