diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index b694df66..27eda07d 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -17,12 +17,13 @@ export default function App() { useEffect(()=>{ if (selectedTheme === 'Dark') { document.documentElement.classList.add('dark'); + document.body.classList.add('dark:bg-raisin-black'); } else { document.documentElement.classList.remove('dark'); } },[]) return ( -
+
diff --git a/frontend/src/Navigation.tsx b/frontend/src/Navigation.tsx index a513b370..adc9671e 100644 --- a/frontend/src/Navigation.tsx +++ b/frontend/src/Navigation.tsx @@ -3,14 +3,21 @@ import { useDispatch, useSelector } from 'react-redux'; import { NavLink, useNavigate } from 'react-router-dom'; import DocsGPT3 from './assets/cute_docsgpt3.svg'; import Documentation from './assets/documentation.svg'; +import DocumentationDark from './assets/documentation-dark.svg'; import Discord from './assets/discord.svg'; +import DiscordDark from './assets/discord-dark.svg'; + import Arrow2 from './assets/dropdown-arrow.svg'; import Expand from './assets/expand.svg'; import Trash from './assets/trash.svg'; import Github from './assets/github.svg'; +import GithubDark from './assets/github-dark.svg'; import Hamburger from './assets/hamburger.svg'; +import HamburgerDark from './assets/hamburger-dark.svg'; import Info from './assets/info.svg'; +import InfoDark from './assets/info-dark.svg'; import SettingGear from './assets/settingGear.svg'; +import SettingGearDark from './assets/settingGear-dark.svg'; import Add from './assets/add.svg'; import UploadIcon from './assets/upload.svg'; import { ActiveState } from './models/misc'; @@ -47,7 +54,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { const conversations = useSelector(selectConversations); const conversationId = useSelector(selectConversationId); const { isMobile } = useMediaQuery(); - + const isDarkTheme = document.documentElement.classList.contains('dark'); const [isDocsListOpen, setIsDocsListOpen] = useState(false); const isApiKeySet = useSelector(selectApiKeyStatus); @@ -182,17 +189,15 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { menu toggle )}
@@ -227,9 +231,8 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { ); }} className={({ isActive }) => - `${ - isActive ? 'bg-gray-3000 dark:bg-black' : '' - } group sticky mx-4 mt-4 flex cursor-pointer gap-2.5 rounded-3xl border border-silver p-3 hover:border-rainy-gray dark:border-purple-taupe dark:text-white hover:dark:bg-black hover:bg-gray-3000` + `${isActive ? 'bg-gray-3000 dark:bg-transparent' : '' + } group sticky mx-4 mt-4 flex cursor-pointer gap-2.5 rounded-3xl border border-silver p-3 hover:border-rainy-gray dark:border-purple-taupe dark:text-white dark:hover:bg-transparent hover:bg-gray-3000` } >
-
+

{doc.name} {doc.version} @@ -321,7 +323,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { } }) ) : ( -

+

No default documentation.

)} @@ -330,17 +332,16 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {

Source Docs

-
+
- `my-auto mx-4 flex h-9 cursor-pointer gap-4 rounded-3xl hover:bg-gray-100 dark:hover:bg-black ${ - isActive ? 'bg-gray-3000 dark:bg-transparent' : '' + `my-auto mx-4 flex h-9 cursor-pointer gap-4 rounded-3xl hover:bg-gray-100 dark:hover:bg-purple-taupe ${isActive ? 'bg-gray-3000 dark:bg-transparent' : '' }` } > settings @@ -348,16 +349,15 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
-
+
- `my-auto mx-4 flex h-9 cursor-pointer gap-4 rounded-3xl hover:bg-gray-100 dark:hover:bg-black ${ - isActive ? 'bg-gray-3000' : '' + `my-auto mx-4 flex h-9 cursor-pointer gap-4 rounded-3xl hover:bg-gray-100 dark:hover:bg-purple-taupe ${isActive ? 'bg-gray-3000 dark:bg-purple-taupe' : '' }` } > - info + info

About

@@ -365,10 +365,10 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { href="https://docs.docsgpt.co.uk/" target="_blank" rel="noreferrer" - className="my-auto mx-4 flex h-9 cursor-pointer gap-4 rounded-3xl hover:bg-gray-100 dark:hover:bg-black" + className="my-auto mx-4 flex h-9 cursor-pointer gap-4 rounded-3xl hover:bg-gray-100 dark:hover:bg-purple-taupe" > documentation @@ -378,9 +378,9 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { href="https://discord.gg/WHJdfbQDR4" target="_blank" rel="noreferrer" - className="my-auto mx-4 flex h-9 cursor-pointer gap-4 rounded-3xl hover:bg-gray-100 dark:hover:bg-black" + className="my-auto mx-4 flex h-9 cursor-pointer gap-4 rounded-3xl hover:bg-gray-100 dark:hover:bg-purple-taupe" > - discord-link + discord-link

Visit our Discord

@@ -390,9 +390,9 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { href="https://github.com/arc53/DocsGPT" target="_blank" rel="noreferrer" - className="my-auto mx-4 flex h-9 cursor-pointer gap-4 rounded-3xl hover:bg-gray-100 dark:hover:bg-black" + className="mt-auto mx-4 flex h-9 cursor-pointer gap-4 rounded-3xl hover:bg-gray-100 dark:hover:bg-purple-taupe" > - github-link + github-link

Visit our Github

@@ -400,12 +400,12 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
-
+
{ useEffect(() => { if (selectedTheme === 'Dark') { document.documentElement.classList.add('dark'); + document.documentElement.classList.add('dark:bg-raisin-black'); } else { document.documentElement.classList.remove('dark'); } diff --git a/frontend/src/assets/discord-dark.svg b/frontend/src/assets/discord-dark.svg new file mode 100644 index 00000000..8438962a --- /dev/null +++ b/frontend/src/assets/discord-dark.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/frontend/src/assets/discord.svg b/frontend/src/assets/discord.svg index 7f2201b4..ca54be77 100644 --- a/frontend/src/assets/discord.svg +++ b/frontend/src/assets/discord.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/frontend/src/assets/documentation-dark.svg b/frontend/src/assets/documentation-dark.svg new file mode 100644 index 00000000..78440206 --- /dev/null +++ b/frontend/src/assets/documentation-dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/assets/documentation.svg b/frontend/src/assets/documentation.svg index e7c56956..f9f7c596 100644 --- a/frontend/src/assets/documentation.svg +++ b/frontend/src/assets/documentation.svg @@ -1,3 +1,3 @@ - + diff --git a/frontend/src/assets/github-dark.svg b/frontend/src/assets/github-dark.svg new file mode 100644 index 00000000..b4689ddd --- /dev/null +++ b/frontend/src/assets/github-dark.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/frontend/src/assets/github.svg b/frontend/src/assets/github.svg index b327f7b3..40fc238c 100644 --- a/frontend/src/assets/github.svg +++ b/frontend/src/assets/github.svg @@ -1,5 +1,5 @@ github - + diff --git a/frontend/src/assets/hamburger-dark.svg b/frontend/src/assets/hamburger-dark.svg new file mode 100644 index 00000000..454d76ad --- /dev/null +++ b/frontend/src/assets/hamburger-dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/assets/info-dark.svg b/frontend/src/assets/info-dark.svg new file mode 100644 index 00000000..9241dee6 --- /dev/null +++ b/frontend/src/assets/info-dark.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/frontend/src/assets/info.svg b/frontend/src/assets/info.svg index 469cdacd..6f3d2446 100644 --- a/frontend/src/assets/info.svg +++ b/frontend/src/assets/info.svg @@ -1,3 +1,3 @@ - + diff --git a/frontend/src/assets/message-dark.svg b/frontend/src/assets/message-dark.svg new file mode 100644 index 00000000..7d8964a6 --- /dev/null +++ b/frontend/src/assets/message-dark.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/frontend/src/assets/settingGear-dark.svg b/frontend/src/assets/settingGear-dark.svg new file mode 100644 index 00000000..b48608a9 --- /dev/null +++ b/frontend/src/assets/settingGear-dark.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/frontend/src/assets/settingGear.svg b/frontend/src/assets/settingGear.svg index 51b28e47..37a5893e 100644 --- a/frontend/src/assets/settingGear.svg +++ b/frontend/src/assets/settingGear.svg @@ -1,3 +1,3 @@ - + diff --git a/frontend/src/conversation/Conversation.tsx b/frontend/src/conversation/Conversation.tsx index e4cfed37..36c9c476 100644 --- a/frontend/src/conversation/Conversation.tsx +++ b/frontend/src/conversation/Conversation.tsx @@ -23,7 +23,7 @@ export default function Conversation() { const dispatch = useDispatch(); const endMessageRef = useRef(null); const inputRef = useRef(null); - + const isDarkTheme = document.documentElement.classList.contains('dark'); const [hasScrolledToLast, setHasScrolledToLast] = useState(true); useEffect(() => { @@ -122,7 +122,7 @@ export default function Conversation() {