Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/sim/app/_shell/providers/theme-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
enableSystem={false}
disableTransitionOnChange
storageKey='sim-theme'
forcedTheme={isLightModePage ? 'light' : 'dark'}
forcedTheme={isLightModePage ? 'light' : undefined}
{...props}
>
{children}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
'use client'

import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
import { ArrowDown, Database, HelpCircle, Layout, Plus, Search, Settings } from 'lucide-react'
import { ArrowDown, Database, HelpCircle, Layout, Plus, Search, Settings, Sun, Moon } from 'lucide-react'
import { useTheme } from 'next-themes'
import Link from 'next/link'
import { useParams, usePathname, useRouter } from 'next/navigation'
import { Button, FolderPlus, Library, Tooltip } from '@/components/emcn'
Expand Down Expand Up @@ -59,6 +60,7 @@ export function Sidebar() {
const workflowId = params.workflowId as string | undefined
const router = useRouter()
const pathname = usePathname()
const { theme, setTheme } = useTheme()

const sidebarRef = useRef<HTMLElement>(null)
const fileInputRef = useRef<HTMLInputElement>(null)
Expand Down Expand Up @@ -219,8 +221,14 @@ export function Sidebar() {
icon: Settings,
onClick: () => setIsSettingsModalOpen(true),
},
{
id: 'theme',
label: theme === 'light' ? 'Dark Mode' : 'Light Mode',
icon: theme === 'light' ? Moon : Sun,
onClick: () => setTheme(theme === 'light' ? 'dark' : 'light'),
},
],
[workspaceId]
[workspaceId, theme]
)

const isLoading = workflowsLoading || sessionLoading
Expand Down