diff --git a/frontend/src/lib/components/SearchBar.svelte b/frontend/src/lib/components/SearchBar.svelte
new file mode 100644
index 0000000..94ccb3e
--- /dev/null
+++ b/frontend/src/lib/components/SearchBar.svelte
@@ -0,0 +1,34 @@
+
+
+
diff --git a/frontend/src/routes/+page.svelte b/frontend/src/routes/+page.svelte
index 61fec5b..85fe34a 100644
--- a/frontend/src/routes/+page.svelte
+++ b/frontend/src/routes/+page.svelte
@@ -1,5 +1,6 @@
@@ -183,6 +194,10 @@
-
+
+
+
+
+
diff --git a/frontend/src/routes/feeds/+page.svelte b/frontend/src/routes/feeds/+page.svelte
index 4a7d7bc..04031e7 100644
--- a/frontend/src/routes/feeds/+page.svelte
+++ b/frontend/src/routes/feeds/+page.svelte
@@ -2,6 +2,7 @@
import { onMount } from 'svelte';
import { entries, feeds } from '$lib/feeds';
import CardList from '$lib/components/CardList.svelte';
+ import SearchBar from '$lib/components/SearchBar.svelte';
import type { Feed, FeedEntry, Note, ReadLaterItem } from '$lib/types';
// Define the CardProps interface to match what CardList expects
@@ -23,6 +24,7 @@
let error: string | null = null;
let showUnreadOnly = true;
let feedsMap: Map = new Map();
+ let searchQuery = '';
onMount(async () => {
await loadData();
@@ -153,6 +155,19 @@
}
return 'No description available';
}
+
+ // Filter entries based on search query
+ $: filteredEntries = searchQuery
+ ? $entries.filter((entry) => {
+ const feedName = feedsMap.get(entry.feedId)?.title || '';
+ return (
+ entry.title.toLowerCase().includes(searchQuery.toLowerCase()) ||
+ entry.summary?.toLowerCase().includes(searchQuery.toLowerCase()) ||
+ feedName.toLowerCase().includes(searchQuery.toLowerCase()) ||
+ entry.content?.toLowerCase().includes(searchQuery.toLowerCase())
+ );
+ })
+ : $entries;
@@ -213,6 +228,13 @@
+
+
+
+
{#if isLoading && $entries.length === 0}
@@ -221,7 +243,7 @@
{:else}
{
await loadFeeds();
@@ -156,6 +158,16 @@
timestamp: item.createdAt
};
}
+
+ // Filter feeds based on search query
+ $: filteredFeeds = searchQuery
+ ? feedsList.filter(
+ (feed) =>
+ feed.title.toLowerCase().includes(searchQuery.toLowerCase()) ||
+ (feed.description || '').toLowerCase().includes(searchQuery.toLowerCase()) ||
+ feed.url.toLowerCase().includes(searchQuery.toLowerCase())
+ )
+ : feedsList;
@@ -266,6 +278,13 @@
+
+
+
+
{#if isLoading && feedsList.length === 0}
@@ -274,7 +293,7 @@
{:else}
diff --git a/frontend/src/routes/readlist/+page.svelte b/frontend/src/routes/readlist/+page.svelte
index 2dc05a9..ce16faa 100644
--- a/frontend/src/routes/readlist/+page.svelte
+++ b/frontend/src/routes/readlist/+page.svelte
@@ -2,6 +2,7 @@
import { onMount } from 'svelte';
import { readlist } from '$lib/readlist';
import CardList from '$lib/components/CardList.svelte';
+ import SearchBar from '$lib/components/SearchBar.svelte';
import type { ReadLaterItem } from '$lib/types';
let url = '';
@@ -9,6 +10,7 @@
let error: string | null = null;
let showArchived = false;
let archivingItems: Record = {};
+ let searchQuery = '';
onMount(() => {
loadItems();
@@ -59,7 +61,16 @@
}
function getFilteredItems() {
- return $readlist;
+ if (!searchQuery) {
+ return $readlist;
+ }
+
+ return $readlist.filter(
+ (item) =>
+ item.title.toLowerCase().includes(searchQuery.toLowerCase()) ||
+ item.description.toLowerCase().includes(searchQuery.toLowerCase()) ||
+ item.url.toLowerCase().includes(searchQuery.toLowerCase())
+ );
}
@@ -107,6 +118,13 @@
+
+
+
+
{