Skip to content

Commit

Permalink
feat: handle double click
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed May 24, 2024
1 parent e1f88de commit 01ed895
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/renderer/src/components/entry-column/item-wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export function EntryItemWrapper({
e.stopPropagation()
setActiveEntry(entry.id)
}}
onDoubleClick={() => window.open(entry.url, "_blank")}
onContextMenu={(e) => {
e.preventDefault()
showNativeMenu(
Expand Down
9 changes: 8 additions & 1 deletion src/renderer/src/components/feed-column/item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ export function FeedItem({
e.stopPropagation()
setFeedActive(feed)
}}
onDoubleClick={() =>
window.open(
`${import.meta.env.VITE_WEB_URL}/feed/${feed.feedId}`,
"_blank",
)
}
onContextMenu={(e) => {
showNativeMenu(
[
Expand All @@ -125,12 +131,13 @@ export function FeedItem({
click: () =>
window.open(
`${import.meta.env.VITE_WEB_URL}/feed/${feed.feedId}`,
"_blank",
),
},
{
type: "text",
label: "Open Site in Browser",
click: () => window.open(feed.feeds.siteUrl),
click: () => window.open(feed.feeds.siteUrl, "_blank"),
},
],
e,
Expand Down

0 comments on commit 01ed895

Please sign in to comment.