mirror of
https://github.com/immich-app/immich.git
synced 2025-05-24 01:12:58 -04:00
fix(web): default search to context (#17118)
* fix(web): default search to context * one liner * Refactor
This commit is contained in:
parent
392ce7deb2
commit
dfb0626c91
@ -164,8 +164,21 @@
|
||||
};
|
||||
|
||||
function getSearchType(): 'smart' | 'metadata' | 'description' {
|
||||
const t = localStorage.getItem('searchQueryType');
|
||||
return t === 'smart' || t === 'description' ? t : 'metadata';
|
||||
const searchType = localStorage.getItem('searchQueryType');
|
||||
switch (searchType) {
|
||||
case 'smart': {
|
||||
return 'smart';
|
||||
}
|
||||
case 'metadata': {
|
||||
return 'metadata';
|
||||
}
|
||||
case 'description': {
|
||||
return 'description';
|
||||
}
|
||||
default: {
|
||||
return 'smart';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getSearchTypeText(): string {
|
||||
|
Loading…
x
Reference in New Issue
Block a user