aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/components/settings
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2025-11-02 20:48:17 +0000
committerGitHub <noreply@github.com>2025-11-02 20:48:17 +0000
commit5358682a8cfbd12d93a4e9962f7a9f0440c42c19 (patch)
tree0b642ca49fa047177cd1280845cf86a0a7fe32b3 /apps/web/components/settings
parent633686b58c13fc9be9fa1354ae53cab222d37546 (diff)
downloadkarakeep-5358682a8cfbd12d93a4e9962f7a9f0440c42c19.tar.zst
feat(rss): Add import tags from RSS feed categories (#2031)
* feat(feeds): Add import tags from RSS feed categories - Add importTags boolean field to rssFeedsTable schema (default: false) - Create database migration 0063_add_import_tags_to_feeds.sql - Update zod schemas (zFeedSchema, zNewFeedSchema, zUpdateFeedSchema) to include importTags - Update Feed model to handle importTags in create and update methods - Update feedWorker to: - Read title and categories from RSS parser - Attach categories as tags to bookmarks when importTags is enabled - Log warnings if tag attachment fails Resolves #1996 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Mohamed Bassem <MohamedBassem@users.noreply.github.com> * feat(web): Add importTags option to feed settings UI - Add importTags toggle to FeedsEditorDialog (create feed) - Add importTags toggle to EditFeedDialog (edit feed) - Display as a bordered switch control with descriptive text - Defaults to false for new feeds Co-authored-by: Mohamed Bassem <MohamedBassem@users.noreply.github.com> * fix migration * remove extra migration --------- Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Mohamed Bassem <MohamedBassem@users.noreply.github.com>
Diffstat (limited to 'apps/web/components/settings')
-rw-r--r--apps/web/components/settings/FeedSettings.tsx47
1 files changed, 47 insertions, 0 deletions
diff --git a/apps/web/components/settings/FeedSettings.tsx b/apps/web/components/settings/FeedSettings.tsx
index f14e0841..23b639e4 100644
--- a/apps/web/components/settings/FeedSettings.tsx
+++ b/apps/web/components/settings/FeedSettings.tsx
@@ -71,6 +71,7 @@ export function FeedsEditorDialog() {
name: "",
url: "",
enabled: true,
+ importTags: false,
},
});
@@ -142,6 +143,28 @@ export function FeedsEditorDialog() {
);
}}
/>
+ <FormField
+ control={form.control}
+ name="importTags"
+ render={({ field }) => {
+ return (
+ <FormItem className="flex flex-row items-center justify-between rounded-lg border p-3">
+ <div className="space-y-0.5">
+ <FormLabel>Import Tags</FormLabel>
+ <div className="text-sm text-muted-foreground">
+ Automatically import categories from RSS feed as tags
+ </div>
+ </div>
+ <FormControl>
+ <Switch
+ checked={field.value}
+ onCheckedChange={field.onChange}
+ />
+ </FormControl>
+ </FormItem>
+ );
+ }}
+ />
</form>
</Form>
<DialogFooter>
@@ -177,6 +200,7 @@ export function EditFeedDialog({ feed }: { feed: ZFeed }) {
feedId: feed.id,
name: feed.name,
url: feed.url,
+ importTags: feed.importTags,
});
}
}, [open]);
@@ -196,6 +220,7 @@ export function EditFeedDialog({ feed }: { feed: ZFeed }) {
feedId: feed.id,
name: feed.name,
url: feed.url,
+ importTags: feed.importTags,
},
});
return (
@@ -266,6 +291,28 @@ export function EditFeedDialog({ feed }: { feed: ZFeed }) {
);
}}
/>
+ <FormField
+ control={form.control}
+ name="importTags"
+ render={({ field }) => {
+ return (
+ <FormItem className="flex flex-row items-center justify-between rounded-lg border p-3">
+ <div className="space-y-0.5">
+ <FormLabel>Import Tags</FormLabel>
+ <div className="text-sm text-muted-foreground">
+ Automatically import categories from RSS feed as tags
+ </div>
+ </div>
+ <FormControl>
+ <Switch
+ checked={field.value}
+ onCheckedChange={field.onChange}
+ />
+ </FormControl>
+ </FormItem>
+ );
+ }}
+ />
</form>
</Form>
<DialogFooter>