Skip to content

Commit 5ae725c

Browse files
fix(desktop): add "Copy Image" to right-click context menu
1 parent 790fda1 commit 5ae725c

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
@@ -1258,6 +1258,14 @@ function createWindow(): BrowserWindow {
12581258
menuTemplate.push({ type: "separator" });
12591259
}
12601260

1261+
if (params.mediaType === "image") {
1262+
menuTemplate.push({
1263+
label: "Copy Image",
1264+
click: () => window.webContents.copyImageAt(params.x, params.y),
1265+
});
1266+
menuTemplate.push({ type: "separator" });
1267+
}
1268+
12611269
menuTemplate.push(
12621270
{ role: "cut", enabled: params.editFlags.canCut },
12631271
{ role: "copy", enabled: params.editFlags.canCopy },

0 commit comments

Comments
 (0)