From cc8dbb8df792268956070a179a69c8986ee8a3e4 Mon Sep 17 00:00:00 2001 From: Fabio Date: Fri, 26 Jun 2020 18:14:16 +0200 Subject: [PATCH] Start implementing fields edit --- .../components/ModalSettingsUpdate.vue | 2 +- src/renderer/components/Workspace.vue | 1 - .../components/WorkspaceConnectPanel.vue | 1 - .../components/WorkspaceQueryTable.vue | 72 +++------ .../components/WorkspaceQueryTableCell.vue | 147 ++++++++++++++++++ src/renderer/i18n/en-US.js | 3 +- src/renderer/scss/_variables.scss | 1 + .../store/modules/application.store.js | 2 +- 8 files changed, 176 insertions(+), 53 deletions(-) create mode 100644 src/renderer/components/WorkspaceQueryTableCell.vue diff --git a/src/renderer/components/ModalSettingsUpdate.vue b/src/renderer/components/ModalSettingsUpdate.vue index f956526f..39fb98af 100644 --- a/src/renderer/components/ModalSettingsUpdate.vue +++ b/src/renderer/components/ModalSettingsUpdate.vue @@ -45,7 +45,7 @@ export default { computed: { ...mapGetters({ updateStatus: 'application/getUpdateStatus', - downloadPercentage: 'application/getDownloadProgress'// TODO: remove float + downloadPercentage: 'application/getDownloadProgress' }), updateMessage () { switch (this.updateStatus) { diff --git a/src/renderer/components/Workspace.vue b/src/renderer/components/Workspace.vue index 52ad4bd8..86cfb344 100644 --- a/src/renderer/components/Workspace.vue +++ b/src/renderer/components/Workspace.vue @@ -82,7 +82,6 @@ export default { }, methods: { ...mapActions({ - addNotification: 'notifications/addNotification', addWorkspace: 'workspaces/addWorkspace', connectWorkspace: 'workspaces/connectWorkspace', removeConnected: 'workspaces/removeConnected', diff --git a/src/renderer/components/WorkspaceConnectPanel.vue b/src/renderer/components/WorkspaceConnectPanel.vue index 116fad75..c3d1671b 100644 --- a/src/renderer/components/WorkspaceConnectPanel.vue +++ b/src/renderer/components/WorkspaceConnectPanel.vue @@ -45,7 +45,6 @@ export default { }, methods: { ...mapActions({ - addNotification: 'notifications/addNotification', connectWorkspace: 'workspaces/connectWorkspace' }), async startConnection () { diff --git a/src/renderer/components/WorkspaceQueryTable.vue b/src/renderer/components/WorkspaceQueryTable.vue index 16a0d17b..47420fee 100644 --- a/src/renderer/components/WorkspaceQueryTable.vue +++ b/src/renderer/components/WorkspaceQueryTable.vue @@ -34,16 +34,14 @@ :key="row._id" class="tr" > -
- {{ col | typeFormat(fieldType(cKey)) }} -
+ :content="col" + :field="cKey" + :type="fieldType(cKey)" + @updateField="updateField" + /> @@ -52,48 +50,16 @@ + + diff --git a/src/renderer/i18n/en-US.js b/src/renderer/i18n/en-US.js index 741fa3a9..b4c3180f 100644 --- a/src/renderer/i18n/en-US.js +++ b/src/renderer/i18n/en-US.js @@ -51,7 +51,8 @@ module.exports = { updateAvailable: 'Update available', downloadingUpdate: 'Downloading update', updateDownloaded: 'Update downloaded', - restartToInstall: 'Restart Antares to install' + restartToInstall: 'Restart Antares to install', + unableEditFieldWithoutPrimary: 'Unable to edit a field without a primary key in resultset' }, // Date and Time short: { diff --git a/src/renderer/scss/_variables.scss b/src/renderer/scss/_variables.scss index 9f8d9ec6..fb82a988 100644 --- a/src/renderer/scss/_variables.scss +++ b/src/renderer/scss/_variables.scss @@ -7,6 +7,7 @@ $bg-color-gray: #272727; $primary-color: #e36929; $success-color: #32b643; $error-color: #de3b28; +$warning-color: #e0a40c; /*Sizes*/ $titlebar-height: 1.5rem; diff --git a/src/renderer/store/modules/application.store.js b/src/renderer/store/modules/application.store.js index 176b6a58..812af3b8 100644 --- a/src/renderer/store/modules/application.store.js +++ b/src/renderer/store/modules/application.store.js @@ -24,7 +24,7 @@ export default { isSettingModal: state => state.is_setting_modal, selectedSettingTab: state => state.selected_setting_tab, getUpdateStatus: state => state.update_status, - getDownloadProgress: state => state.download_progress + getDownloadProgress: state => Number(state.download_progress.toFixed(1)) }, mutations: { SET_LOADING_STATUS (state, payload) {