diff --git a/components/layout/Footer.module.css b/components/layout/Footer.module.css index 1a7baaa8..c484d7f5 100644 --- a/components/layout/Footer.module.css +++ b/components/layout/Footer.module.css @@ -4,7 +4,7 @@ align-items: center; font-size: var(--font-size-small); text-align: center; - margin: 20px 0; + margin: 30px 0; } .version { diff --git a/components/settings/LanguageSetting.js b/components/settings/LanguageSetting.js new file mode 100644 index 00000000..294a92a3 --- /dev/null +++ b/components/settings/LanguageSetting.js @@ -0,0 +1,31 @@ +import React from 'react'; +import { FormattedMessage } from 'react-intl'; +import DropDown from 'components/common/DropDown'; +import Button from 'components/common/Button'; +import useLocale from 'hooks/useLocale'; +import { DEFAULT_LOCALE } from 'lib/constants'; +import styles from './TimezoneSetting.module.css'; +import { languages } from '../../lib/lang'; + +export default function LanguageSetting() { + const { locale, saveLocale } = useLocale(); + const options = Object.keys(languages).map(key => ({ ...languages[key], value: key })); + + function handleReset() { + saveLocale(DEFAULT_LOCALE); + } + + return ( + <> + + + + ); +} diff --git a/components/settings/ProfileSettings.js b/components/settings/ProfileSettings.js index 798ef4bf..14c766a5 100644 --- a/components/settings/ProfileSettings.js +++ b/components/settings/ProfileSettings.js @@ -11,11 +11,13 @@ import styles from './ProfileSettings.module.css'; import DateRangeSetting from './DateRangeSetting'; import useEscapeKey from 'hooks/useEscapeKey'; import useUser from 'hooks/useUser'; +import LanguageSetting from './LanguageSetting'; +import ThemeSetting from './ThemeSetting'; export default function ProfileSettings() { const { user } = useUser(); const [changePassword, setChangePassword] = useState(false); - const [message, setMessage] = useState(); + const [message, setMessage] = useState(null); function handleSave() { setChangePassword(false); @@ -59,6 +61,18 @@ export default function ProfileSettings() {
+
+ +
+
+ +
+
+ +
+
+ +
{changePassword && ( +