diff --git a/src/components/Sidebar/ThemeSwitcher.tsx b/src/components/Sidebar/ThemeSwitcher.tsx index 9cbdcbdee..d3fbb2366 100644 --- a/src/components/Sidebar/ThemeSwitcher.tsx +++ b/src/components/Sidebar/ThemeSwitcher.tsx @@ -2,13 +2,13 @@ import { ToggleButton, ToggleButtonGroup } from '@mui/material'; import React from 'react'; import DarkModeIcon from '@mui/icons-material/DarkMode'; import LightModeIcon from '@mui/icons-material/LightMode'; -import { THEMES } from 'types/theme'; +import { THEME_COLOR } from 'constants/theme'; interface Iprops { - theme: THEMES; - setTheme: (theme: THEMES) => void; + theme: THEME_COLOR; + setTheme: (theme: THEME_COLOR) => void; } export default function ThemeSwitcher({ theme, setTheme }: Iprops) { - const handleChange = (event, theme: THEMES) => { + const handleChange = (event, theme: THEME_COLOR) => { if (theme !== null) { setTheme(theme); } @@ -20,10 +20,10 @@ export default function ThemeSwitcher({ theme, setTheme }: Iprops) { value={theme} exclusive onChange={handleChange}> - + - + diff --git a/src/components/Sidebar/UtilitySection.tsx b/src/components/Sidebar/UtilitySection.tsx index e81584a4f..54d40270c 100644 --- a/src/components/Sidebar/UtilitySection.tsx +++ b/src/components/Sidebar/UtilitySection.tsx @@ -11,6 +11,9 @@ import isElectron from 'is-electron'; import WatchFolder from 'components/WatchFolder'; import { getDownloadAppMessage } from 'utils/ui'; +import ThemeSwitcher from './ThemeSwitcher'; +import { SpaceBetweenFlex } from 'components/Container'; + export default function UtilitySection({ closeSidebar }) { const router = useRouter(); const { @@ -18,6 +21,8 @@ export default function UtilitySection({ closeSidebar }) { startLoading, watchFolderView, setWatchFolderView, + theme, + setTheme, } = useContext(AppContext); const [recoverModalView, setRecoveryModalView] = useState(false); @@ -70,6 +75,10 @@ export default function UtilitySection({ closeSidebar }) { {constants.RECOVERY_KEY} + + {constants.CHOSE_THEME} + + {constants.TWO_FACTOR} @@ -85,7 +94,6 @@ export default function UtilitySection({ closeSidebar }) { {/* {constants.COMPRESS_THUMBNAILS} */} - - {/* setFixLargeThumbsView(false)}