diff --git a/app/Livewire/Mod/Index.php b/app/Livewire/Mod/Index.php
index 34e0ecc..9b2b6e1 100644
--- a/app/Livewire/Mod/Index.php
+++ b/app/Livewire/Mod/Index.php
@@ -87,8 +87,24 @@ class Index extends Component
public function resetFilters(): void
{
$this->query = '';
- $this->order = 'created';
$this->sptVersion = $this->getLatestMinorVersions()->pluck('version')->toArray();
$this->featured = 'include';
}
+
+ /**
+ * Compute the count of active filters.
+ */
+ public function getFilterCountProperty(): int
+ {
+ $count = 0;
+ if ($this->query !== '') {
+ $count++;
+ }
+ if ($this->featured !== 'include') {
+ $count++;
+ }
+ $count += count($this->sptVersion);
+
+ return $count;
+ }
}
diff --git a/resources/views/livewire/mod/index.blade.php b/resources/views/livewire/mod/index.blade.php
index e65b031..8b269c6 100644
--- a/resources/views/livewire/mod/index.blade.php
+++ b/resources/views/livewire/mod/index.blade.php
@@ -15,7 +15,7 @@
- {{ __('Filters') }} {{-- // TODO: Ideally, we should have a count of the number of filters here: "5 Filters" --}}
+ {{ $this->filterCount }} {{ __('Filters') }}