From 683a3918cec7add5cba49d8f07611a0214efe888 Mon Sep 17 00:00:00 2001 From: Sebastian Richner Date: Wed, 6 Mar 2024 13:32:30 +0100 Subject: [PATCH] Improve data export --- .../electron/main/services/WindowService.ts | 25 +-- .../components/DataExportUserInputTracker.vue | 120 ++++++----- .../DataExportWindowActivityTracker.vue | 197 +++++++++--------- 3 files changed, 173 insertions(+), 169 deletions(-) diff --git a/src/electron/electron/main/services/WindowService.ts b/src/electron/electron/main/services/WindowService.ts index 0c16cb72..786dd83e 100644 --- a/src/electron/electron/main/services/WindowService.ts +++ b/src/electron/electron/main/services/WindowService.ts @@ -213,7 +213,7 @@ export class WindowService { const __dirname = dirname(__filename); const preload = join(__dirname, '../preload/index.mjs'); this.dataExportWindow = new BrowserWindow({ - width: 900, + width: 1200, height: 850, show: false, minimizable: false, @@ -239,17 +239,18 @@ export class WindowService { return { action: 'deny' }; }); - const template = [ - { - label: 'Edit', - submenu: [ - { label: 'Copy', accelerator: 'CmdOrCtrl+C', selector: 'copy:' }, - { label: 'Paste', accelerator: 'CmdOrCtrl+V', selector: 'paste:' } - ] - } - ]; - - Menu.setApplicationMenu(Menu.buildFromTemplate(template)); + if (!is.dev) { + const template = [ + { + label: 'Edit', + submenu: [ + { label: 'Copy', accelerator: 'CmdOrCtrl+C', selector: 'copy:' }, + { label: 'Paste', accelerator: 'CmdOrCtrl+V', selector: 'paste:' } + ] + } + ]; + Menu.setApplicationMenu(Menu.buildFromTemplate(template)); + } if (is.macOS) { await app.dock.show(); diff --git a/src/electron/src/components/DataExportUserInputTracker.vue b/src/electron/src/components/DataExportUserInputTracker.vue index 2124638c..6b160525 100644 --- a/src/electron/src/components/DataExportUserInputTracker.vue +++ b/src/electron/src/components/DataExportUserInputTracker.vue @@ -32,64 +32,72 @@ const emitChange = () => {