diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..1bd0783 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,13 @@ +{ + "editor.gotoLocation.alternativeDeclarationCommand": "editor.action.revealDefinition", + "editor.gotoLocation.alternativeDefinitionCommand": "editor.action.revealDefinition", + "editor.gotoLocation.alternativeTypeDefinitionCommand": "editor.action.revealDefinition", + "editor.selectionHighlight": false, + "files.autoSave": "onFocusChange", + "editor.suggest.snippetsPreventQuickSuggestions": false, + "editor.quickSuggestions": { + "other": "on", + "comments": "off", + "strings": "on" + } +} \ No newline at end of file diff --git a/changelog.md b/changelog.md index 31c569a..7ac2dd7 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,6 @@ +## 1.2.1(2024-07-7) +1、增加文本消息快捷复制,直接右键文本消息即会自动选中 +2、调整图片消息中直接复制图片功能为需在浏览器端点击图片预览后再右键复制 ## 1.2.0(2024-07-4) 1、消息增加图片预览展示及右键复制 2、优化下载时的隐藏问题 diff --git a/electron/index.js b/electron/index.js index fca6142..6bd5e48 100644 --- a/electron/index.js +++ b/electron/index.js @@ -1,5 +1,5 @@ const { Application } = require('ee-core'); -const { app, Menu, session } = require('electron') +const { app, Menu, MenuItem, session } = require('electron') const http = require('http'); class Index extends Application { @@ -83,6 +83,16 @@ class Index extends Application { win.focus(); }) } + // 在右键点击时显示上下文菜单 + win.webContents.on('context-menu', (event, params) => { + const menu = new Menu(); + menu.append(new MenuItem({ + label: '复制', + role: 'copy' + })); + menu.popup(win); + }); + // do some things session.defaultSession.on('will-download', (downloadevent, item, webContents) => { item.on('updated', (event, state) => { diff --git a/frontend/pages/index/index.vue b/frontend/pages/index/index.vue index f125eef..5af4381 100644 --- a/frontend/pages/index/index.vue +++ b/frontend/pages/index/index.vue @@ -5,13 +5,13 @@