Skip to content

Commit 12c3af7

Browse files
feat(desktop): add "Copy Image" to right-click context menu (#1052)
1 parent e231681 commit 12c3af7

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

apps/desktop/src/main.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1695,6 +1695,14 @@ function createWindow(): BrowserWindow {
16951695
);
16961696
}
16971697

1698+
if (params.mediaType === "image") {
1699+
menuTemplate.push({
1700+
label: "Copy Image",
1701+
click: () => window.webContents.copyImageAt(params.x, params.y),
1702+
});
1703+
menuTemplate.push({ type: "separator" });
1704+
}
1705+
16981706
menuTemplate.push(
16991707
{ role: "cut", enabled: params.editFlags.canCut },
17001708
{ role: "copy", enabled: params.editFlags.canCopy },

0 commit comments

Comments
 (0)