feat: adds option to search only for untagged assets (#19730)

Co-authored-by: SkwalExe <skwal@skwal.net>
This commit is contained in:
Léopold Koprivnik
2025-07-10 16:28:20 +02:00
committed by GitHub
parent 818bdde317
commit f778adea92
14 changed files with 75 additions and 23 deletions
@@ -233,7 +233,10 @@
return personNames.join(', ');
}
async function getTagNames(tagIds: string[]) {
async function getTagNames(tagIds: string[] | null) {
if (tagIds === null) {
return $t('untagged');
}
const tagNames = await Promise.all(
tagIds.map(async (tagId) => {
const tag = await getTagById({ id: tagId });
@@ -343,7 +346,7 @@
{#await getPersonName(value) then personName}
{personName}
{/await}
{:else if searchKey === 'tagIds' && Array.isArray(value)}
{:else if searchKey === 'tagIds' && (Array.isArray(value) || value === null)}
{#await getTagNames(value) then tagNames}
{tagNames}
{/await}