perf: ♻️ Add context menu

This commit is contained in:
viarotel 2023-11-16 13:47:48 +08:00
parent f1106eef4a
commit f0f25a79ab
2 changed files with 10 additions and 0 deletions

View File

@ -1,6 +1,7 @@
import path from 'node:path'
import { BrowserWindow, app, shell } from 'electron'
import { electronApp, optimizer } from '@electron-toolkit/utils'
import contextMenu from 'electron-context-menu'
// process.js 必须位于非依赖项的顶部
import './helpers/process.js'
@ -26,6 +27,14 @@ if (!debug) {
)
}
contextMenu({
showCopyImage: false,
showSelectAll: false,
showSearchWithGoogle: false,
showSaveImageAs: true,
showInspectElement: !app.isPackaged,
})
// The built directory structure
//
// ├─┬─┬ dist

View File

@ -34,6 +34,7 @@
"dayjs": "^1.11.10",
"electron": "^27.0.3",
"electron-builder": "^24.6.4",
"electron-context-menu": "^3.6.1",
"electron-log": "^5.0.0",
"electron-store": "^8.1.0",
"electron-updater": "^6.1.4",