diff --git a/frontend/src/views/Downloads.vue b/frontend/src/views/Downloads.vue
index b821295..ba0e7d2 100644
--- a/frontend/src/views/Downloads.vue
+++ b/frontend/src/views/Downloads.vue
@@ -68,62 +68,120 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ Filters
+
+ {{ activeFilterCount }}
+
+ mdi-chevron-down
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+ Status: {{ statusLabel(filterStatus) }}
+
+
+ Source: {{ sourceLabel(filterSourceId) }}
+
+
+ From: {{ filterFromDate }}
+
+
+ To: {{ filterToDate }}
+
+
+ Showing superseded
+
+
+
+ Clear all
+
+
@@ -334,6 +392,32 @@ const sourceOptions = computed(() =>
}))
)
+const activeFilterCount = computed(() => {
+ let n = 0
+ if (filterStatus.value) n++
+ if (filterSourceId.value) n++
+ if (filterFromDate.value) n++
+ if (filterToDate.value) n++
+ if (!filterExcludeSuperseded.value) n++
+ return n
+})
+
+function statusLabel(value) {
+ return statusOptions.find(s => s.value === value)?.title || value
+}
+
+function sourceLabel(id) {
+ return sourceOptions.value.find(s => s.value === id)?.title || `#${id}`
+}
+
+function clearAllFilters() {
+ filterStatus.value = null
+ filterSourceId.value = null
+ filterFromDate.value = null
+ filterToDate.value = null
+ filterExcludeSuperseded.value = true
+}
+
const headers = [
{ title: 'Status', key: 'status', width: 120 },
{ title: 'Source', key: 'source', width: 180 },