From 18b66b50323e69ed9d0090a4cbbe0ada9e10838d Mon Sep 17 00:00:00 2001 From: Fabio Di Stasio Date: Sat, 30 Apr 2022 17:15:33 +0200 Subject: [PATCH] fix: missing tabs uid --- src/renderer/components/ModalProcessesList.vue | 2 +- src/renderer/components/QueryEditor.vue | 4 ++-- src/renderer/components/Workspace.vue | 16 ++++++++++++++++ .../components/WorkspaceTabNewFunction.vue | 4 +--- .../components/WorkspaceTabNewRoutine.vue | 4 +--- .../components/WorkspaceTabNewScheduler.vue | 4 +--- src/renderer/components/WorkspaceTabNewTable.vue | 4 +--- .../components/WorkspaceTabNewTrigger.vue | 4 +--- .../WorkspaceTabNewTriggerFunction.vue | 4 +--- src/renderer/components/WorkspaceTabNewView.vue | 4 +--- .../components/WorkspaceTabPropsFunction.vue | 4 +--- .../components/WorkspaceTabPropsRoutine.vue | 5 +---- .../components/WorkspaceTabPropsScheduler.vue | 4 +--- .../components/WorkspaceTabPropsTable.vue | 4 +--- .../components/WorkspaceTabPropsTableRow.vue | 1 + .../components/WorkspaceTabPropsTrigger.vue | 4 +--- .../WorkspaceTabPropsTriggerFunction.vue | 4 +--- .../components/WorkspaceTabPropsView.vue | 4 +--- src/renderer/components/WorkspaceTabQuery.vue | 4 +--- 19 files changed, 35 insertions(+), 49 deletions(-) diff --git a/src/renderer/components/ModalProcessesList.vue b/src/renderer/components/ModalProcessesList.vue index b1f0fd83..9c9a6608 100644 --- a/src/renderer/components/ModalProcessesList.vue +++ b/src/renderer/components/ModalProcessesList.vue @@ -295,7 +295,7 @@ export default { this.stopRefresh(); this.selectedCell = cell; - this.selectedRow = cell.id; + this.selectedRow = Number(cell.id); this.contextEvent = event; this.isContext = true; }, diff --git a/src/renderer/components/QueryEditor.vue b/src/renderer/components/QueryEditor.vue index 2224186d..7fa3c0f5 100644 --- a/src/renderer/components/QueryEditor.vue +++ b/src/renderer/components/QueryEditor.vue @@ -13,6 +13,7 @@ import * as ace from 'ace-builds'; import 'ace-builds/webpack-resolver'; import '../libs/ext-language_tools'; import { storeToRefs } from 'pinia'; +import { uidGen } from 'common/libs/uidGen'; import { useApplicationStore } from '@/stores/application'; import { useSettingsStore } from '@/stores/settings'; import Tables from '@/ipc-api/Tables'; @@ -59,7 +60,7 @@ export default { cursorPosition: 0, fields: [], customCompleter: [], - id: null, + id: uidGen(), lastSchema: null }; }, @@ -226,7 +227,6 @@ export default { } }, created () { - this.id = this._uid; this.lastSchema = this.schema; }, mounted () { diff --git a/src/renderer/components/Workspace.vue b/src/renderer/components/Workspace.vue index 5fd48414..fec4a3db 100644 --- a/src/renderer/components/Workspace.vue +++ b/src/renderer/components/Workspace.vue @@ -319,6 +319,7 @@ {{ $t('message.routineBody') }} import { storeToRefs } from 'pinia'; +import { useNotificationsStore } from '@/stores/notifications'; import { useWorkspacesStore } from '@/stores/workspaces'; import ConfirmModal from '@/components/BaseConfirmModal'; diff --git a/src/renderer/components/WorkspaceTabPropsTrigger.vue b/src/renderer/components/WorkspaceTabPropsTrigger.vue index 34162b80..b315cef6 100644 --- a/src/renderer/components/WorkspaceTabPropsTrigger.vue +++ b/src/renderer/components/WorkspaceTabPropsTrigger.vue @@ -145,6 +145,7 @@ export default { QueryEditor }, props: { + tabUid: String, connection: Object, trigger: String, isSelected: Boolean, @@ -192,9 +193,6 @@ export default { workspace () { return this.getWorkspace(this.connection.uid); }, - tabUid () { - return this.$vnode?.key; - }, customizations () { return this.workspace.customizations; }, diff --git a/src/renderer/components/WorkspaceTabPropsTriggerFunction.vue b/src/renderer/components/WorkspaceTabPropsTriggerFunction.vue index a5d75665..4b5c9c72 100644 --- a/src/renderer/components/WorkspaceTabPropsTriggerFunction.vue +++ b/src/renderer/components/WorkspaceTabPropsTriggerFunction.vue @@ -119,6 +119,7 @@ export default { ModalAskParameters }, props: { + tabUid: String, connection: Object, function: String, isSelected: Boolean, @@ -170,9 +171,6 @@ export default { customizations () { return this.workspace.customizations; }, - tabUid () { - return this.$vnode?.key; - }, isChanged () { return JSON.stringify(this.originalFunction) !== JSON.stringify(this.localFunction); }, diff --git a/src/renderer/components/WorkspaceTabPropsView.vue b/src/renderer/components/WorkspaceTabPropsView.vue index 17a350a1..feb95e82 100644 --- a/src/renderer/components/WorkspaceTabPropsView.vue +++ b/src/renderer/components/WorkspaceTabPropsView.vue @@ -134,6 +134,7 @@ export default { QueryEditor }, props: { + tabUid: String, connection: Object, isSelected: Boolean, schema: String, @@ -178,9 +179,6 @@ export default { workspace () { return this.getWorkspace(this.connection.uid); }, - tabUid () { - return this.$vnode?.key; - }, isChanged () { return JSON.stringify(this.originalView) !== JSON.stringify(this.localView); }, diff --git a/src/renderer/components/WorkspaceTabQuery.vue b/src/renderer/components/WorkspaceTabQuery.vue index b178e6fb..b7d0f799 100644 --- a/src/renderer/components/WorkspaceTabQuery.vue +++ b/src/renderer/components/WorkspaceTabQuery.vue @@ -211,6 +211,7 @@ export default { }, mixins: [tableTabs], props: { + tabUid: String, connection: Object, tab: Object, isSelected: Boolean @@ -261,9 +262,6 @@ export default { workspace () { return this.getWorkspace(this.connection.uid); }, - tabUid () { - return this.$vnode?.key; - }, breadcrumbsSchema () { return this.workspace.breadcrumbs.schema || null; },