mirror of
https://github.com/Dictionarry-Hub/profilarr.git
synced 2026-01-22 10:51:02 +01:00
fix: search filtering on arr and databases pages
This commit is contained in:
@@ -23,7 +23,15 @@
|
||||
const searchStore = createSearchStore();
|
||||
|
||||
// Filter instances based on search
|
||||
$: filteredInstances = searchStore.filterItems(data.instances, ['name', 'url', 'type']);
|
||||
$: filteredInstances = data.instances.filter((instance) => {
|
||||
const query = $searchStore.query.toLowerCase();
|
||||
if (!query) return true;
|
||||
return (
|
||||
instance.name.toLowerCase().includes(query) ||
|
||||
instance.url.toLowerCase().includes(query) ||
|
||||
instance.type.toLowerCase().includes(query)
|
||||
);
|
||||
});
|
||||
|
||||
// Modal state
|
||||
let showDeleteModal = false;
|
||||
|
||||
@@ -23,7 +23,14 @@
|
||||
const searchStore = createSearchStore();
|
||||
|
||||
// Filter databases based on search
|
||||
$: filteredDatabases = searchStore.filterItems(data.databases, ['name', 'repository_url']);
|
||||
$: filteredDatabases = data.databases.filter((db) => {
|
||||
const query = $searchStore.query.toLowerCase();
|
||||
if (!query) return true;
|
||||
return (
|
||||
db.name.toLowerCase().includes(query) ||
|
||||
db.repository_url.toLowerCase().includes(query)
|
||||
);
|
||||
});
|
||||
|
||||
// Modal state
|
||||
let showUnlinkModal = false;
|
||||
|
||||
Reference in New Issue
Block a user