From 7aa36677952f2436f6551f9ed2982f1be5a556ef Mon Sep 17 00:00:00 2001 From: Rishav Date: Fri, 11 Oct 2024 22:57:57 +0530 Subject: [PATCH 1/2] modified theme toggle --- Client/src/Components/Sidebar/index.jsx | 4 ++-- Client/src/Pages/Settings/index.jsx | 24 +++++++++++++++++++++++- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/Client/src/Components/Sidebar/index.jsx b/Client/src/Components/Sidebar/index.jsx index 200c5dd01..80a47b68c 100644 --- a/Client/src/Components/Sidebar/index.jsx +++ b/Client/src/Components/Sidebar/index.jsx @@ -632,7 +632,7 @@ function Sidebar() { )} {collapsed && } - { dispatch(setMode("light")); closePopup(); @@ -647,7 +647,7 @@ function Sidebar() { }} > Dark - + */} { const { isLoading } = useSelector((state) => state.uptimeMonitors); const { isLoading: authIsLoading } = useSelector((state) => state.auth); const { timezone } = useSelector((state) => state.ui); + const {mode} = useSelector((state) => state.ui); const [checksIsLoading, setChecksIsLoading] = useState(false); const [form, setForm] = useState({ ttl: checkTTL ? (checkTTL / SECONDS_PER_DAY).toString() : 0, @@ -182,6 +183,27 @@ const Settings = ({ isAdmin }) => { /> + + + Appearance + + Theme- The + timezone of the dashboard you publicly display. + + + + + + {isAdmin && ( From 56beeaf1baa55157c5e3dea4a879d562ac4791d9 Mon Sep 17 00:00:00 2001 From: Rishav Date: Fri, 11 Oct 2024 23:02:56 +0530 Subject: [PATCH 2/2] fix --- Client/src/Pages/Settings/index.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Client/src/Pages/Settings/index.jsx b/Client/src/Pages/Settings/index.jsx index 1021128cf..db3fe232b 100644 --- a/Client/src/Pages/Settings/index.jsx +++ b/Client/src/Pages/Settings/index.jsx @@ -187,8 +187,7 @@ const Settings = ({ isAdmin }) => { Appearance - Theme- The - timezone of the dashboard you publicly display. + Switch between light and dark mode.