Clipboard writes are awaited because clipboard.writeText returns a Promise since Electron 44. Preloads only load electron, so the removed sandbox shims in Electron 45 do not apply; the synchronous safeStorage API is deprecated but still available. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
469a1fd8b5
commit
909149bd64
3 files changed
+9
-9
No files matched your search
@@ -3631,8 +3631,8 @@ ipcMain.handle('import-upload-log', async () => {
|
||||
return { entries, path: filePaths[0] };
|
||||
});
|
||||
|
||||
ipcMain.handle('copy-to-clipboard', (_event, text) => {
|
||||
clipboard.writeText(text);
|
||||
ipcMain.handle('copy-to-clipboard', async (_event, text) => {
|
||||
await clipboard.writeText(text);
|
||||
return true;
|
||||
});
|
||||
|
||||
@@ -4320,9 +4320,9 @@ ipcMain.handle('mcp:rotate', async event => {
|
||||
const result = await dialog.showMessageBox(mainWindow, { type: 'warning', message: shellText('MCP-Zugang erneuern? Der bisherige Code wird ungültig.', 'Rotate MCP access? The previous code becomes invalid.'), buttons: ['Abbrechen / Cancel', 'Erneuern / Rotate'], defaultId: 0, cancelId: 0, noLink: true });
|
||||
return result.response === 1 ? mcpService.rotate() : mcpService.state();
|
||||
});
|
||||
ipcMain.handle('mcp:copy-code', event => {
|
||||
ipcMain.handle('mcp:copy-code', async event => {
|
||||
if (!isTrustedOnlineBackupIpcEvent(event) || !mcpService?.active) throw new Error('MCP_ACCESS_DENIED');
|
||||
clipboard.writeText(mcpService.store.code());
|
||||
await clipboard.writeText(mcpService.store.code());
|
||||
return true;
|
||||
});
|
||||
ipcMain.handle('mcp:add-grant', async event => {
|
||||
|
||||
Generated
+4
-4
@@ -14,7 +14,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@modelcontextprotocol/sdk": "1.32.1",
|
||||
"electron": "^42.11.12",
|
||||
"electron": "^45.0.0",
|
||||
"electron-builder": "^26.15.3",
|
||||
"eslint": "^10.8.1",
|
||||
"eslint-plugin-security": "^4.0.1",
|
||||
@@ -2073,9 +2073,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/electron": {
|
||||
"version": "42.11.12",
|
||||
"resolved": "https://registry.npmjs.org/electron/-/electron-42.11.12.tgz",
|
||||
"integrity": "sha512-fHlCHh1uqfvWykQUq8eoSoB5q1gej7z/KKd3m7rqEEhHhihm7qz/EvBIkDat7vQoIq3kGTJcrskLbJ6UFkYGyg==",
|
||||
"version": "45.0.0",
|
||||
"resolved": "https://registry.npmjs.org/electron/-/electron-45.0.0.tgz",
|
||||
"integrity": "sha512-yjz4uhMBcO6L5X7CWgRMobf2EMJPnb9j4zuf+nu/TU/6E4Sqfx7fn/a2eACo4qngjml/0JnsoZhxYroJLxLd2w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@modelcontextprotocol/sdk": "1.32.1",
|
||||
"electron": "^42.11.12",
|
||||
"electron": "^45.0.0",
|
||||
"electron-builder": "^26.15.3",
|
||||
"eslint": "^10.8.1",
|
||||
"eslint-plugin-security": "^4.0.1",
|
||||
|
||||
Reference in new issue
Block a user