From 07f60c39173e9db452909d74573c3aecf4b6466b Mon Sep 17 00:00:00 2001 From: Fabio Di Stasio Date: Thu, 4 Mar 2021 19:34:18 +0100 Subject: [PATCH] feat(UI): modal that shows process query --- src/renderer/components/BaseConfirmModal.vue | 6 ++++- src/renderer/components/BaseVirtualScroll.vue | 22 +++++++++++----- .../components/ModalProcessesList.vue | 25 +++++++++---------- src/renderer/components/ProcessesListRow.vue | 23 +++++++++++------ src/renderer/i18n/en-US.js | 4 ++- src/renderer/scss/_data-types.scss | 1 + 6 files changed, 52 insertions(+), 29 deletions(-) diff --git a/src/renderer/components/BaseConfirmModal.vue b/src/renderer/components/BaseConfirmModal.vue index 96ed5486..e717a7ea 100644 --- a/src/renderer/components/BaseConfirmModal.vue +++ b/src/renderer/components/BaseConfirmModal.vue @@ -24,7 +24,7 @@ - - @@ -213,7 +212,7 @@ export default { }, resizeResults () { if (this.$refs.resultTable) { - const el = this.$refs.tableWrapper; + const el = this.$refs.tableWrapper.parentElement; if (el) { const size = el.offsetHeight; @@ -241,7 +240,7 @@ export default { this.currentSort = ''; this.currentSortDir = 'asc'; }, - showInfoModal () { + stopRefresh () { this.autorefreshTimer = 0; this.clearRefresh(); }, diff --git a/src/renderer/components/ProcessesListRow.vue b/src/renderer/components/ProcessesListRow.vue index 07d71c26..a7e825e0 100644 --- a/src/renderer/components/ProcessesListRow.vue +++ b/src/renderer/components/ProcessesListRow.vue @@ -18,23 +18,26 @@
-
+
@@ -56,7 +59,7 @@ export default { filters: { cutText (val) { if (typeof val !== 'string') return val; - return val.length > 128 ? `${val.substring(0, 128)}[...]` : val; + return val.length > 250 ? `${val.substring(0, 250)}[...]` : val; } }, props: { @@ -65,7 +68,7 @@ export default { data () { return { isInlineEditor: {}, - isTextareaEditor: false, + isInfoModal: false, editorMode: 'sql' }; }, @@ -90,9 +93,13 @@ export default { this.$emit('contextmenu', event, payload); } }, + hideInfoModal () { + this.isInfoModal = false; + }, dblClick (col) { if (col !== 'info') return; - this.$emit('show-info', col); + this.$emit('stop-refresh'); + this.isInfoModal = true; }, onKey (e) { e.stopPropagation(); diff --git a/src/renderer/i18n/en-US.js b/src/renderer/i18n/en-US.js index 34782320..df0a371b 100644 --- a/src/renderer/i18n/en-US.js +++ b/src/renderer/i18n/en-US.js @@ -99,7 +99,8 @@ module.exports = { copy: 'Copy', paste: 'Paste', tools: 'Tools', - variables: 'Variables' + variables: 'Variables', + processes: 'Processes' }, message: { appWelcome: 'Welcome to Antares SQL Client!', @@ -197,6 +198,7 @@ module.exports = { includeBetaUpdates: 'Include beta updates', setNull: 'Set NULL', processesList: 'Processes list', + processInfo: 'Process info', manageUsers: 'Manage users' }, faker: { diff --git a/src/renderer/scss/_data-types.scss b/src/renderer/scss/_data-types.scss index 83027672..5fe5fcf5 100644 --- a/src/renderer/scss/_data-types.scss +++ b/src/renderer/scss/_data-types.scss @@ -30,6 +30,7 @@ "double": $number-color, "decimal": $number-color, "bigint": $number-color, + "newdecimal": $number-color, "datetime": $date-color, "date": $date-color, "time": $date-color,