+
{{ $t('word.edit') }}
-
+
{{ $t('word.delete') }}
@@ -30,6 +30,11 @@
+
@@ -37,13 +42,15 @@
import { mapGetters, mapActions } from 'vuex';
import BaseContextMenu from '@/components/BaseContextMenu';
import ConfirmModal from '@/components/BaseConfirmModal';
+import ModalEditDatabase from '@/components/ModalEditDatabase';
import Database from '@/ipc-api/Database';
export default {
name: 'WorkspaceExploreBarDatabaseContext',
components: {
BaseContextMenu,
- ConfirmModal
+ ConfirmModal,
+ ModalEditDatabase
},
props: {
contextEvent: MouseEvent,
@@ -51,7 +58,8 @@ export default {
},
data () {
return {
- isConfirmModal: false
+ isDeleteModal: false,
+ isEditModal: false
};
},
computed: {
@@ -65,11 +73,18 @@ export default {
showEditModal: 'application/showEditConnModal',
addNotification: 'notifications/addNotification'
}),
- showConfirmModal () {
- this.isConfirmModal = true;
+ showDeleteModal () {
+ this.isDeleteModal = true;
},
- hideConfirmModal () {
- this.isConfirmModal = false;
+ hideDeleteModal () {
+ this.isDeleteModal = false;
+ },
+ showEditModal () {
+ this.isEditModal = true;
+ },
+ hideEditModal () {
+ this.isEditModal = false;
+ this.closeContext();
},
closeContext () {
this.$emit('close-context');
diff --git a/src/renderer/ipc-api/Database.js b/src/renderer/ipc-api/Database.js
index 2464137b..6e1ac288 100644
--- a/src/renderer/ipc-api/Database.js
+++ b/src/renderer/ipc-api/Database.js
@@ -6,6 +6,14 @@ export default class {
return ipcRenderer.invoke('create-database', params);
}
+ static updateDatabase (params) {
+ return ipcRenderer.invoke('update-database', params);
+ }
+
+ static getDatabaseCollation (params) {
+ return ipcRenderer.invoke('get-database-collation', params);
+ }
+
static deleteDatabase (params) {
return ipcRenderer.invoke('delete-database', params);
}