diff --git a/web/public/images/compact-width-dark.png b/web/public/images/compact-width-dark.png new file mode 100644 index 000000000..12c4cfa24 Binary files /dev/null and b/web/public/images/compact-width-dark.png differ diff --git a/web/public/images/compact-width.png b/web/public/images/compact-width.png index d3335f407..2404a34c6 100644 Binary files a/web/public/images/compact-width.png and b/web/public/images/compact-width.png differ diff --git a/web/public/images/full-width-dark.png b/web/public/images/full-width-dark.png new file mode 100644 index 000000000..93e3df9c4 Binary files /dev/null and b/web/public/images/full-width-dark.png differ diff --git a/web/public/images/full-width.png b/web/public/images/full-width.png index 8ceb105bf..47d151132 100644 Binary files a/web/public/images/full-width.png and b/web/public/images/full-width.png differ diff --git a/web/screens/Settings/Appearance/index.tsx b/web/screens/Settings/Appearance/index.tsx index 06ce36407..606a69769 100644 --- a/web/screens/Settings/Appearance/index.tsx +++ b/web/screens/Settings/Appearance/index.tsx @@ -6,6 +6,8 @@ import { fs, joinPath } from '@janhq/core' import { Button, Select, Switch } from '@janhq/joi' import { useAtom, useAtomValue } from 'jotai' +import { twMerge } from 'tailwind-merge' + import { chatWidthAtom, janThemesPathAtom, @@ -19,7 +21,7 @@ import { export default function AppearanceOptions() { const [selectedIdTheme, setSelectedIdTheme] = useAtom(selectedThemeIdAtom) const themeOptions = useAtomValue(themesOptionsAtom) - const { setTheme } = useTheme() + const { setTheme, theme } = useTheme() const janThemesPath = useAtomValue(janThemesPathAtom) const [themeData, setThemeData] = useAtom(themeDataAtom) const [reduceTransparent, setReduceTransparent] = useAtom( @@ -29,11 +31,17 @@ export default function AppearanceOptions() { const [chatWidth, setChatWidth] = useAtom(chatWidthAtom) const chatWidthOption = [ - { name: 'Full Width', value: 'full', img: 'images/full-width.png' }, + { + name: 'Full Width', + value: 'full', + img: 'images/full-width.png', + darkImg: 'images/full-width-dark.png', + }, { name: 'Compact Width', value: 'compact', img: 'images/compact-width.png', + darkImg: 'images/compact-width-dark.png', }, ] @@ -123,26 +131,44 @@ export default function AppearanceOptions() { )