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:
parent
058ca28d88
commit
7de2665344
2 changed files with 7 additions and 1 deletions
|
@ -60,6 +60,7 @@
|
|||
const activate = () => {
|
||||
isActive = true;
|
||||
input?.select();
|
||||
searchQuery = '';
|
||||
openDropdown();
|
||||
};
|
||||
|
||||
|
|
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue