Skip to content

Commit 0831514

Browse files
author
Gerome El-assaad
committed
updated security & css
1 parent bcf7c4e commit 0831514

File tree

12 files changed

+1838
-353
lines changed

12 files changed

+1838
-353
lines changed

README.md

Lines changed: 429 additions & 127 deletions
Large diffs are not rendered by default.

app/api/import-dataset/route.ts

Lines changed: 0 additions & 101 deletions
This file was deleted.

app/globals.css

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,6 @@
44

55
@layer base {
66
:root {
7-
--background: 0 0% 100%;
8-
--foreground: 240 10% 3.9%;
9-
--card: 0 0% 100%;
10-
--card-foreground: 240 10% 3.9%;
11-
--popover: 0 0% 100%;
12-
--popover-foreground: 240 10% 3.9%;
13-
--primary: 240 5.9% 10%;
14-
--primary-foreground: 0 0% 98%;
15-
--secondary: 240 4.8% 95.9%;
16-
--secondary-foreground: 240 5.9% 10%;
17-
--muted: 240 4.8% 95.9%;
18-
--muted-foreground: 240 3.8% 46.1%;
19-
--accent: 240 4.8% 95.9%;
20-
--accent-foreground: 240 5.9% 10%;
21-
--destructive: 0 84.2% 60.2%;
22-
--destructive-foreground: 0 0% 98%;
23-
--border: 240 5.9% 90%;
24-
--input: 240 5.9% 90%;
25-
--ring: 240 10% 3.9%;
26-
--chart-1: 12 76% 61%;
27-
--chart-2: 173 58% 39%;
28-
--chart-3: 197 37% 24%;
29-
--chart-4: 43 74% 66%;
30-
--chart-5: 27 87% 67%;
31-
--radius: 0.75rem;
32-
}
33-
34-
.dark {
357
--background: 240, 6%, 10%;
368
--foreground: 0 0% 98%;
379
--card: 240 10% 3.9%;
@@ -68,7 +40,7 @@
6840
color: var(--foreground);
6941
font-family: var(--font-sans, sans-serif);
7042
}
71-
.dark body {
43+
body {
7244
background-color: #111111;
7345
background-image: radial-gradient(
7446
ellipse 80% 50% at 50% -20%,

app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export default function RootLayout({
6969
<ThemeProvider
7070
attribute="class"
7171
defaultTheme="dark"
72-
enableSystem
72+
forcedTheme="dark"
7373
disableTransitionOnChange
7474
>
7575
<PostHogProvider>

app/settings/layout.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use client'
22

33
import { Button } from '@/components/ui/button'
4-
import { ThemeToggle } from '@/components/ui/theme-toggle'
54
import { cn } from '@/lib/utils'
65
import {
76
User,
@@ -65,9 +64,6 @@ export default function SettingsLayout({
6564
</Button>
6665
</Link>
6766
<h1 className="text-2xl font-semibold">Settings</h1>
68-
<div className="ml-auto">
69-
<ThemeToggle />
70-
</div>
7167
</div>
7268

7369
<div className="grid grid-cols-1 lg:grid-cols-4 gap-8">

components/navbar.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
DropdownMenuSeparator,
99
DropdownMenuTrigger,
1010
} from '@/components/ui/dropdown-menu'
11-
import { ThemeToggle } from '@/components/ui/theme-toggle'
1211
import {
1312
Tooltip,
1413
TooltipContent,
@@ -89,14 +88,6 @@ export function NavBar({
8988
<TooltipContent>Clear chat</TooltipContent>
9089
</Tooltip>
9190
</TooltipProvider>
92-
<TooltipProvider>
93-
<Tooltip delayDuration={0}>
94-
<TooltipTrigger asChild>
95-
<ThemeToggle />
96-
</TooltipTrigger>
97-
<TooltipContent>Toggle theme</TooltipContent>
98-
</Tooltip>
99-
</TooltipProvider>
10091
{session ? (
10192
<DropdownMenu>
10293
<DropdownMenuTrigger asChild>

components/ui/theme-toggle.tsx

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,8 @@ export const ThemeToggle = forwardRef<
99
className?: string
1010
}
1111
>(({ className, ...props }, ref) => {
12-
const { setTheme, theme } = useTheme()
13-
const [mounted, setMounted] = useState(false)
14-
15-
// useEffect only runs on the client, so now we can safely show the UI
16-
useEffect(() => {
17-
setMounted(true)
18-
}, [])
19-
20-
if (!mounted) {
21-
return null
22-
}
23-
24-
return (
25-
<Button
26-
{...props}
27-
ref={ref}
28-
variant="ghost"
29-
size="icon"
30-
className={className}
31-
onClick={() => setTheme(theme === 'dark' ? 'light' : 'dark')}
32-
>
33-
{theme === 'light' ? (
34-
<SunIcon className="h-4 w-4 md:h-5 md:w-5" />
35-
) : (
36-
<MoonIcon className="h-4 w-4 md:h-5 md:w-5" />
37-
)}
38-
</Button>
39-
)
12+
// Theme toggle is disabled - app is forced to dark mode
13+
return null
4014
})
4115

4216
ThemeToggle.displayName = 'ThemeToggle'

0 commit comments

Comments
 (0)