Skip to content

Commit

Permalink
feat: Add menu entry to go to appearance settings page
Browse files Browse the repository at this point in the history
`ui.darkmode.enabled` must be enabled
  • Loading branch information
JF-Cozy committed Jun 18, 2024
1 parent d4daa16 commit 086a383
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/components/Settings/SettingsContent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { useClient } from 'cozy-client'
import Icon from 'cozy-ui/transpiled/react/Icon'
import OpenwithIcon from 'cozy-ui/transpiled/react/Icons/Openwith'
import PeopleIcon from 'cozy-ui/transpiled/react/Icons/People'
import PaletteIcon from 'cozy-ui/transpiled/react/Icons/Palette'
import GraphCircleIcon from 'cozy-ui/transpiled/react/Icons/GraphCircle'
import CozyCircleIcon from 'cozy-ui/transpiled/react/Icons/CozyCircle'
import HandIcon from 'cozy-ui/transpiled/react/Icons/Hand'
Expand Down Expand Up @@ -69,6 +70,19 @@ const SettingsContent = ({
{t('profile')}
</a>
</NavItem>
{flag('ui.darkmode.enabled') && (
<NavItem>
<a
role="menuitem"
href={getSettingsLink({ client, hash: 'appearance' })}
target="_self"
title={t('appearance')}
>
<MenuIcon icon={PaletteIcon} />
{t('appearance')}
</a>
</NavItem>
)}
{(!isDrawer || !isMobileApp()) && shoulDisplayViewOfferButton && (
<NavItem>
<a
Expand Down
1 change: 1 addition & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"drawer": "Show menu drawer",
"profile": "Profile",
"appearance": "Appearance",
"plans": "Plans",
"permissions": "Permissions",
"connectedDevices": "Connected devices",
Expand Down
1 change: 1 addition & 0 deletions src/locales/fr.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"drawer": "Afficher le menu latéral",
"profile": "Profil",
"appearance": "Apparence",
"plans": "Offres et options",
"permissions": "Permissions",
"connectedDevices": "Appareils connectés",
Expand Down

0 comments on commit 086a383

Please sign in to comment.