Skip to content

Commit

Permalink
feat: setting theme color for desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
raaymax committed Oct 25, 2024
1 parent e21c883 commit 84066db
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/src/js/components/layout/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ export const Workspaces = () => {
export const Desktop = ({children}: {children: React.ReactNode}) => {
const { sidebar } = useSidebar();
const { parentId } = useParams();
const theme = useTheme();
useEffect(() => {
document.querySelector('meta[name="theme-color"]')
?.setAttribute('content', theme.Navbar.Background);
}, [theme]);
return (
<Container className={cn({
'side-stream': Boolean(parentId),
Expand Down
4 changes: 4 additions & 0 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 84066db

Please sign in to comment.