refactor(UI): changed query clear shortcut

This commit is contained in:
Fabio Di Stasio 2021-10-16 18:43:23 +02:00
parent 9046b858b1
commit d2d0c3ca41
4 changed files with 5 additions and 6 deletions

View File

@ -595,7 +595,6 @@ export default {
beforeDestroy () {
window.removeEventListener('keydown', this.onKey);
},
methods: {
...mapActions({
addWorkspace: 'workspaces/addWorkspace',
@ -618,11 +617,11 @@ export default {
if (!this.isSelected)
return;
if ((e.ctrlKey || e.metaKey) && e.keyCode === 84) { // CTRL|Command + t
if ((e.ctrlKey || e.metaKey) && e.keyCode === 84 && !e.altKey) { // CTRL|Command + t
this.addQueryTab();
}
if ((e.ctrlKey || e.metaKey) && e.keyCode === 87) { // CTRL|Command + w
if ((e.ctrlKey || e.metaKey) && e.keyCode === 87 && !e.altKey) { // CTRL|Command + w
const currentTab = this.getSelectedTab();
if (currentTab)
this.closeTab(currentTab);

View File

@ -4,7 +4,7 @@
class="workspace-query-tab column col-12 columns col-gapless no-outline p-0"
tabindex="0"
@keydown.116="runQuery(query)"
@keydown.ctrl.87="clear"
@keydown.ctrl.alt.87="clear"
@keydown.ctrl.66="beautify"
@keydown.ctrl.71="openHistoryModal"
>

View File

@ -451,7 +451,6 @@ export default {
this.selectedRows = [row];
},
selectAllRows () {
console.log('select all');
this.selectedRows = this.localResults.reduce((acc, curr) => {
acc.push(curr._id);
return acc;

View File

@ -244,7 +244,8 @@ module.exports = {
newTriggerFunction: 'New trigger function',
thereIsNoQueriesYet: 'There is no queries yet',
searchForQueries: 'Search for queries',
killProcess: 'Kill process'
killProcess: 'Kill process',
closeTab: 'Close tab'
},
faker: {
address: 'Address',