mirror of
https://github.com/immich-app/immich.git
synced 2024-12-25 10:43:13 +02:00
fix(web): Add m: to search query upon loading results. (#2954)
Previously, we'd drop the m: from non-clip searches entirely. This behavior incorrectly represents the page's status (results from non-clip search but query implies a clip search). Also, any follow-up searches change to clip searches, which feels like a jarring UX if you have to add m: every time in a 'search-session'.
This commit is contained in:
parent
017214fd56
commit
b4e641548c
@ -43,7 +43,14 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$: term = $page.url.searchParams.get('q') || data.term || '';
|
$: term = (() => {
|
||||||
|
let term = $page.url.searchParams.get('q') || data.term || '';
|
||||||
|
const isMetadataSearch = $page.url.searchParams.get('clip') === 'false';
|
||||||
|
if (isMetadataSearch && term !== '') {
|
||||||
|
term = `m:${term}`;
|
||||||
|
}
|
||||||
|
return term;
|
||||||
|
})();
|
||||||
|
|
||||||
let selectedAssets: Set<AssetResponseDto> = new Set();
|
let selectedAssets: Set<AssetResponseDto> = new Set();
|
||||||
$: isMultiSelectionMode = selectedAssets.size > 0;
|
$: isMultiSelectionMode = selectedAssets.size > 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user