diff --git a/src/renderer/components/ModalAskCredentials.vue b/src/renderer/components/ModalAskCredentials.vue index 0e57c26b..7794c307 100644 --- a/src/renderer/components/ModalAskCredentials.vue +++ b/src/renderer/components/ModalAskCredentials.vue @@ -19,6 +19,7 @@
{ + this.$refs.firstInput.focus(); + }, 20); + }, methods: { closeModal () { this.$emit('close-asking'); diff --git a/src/renderer/components/ModalEditConnection.vue b/src/renderer/components/ModalEditConnection.vue index 575fa479..43b6bf31 100644 --- a/src/renderer/components/ModalEditConnection.vue +++ b/src/renderer/components/ModalEditConnection.vue @@ -20,6 +20,7 @@
{ + this.$refs.firstInput.focus(); + }, 20); }, beforeDestroy () { window.removeEventListener('keydown', this.onKey); diff --git a/src/renderer/components/ModalEditDatabase.vue b/src/renderer/components/ModalEditDatabase.vue index 5e7ee356..ab4490fb 100644 --- a/src/renderer/components/ModalEditDatabase.vue +++ b/src/renderer/components/ModalEditDatabase.vue @@ -33,7 +33,11 @@
-
{ + this.$refs.firstInput.focus(); + }, 20); }, beforeDestroy () { window.removeEventListener('keydown', this.onKey); diff --git a/src/renderer/components/ModalNewDatabase.vue b/src/renderer/components/ModalNewDatabase.vue index 0d1cb9c8..0683c4ec 100644 --- a/src/renderer/components/ModalNewDatabase.vue +++ b/src/renderer/components/ModalNewDatabase.vue @@ -19,6 +19,7 @@
{ + this.$refs.firstInput.focus(); + }, 20); }, beforeDestroy () { window.removeEventListener('keydown', this.onKey); diff --git a/src/renderer/components/ModalNewTable.vue b/src/renderer/components/ModalNewTable.vue index d337c895..8f308620 100644 --- a/src/renderer/components/ModalNewTable.vue +++ b/src/renderer/components/ModalNewTable.vue @@ -18,6 +18,7 @@
{ + this.$refs.firstInput.focus(); + }, 20); }, methods: { confirmOptionsChange () { diff --git a/src/renderer/components/ModalNewTableRow.vue b/src/renderer/components/ModalNewTableRow.vue index 78b46583..600a1a53 100644 --- a/src/renderer/components/ModalNewTableRow.vue +++ b/src/renderer/components/ModalNewTableRow.vue @@ -25,6 +25,7 @@
{ + const firstSelectableInput = this.$refs.formInput.find(input => !input.disabled); + firstSelectableInput.focus(); + }, 20); }, beforeDestroy () { window.removeEventListener('keydown', this.onKey); diff --git a/src/renderer/components/WorkspacePropsIndexesModal.vue b/src/renderer/components/WorkspacePropsIndexesModal.vue index e29884d0..95e1c611 100644 --- a/src/renderer/components/WorkspacePropsIndexesModal.vue +++ b/src/renderer/components/WorkspacePropsIndexesModal.vue @@ -108,6 +108,19 @@
+
+
+ +
+

+ {{ $t('message.thereAreNoIndexes') }} +

+
+ +
+
@@ -216,7 +229,7 @@ export default { }); }, resetSelectedID () { - this.selectedIndexID = this.indexesProxy[0]._id; + this.selectedIndexID = this.indexesProxy.length ? this.indexesProxy[0]._id : ''; } } }; diff --git a/src/renderer/components/WorkspacePropsOptionsModal.vue b/src/renderer/components/WorkspacePropsOptionsModal.vue index d02ceeb1..79e68ff5 100644 --- a/src/renderer/components/WorkspacePropsOptionsModal.vue +++ b/src/renderer/components/WorkspacePropsOptionsModal.vue @@ -18,6 +18,7 @@
{ + this.$refs.firstInput.focus(); + }, 20); }, methods: { confirmOptionsChange () { diff --git a/src/renderer/i18n/en-US.js b/src/renderer/i18n/en-US.js index f07452b8..5d01d58a 100644 --- a/src/renderer/i18n/en-US.js +++ b/src/renderer/i18n/en-US.js @@ -116,7 +116,8 @@ module.exports = { deleteTable: 'Delete table', emptyCorfirm: 'Do you confirm to empty', unsavedChanges: 'Unsaved changes', - discardUnsavedChanges: 'You have some unsaved changes. By leaving this tab these changes will be discarded.' + discardUnsavedChanges: 'You have some unsaved changes. By leaving this tab these changes will be discarded.', + thereAreNoIndexes: 'There are no indexes' }, // Date and Time short: { diff --git a/src/renderer/scss/main.scss b/src/renderer/scss/main.scss index 846fd891..cf0552bd 100644 --- a/src/renderer/scss/main.scss +++ b/src/renderer/scss/main.scss @@ -234,3 +234,7 @@ body { visibility: hidden; } } + +.empty { + color: $body-font-color; +}