diff --git a/src/renderer/src/components/entry-column/context-menu.tsx b/src/renderer/src/components/entry-column/context-menu.tsx
deleted file mode 100644
index 038335c7e..000000000
--- a/src/renderer/src/components/entry-column/context-menu.tsx
+++ /dev/null
@@ -1,44 +0,0 @@
-import {
- ContextMenu,
- ContextMenuContent,
- ContextMenuItem,
- ContextMenuTrigger,
-} from "@renderer/components/ui/context-menu"
-import { useEntryActions } from "@renderer/hooks/useEntryActions"
-import { EntriesResponse } from "@renderer/lib/types"
-
-export function EntryContextMenu({
- entry,
- view,
- children,
-}: {
- entry: EntriesResponse[number]
- view?: number
- children: React.ReactNode
-}) {
- if (!entry?.url || view === undefined) return children
-
- const { execAction, items } = useEntryActions({
- url: entry.url,
- images: entry.images,
- view,
- })
-
- return (
-
- {children}
- e.stopPropagation()}>
- {items
- .filter((item) => !item.disabled)
- .map((item) => (
- execAction(item.action)}
- >
- {item.name}
-
- ))}
-
-
- )
-}
diff --git a/src/renderer/src/components/entry-column/index.tsx b/src/renderer/src/components/entry-column/index.tsx
index 6c4330aef..b40f64105 100644
--- a/src/renderer/src/components/entry-column/index.tsx
+++ b/src/renderer/src/components/entry-column/index.tsx
@@ -7,7 +7,8 @@ import { SocialMediaItem } from "./social-media-item"
import { PictureItem } from "./picture-item"
import { VideoItem } from "./video-item"
import { NotificationItem } from "./notification-item"
-import { EntryContextMenu } from "./context-menu"
+import { showNativeMenu } from "@renderer/lib/native-menu"
+import { EntryItemWrapper } from "./item-wrapper"
const gridMode = [2, 3]
@@ -69,21 +70,15 @@ export function EntryColumn({
)}
>
{page.data?.map((entry) => (
-
{
- e.stopPropagation()
- setActivedEntry(entry)
- }}
+ entry={entry}
+ activedEntry={activedEntry}
+ setActivedEntry={setActivedEntry}
+ view={activedList?.view}
>
-
-
-
-
+
+
))}
))}
diff --git a/src/renderer/src/components/entry-column/item-wrapper.tsx b/src/renderer/src/components/entry-column/item-wrapper.tsx
new file mode 100644
index 000000000..8940975dc
--- /dev/null
+++ b/src/renderer/src/components/entry-column/item-wrapper.tsx
@@ -0,0 +1,55 @@
+import { ActivedEntry, EntriesResponse } from "@renderer/lib/types"
+import { cn } from "@renderer/lib/utils"
+import { showNativeMenu } from "@renderer/lib/native-menu"
+import { useEntryActions } from "@renderer/hooks/useEntryActions"
+
+export function EntryItemWrapper({
+ entry,
+ activedEntry,
+ setActivedEntry,
+ children,
+ view,
+}: {
+ entry: EntriesResponse[number]
+ activedEntry: ActivedEntry
+ setActivedEntry: (value: ActivedEntry) => void
+ children: React.ReactNode
+ view?: number
+}) {
+ if (!entry?.url || view === undefined) return children
+
+ const { execAction, items } = useEntryActions({
+ url: entry.url,
+ images: entry.images,
+ view,
+ })
+
+ return (
+ {
+ e.stopPropagation()
+ setActivedEntry(entry)
+ }}
+ onContextMenu={(e) => {
+ e.preventDefault()
+ showNativeMenu(
+ items
+ .filter((item) => !item.disabled)
+ .map((item) => ({
+ type: "text",
+ label: item.name,
+ click: () => execAction(item.action),
+ })),
+ e,
+ )
+ }}
+ >
+ {children}
+
+ )
+}