1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-29 15:11:58 +00:00

feat(web): Language settings list UX nits (#10261)

* feat(web): Sort language settings list

before: https://bo0.tz/u/xMLnEW.png
after: https://bo0.tz/u/lGLn9h.png

* feat(web): Select combobox text when focused
This commit is contained in:
bo0tzz 2024-06-13 13:01:18 +02:00 committed by GitHub
parent b9593361a4
commit 058ca28d88
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View file

@ -59,6 +59,7 @@
const activate = () => {
isActive = true;
input?.select();
openDropdown();
};

View file

@ -65,7 +65,9 @@
$locale = $locale ? undefined : fallbackLocale.code;
};
const langOptions = langs.map((lang) => ({ label: lang.name, value: lang.code }));
const langOptions = langs
.map((lang) => ({ label: lang.name, value: lang.code }))
.sort((a, b) => a.label.localeCompare(b.label));
const defaultLangOption = { label: defaultLang.name, value: defaultLang.code };
const handleLanguageChange = async (newLang: string | undefined) => {