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

fix(web): more language selector nits (#10271)

* fix: always sort development lang to bottom of list

* fix: clear search query in languages when box is clicked
This commit is contained in:
Zack Pollard 2024-06-13 12:37:15 +01:00 committed by GitHub
parent 058ca28d88
commit 7de2665344
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View file

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

View file

@ -67,7 +67,12 @@
const langOptions = langs
.map((lang) => ({ label: lang.name, value: lang.code }))
.sort((a, b) => a.label.localeCompare(b.label));
.sort((a, b) => {
if (b.label.startsWith('Development')) {
return -1;
}
return a.label.localeCompare(b.label);
});
const defaultLangOption = { label: defaultLang.name, value: defaultLang.code };
const handleLanguageChange = async (newLang: string | undefined) => {