From c21bd6075c1203607c05e45b76233d57e3008190 Mon Sep 17 00:00:00 2001 From: Fabio Di Stasio Date: Mon, 18 Jul 2022 10:38:07 +0200 Subject: [PATCH] feat: context menu to copy queries from console --- src/renderer/components/Workspace.vue | 2 +- .../components/WorkspaceQueryConsole.vue | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/renderer/components/Workspace.vue b/src/renderer/components/Workspace.vue index 5df215d0..7d0a6fa6 100644 --- a/src/renderer/components/Workspace.vue +++ b/src/renderer/components/Workspace.vue @@ -583,7 +583,7 @@ watch(queryTabs, (newVal, oldVal) => { }); const addQueryTab = () => { - newTab({ uid: props.connection.uid, type: 'query' }); + newTab({ uid: props.connection.uid, type: 'query', schema: workspace.value.breadcrumbs.schema }); }; const getSelectedTab = () => { diff --git a/src/renderer/components/WorkspaceQueryConsole.vue b/src/renderer/components/WorkspaceQueryConsole.vue index a3a27dab..06260905 100644 --- a/src/renderer/components/WorkspaceQueryConsole.vue +++ b/src/renderer/components/WorkspaceQueryConsole.vue @@ -22,12 +22,22 @@ :key="i" class="query-console-log" tabindex="0" + @contextmenu.prevent="contextMenu($event, wLog)" > {{ moment(wLog.date).format('YYYY-MM-DD HH:mm:ss') }}: {{ wLog.sql }} + +
+ {{ $t('word.copy') }} +
+