added dark mode

This commit is contained in:
lemonknowsall committed 2025-09-18 20:59:38 -07:00
1 parent 9c358bb230
commit 395111ac07
4 files changed
+31 -9

No files matched your search

+2
View File
@@ -11,6 +11,7 @@ import { useIsMobile } from '@/hooks/useIsMobile';
import type { Project } from '@/lib/ProjectsManager';
import { cn } from '@/lib/utils';
import { useQueryClient } from '@tanstack/react-query';
import { ThemeToggle } from '@/components/ThemeToggle';
interface ProjectItemProps {
project: Project;
@@ -235,6 +236,7 @@ export function ProjectSidebar({
<Settings className="h-4 w-4" />
Settings
</Button>
<ThemeToggle />
<Button
variant="ghost"
size="sm"
+5 -5
View File
@@ -102,9 +102,9 @@ export function SettingsLayout() {
if (isMobile) {
return (
<div className="min-h-dvh bg-white">
<div className="min-h-dvh bg-background">
{/* Mobile Header */}
<header className="h-12 border-b bg-white px-4 py-3 flex items-center justify-between">
<header className="h-12 border-b bg-background px-4 py-3 flex items-center justify-between">
<div className="flex items-center space-x-2">
<Button
variant="ghost"
@@ -145,7 +145,7 @@ export function SettingsLayout() {
// Desktop 3-column layout
return (
<div className="h-screen flex bg-white overflow-hidden">
<div className="h-screen flex bg-background overflow-hidden">
{/* Left Column - Projects Sidebar (optionally hidden) */}
{isSidebarVisible && (
<div className="w-80 border-r bg-sidebar flex-shrink-0">
@@ -159,7 +159,7 @@ export function SettingsLayout() {
)}
{/* Middle Column - Settings Navigation */}
<div className="w-96 border-r bg-white flex flex-col flex-shrink-0">
<div className="w-96 border-r bg-background flex flex-col flex-shrink-0">
{/* Header with toggle button */}
<div className="h-12 px-4 py-2 border-b flex-shrink-0">
<div className="flex items-center gap-3">
@@ -217,7 +217,7 @@ export function SettingsLayout() {
</div>
{/* Right Column - Settings Content - Scrollable */}
<ScrollArea className="flex-1 bg-white">
<ScrollArea className="flex-1 bg-background">
<div className="max-w-4xl">
<Outlet />
</div>
+20
View File
@@ -0,0 +1,20 @@
import { Moon, Sun } from "lucide-react";
import { Button } from "@/components/ui/button";
import { useTheme } from "@/hooks/useTheme";
export function ThemeToggle() {
const { theme, setTheme } = useTheme();
return (
<Button
variant="ghost"
size="sm"
onClick={() => setTheme(theme === "light" ? "dark" : "light")}
className="h-8 w-8 px-0"
>
<Sun className="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" />
<Moon className="absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" />
<span className="sr-only">Toggle theme</span>
</Button>
);
}
+4 -4
View File
@@ -18,11 +18,11 @@ const NotFound = () => {
}, [location.pathname]);
return (
<div className="min-h-screen flex items-center justify-center bg-gray-100 dark:bg-gray-900">
<div className="min-h-screen flex items-center justify-center bg-background">
<div className="text-center">
<h1 className="text-4xl font-bold mb-4 text-gray-900 dark:text-gray-100">404</h1>
<p className="text-xl text-gray-600 dark:text-gray-400 mb-4">Oops! Page not found</p>
<a href="/" className="text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300 underline">
<h1 className="text-4xl font-bold mb-4 text-foreground">404</h1>
<p className="text-xl text-muted-foreground mb-4">Oops! Page not found</p>
<a href="/" className="text-primary hover:text-primary/80 underline">
Return to Home
</a>
</div>