mirror of
https://github.com/immich-app/immich.git
synced 2025-05-31 12:15:47 -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' {
|
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…
x
Reference in New Issue
Block a user