diff --git a/packages/frontend/src/widgets/WidgetSearch.vue b/packages/frontend/src/widgets/WidgetSearch.vue index 9a0752c7f9..1a328be7ce 100644 --- a/packages/frontend/src/widgets/WidgetSearch.vue +++ b/packages/frontend/src/widgets/WidgetSearch.vue @@ -72,7 +72,7 @@ function options(ev) { { type: 'button', icon: 'ph-image ph-bold ph-lg', - text: 'With Images', + text: `With Images ${filetype.value === 'image' ? '✔' : ''}`, action: () => { filetype.value = 'image'; }, @@ -80,7 +80,7 @@ function options(ev) { { type: 'button', icon: 'ph-music-notes-simple ph-bold ph-lg', - text: 'With Audios', + text: `With Audios ${filetype.value === 'audio' ? '✔' : ''}`, action: () => { filetype.value = 'audio'; }, @@ -88,12 +88,19 @@ function options(ev) { { type: 'button', icon: 'ph-video ph-bold ph-lg', - text: 'With Videos', + text: `With Videos ${filetype.value === 'video' ? '✔' : ''}`, action: () => { filetype.value = 'video'; }, }], - }], ev.currentTarget ?? ev.target); + }, + ...(filetype.value ? [{ + text: 'Clear Filter', + icon: 'ti ti-trash', + action: () => { + filetype.value = null; + }, + }] : [])], ev.currentTarget ?? ev.target); } async function search() {