mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 09:12:57 +02: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
1 changed files with 15 additions and 2 deletions
|
@ -164,8 +164,21 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
function getSearchType(): 'smart' | 'metadata' | 'description' {
|
function getSearchType(): 'smart' | 'metadata' | 'description' {
|
||||||
const t = localStorage.getItem('searchQueryType');
|
const searchType = localStorage.getItem('searchQueryType');
|
||||||
return t === 'smart' || t === 'description' ? t : 'metadata';
|
switch (searchType) {
|
||||||
|
case 'smart': {
|
||||||
|
return 'smart';
|
||||||
|
}
|
||||||
|
case 'metadata': {
|
||||||
|
return 'metadata';
|
||||||
|
}
|
||||||
|
case 'description': {
|
||||||
|
return 'description';
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
return 'smart';
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSearchTypeText(): string {
|
function getSearchTypeText(): string {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue