fix: Set detected language on first login, remove auto-detect language option

This commit is contained in:
Maksim Eltyshev
2025-10-15 00:08:29 +02:00
parent 20d8f8ae53
commit fee300908c
44 changed files with 39 additions and 65 deletions

View File

@@ -29,8 +29,7 @@ const AccountPane = React.memo(() => {
const handleLanguageChange = useCallback(
(_, { value }) => {
// FIXME: hack
dispatch(entryActions.updateCurrentUserLanguage(value === 'auto' ? null : value));
dispatch(entryActions.updateCurrentUserLanguage(value));
},
[dispatch],
);
@@ -62,18 +61,12 @@ const AccountPane = React.memo(() => {
<Dropdown
fluid
selection
options={[
{
value: 'auto',
text: t('common.detectAutomatically'),
},
...locales.map((locale) => ({
value: locale.language,
flag: locale.country,
text: locale.name,
})),
]}
value={user.language || 'auto'}
options={locales.map((locale) => ({
value: locale.language,
flag: locale.country,
text: locale.name,
}))}
value={user.language}
onChange={handleLanguageChange}
/>
{(isUsernameEditable || isEmailEditable || isPasswordEditable) && (