diff --git a/package.json b/package.json index 9262238a4..531fc209b 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "@radix-ui/react-avatar": "1.0.4", "@radix-ui/react-checkbox": "1.0.4", "@radix-ui/react-collapsible": "1.0.3", + "@radix-ui/react-context-menu": "2.1.5", "@radix-ui/react-dialog": "1.0.5", "@radix-ui/react-label": "2.0.2", "@radix-ui/react-popover": "1.0.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4de317320..d38117394 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -32,6 +32,9 @@ importers: '@radix-ui/react-collapsible': specifier: 1.0.3 version: 1.0.3(@types/react-dom@18.3.0)(@types/react@18.3.0)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) + '@radix-ui/react-context-menu': + specifier: 2.1.5 + version: 2.1.5(@types/react-dom@18.3.0)(@types/react@18.3.0)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) '@radix-ui/react-dialog': specifier: 1.0.5 version: 1.0.5(@types/react-dom@18.3.0)(@types/react@18.3.0)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) @@ -930,6 +933,19 @@ packages: '@types/react': optional: true + '@radix-ui/react-context-menu@2.1.5': + resolution: {integrity: sha512-R5XaDj06Xul1KGb+WP8qiOh7tKJNz2durpLBXAGZjSVtctcRFCuEvy2gtMwRJGePwQQE5nV77gs4FwRi8T+r2g==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + '@radix-ui/react-context@1.0.1': resolution: {integrity: sha512-ebbrdFoYTcuZ0v4wG5tedGnp9tzcV8awzsxYph7gXUyvnNLuTIcCk1q17JEbnVhXAKG9oX3KtchwiMIAYp9NLg==} peerDependencies: @@ -1018,6 +1034,19 @@ packages: '@types/react-dom': optional: true + '@radix-ui/react-menu@2.0.6': + resolution: {integrity: sha512-BVkFLS+bUC8HcImkRKPSiVumA1VPOOEC5WBMiT+QAVsPzW1FJzI9KnqgGxVDPBcql5xXrHkD3JOVoXWEXD8SYA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + '@radix-ui/react-popover@1.0.7': resolution: {integrity: sha512-shtvVnlsxT6faMnK/a7n0wptwBD23xc1Z5mdrtKLwVEfsEMXodS0r5s0/g5P0hX//EKYZS2sxUjqfzlg52ZSnQ==} peerDependencies: @@ -4988,6 +5017,21 @@ snapshots: optionalDependencies: '@types/react': 18.3.0 + '@radix-ui/react-context-menu@2.1.5(@types/react-dom@18.3.0)(@types/react@18.3.0)(react-dom@18.3.0(react@18.3.0))(react@18.3.0)': + dependencies: + '@babel/runtime': 7.24.4 + '@radix-ui/primitive': 1.0.1 + '@radix-ui/react-context': 1.0.1(@types/react@18.3.0)(react@18.3.0) + '@radix-ui/react-menu': 2.0.6(@types/react-dom@18.3.0)(@types/react@18.3.0)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.3.0)(@types/react@18.3.0)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.3.0)(react@18.3.0) + '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.3.0)(react@18.3.0) + react: 18.3.0 + react-dom: 18.3.0(react@18.3.0) + optionalDependencies: + '@types/react': 18.3.0 + '@types/react-dom': 18.3.0 + '@radix-ui/react-context@1.0.1(@types/react@18.3.0)(react@18.3.0)': dependencies: '@babel/runtime': 7.24.4 @@ -5076,6 +5120,33 @@ snapshots: '@types/react': 18.3.0 '@types/react-dom': 18.3.0 + '@radix-ui/react-menu@2.0.6(@types/react-dom@18.3.0)(@types/react@18.3.0)(react-dom@18.3.0(react@18.3.0))(react@18.3.0)': + dependencies: + '@babel/runtime': 7.24.4 + '@radix-ui/primitive': 1.0.1 + '@radix-ui/react-collection': 1.0.3(@types/react-dom@18.3.0)(@types/react@18.3.0)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.3.0)(react@18.3.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.3.0)(react@18.3.0) + '@radix-ui/react-direction': 1.0.1(@types/react@18.3.0)(react@18.3.0) + '@radix-ui/react-dismissable-layer': 1.0.5(@types/react-dom@18.3.0)(@types/react@18.3.0)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) + '@radix-ui/react-focus-guards': 1.0.1(@types/react@18.3.0)(react@18.3.0) + '@radix-ui/react-focus-scope': 1.0.4(@types/react-dom@18.3.0)(@types/react@18.3.0)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) + '@radix-ui/react-id': 1.0.1(@types/react@18.3.0)(react@18.3.0) + '@radix-ui/react-popper': 1.1.3(@types/react-dom@18.3.0)(@types/react@18.3.0)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) + '@radix-ui/react-portal': 1.0.4(@types/react-dom@18.3.0)(@types/react@18.3.0)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) + '@radix-ui/react-presence': 1.0.1(@types/react-dom@18.3.0)(@types/react@18.3.0)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.3.0)(@types/react@18.3.0)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) + '@radix-ui/react-roving-focus': 1.0.4(@types/react-dom@18.3.0)(@types/react@18.3.0)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) + '@radix-ui/react-slot': 1.0.2(@types/react@18.3.0)(react@18.3.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.3.0)(react@18.3.0) + aria-hidden: 1.2.4 + react: 18.3.0 + react-dom: 18.3.0(react@18.3.0) + react-remove-scroll: 2.5.5(@types/react@18.3.0)(react@18.3.0) + optionalDependencies: + '@types/react': 18.3.0 + '@types/react-dom': 18.3.0 + '@radix-ui/react-popover@1.0.7(@types/react-dom@18.3.0)(@types/react@18.3.0)(react-dom@18.3.0(react@18.3.0))(react@18.3.0)': dependencies: '@babel/runtime': 7.24.4 diff --git a/src/renderer/src/components/feed-column/list.tsx b/src/renderer/src/components/feed-column/list.tsx index d9bc37029..2863614b4 100644 --- a/src/renderer/src/components/feed-column/list.tsx +++ b/src/renderer/src/components/feed-column/list.tsx @@ -10,6 +10,13 @@ import { ActivedList } from "@renderer/lib/types" import { cn } from "@renderer/lib/utils" import { SiteIcon } from "../site-icon" import { Response as SubscriptionsResponse } from "@renderer/lib/queries/subscriptions" +import { + ContextMenu, + ContextMenuContent, + ContextMenuItem, + ContextMenuTrigger, + ContextMenuSeparator, +} from "@renderer/components/ui/context-menu" export function FeedList({ className, @@ -135,35 +142,46 @@ function FeedCategory({ }} > {data.list.map((feed) => ( -