fixed eslint
This commit is contained in:
parent
272b8f3f72
commit
af507c7944
1 changed files with 13 additions and 12 deletions
|
@ -1,4 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
|
import Mousetrap from 'mousetrap';
|
||||||
import { mapActions, mapState, mapGetters } from 'vuex';
|
import { mapActions, mapState, mapGetters } from 'vuex';
|
||||||
import IdeSidebar from './ide_side_bar.vue';
|
import IdeSidebar from './ide_side_bar.vue';
|
||||||
import RepoTabs from './repo_tabs.vue';
|
import RepoTabs from './repo_tabs.vue';
|
||||||
|
@ -32,18 +33,6 @@ export default {
|
||||||
]),
|
]),
|
||||||
...mapGetters(['activeFile', 'hasChanges']),
|
...mapGetters(['activeFile', 'hasChanges']),
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
...mapActions(['toggleFileFinder']),
|
|
||||||
mousetrapStopCallback(e, el, combo) {
|
|
||||||
if (combo === 't' && el.classList.contains('dropdown-input-field')) {
|
|
||||||
return true;
|
|
||||||
} else if (combo === 'command+p' || combo === 'ctrl+p') {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return originalStopCallback(e, el, combo);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mounted() {
|
mounted() {
|
||||||
const returnValue = 'Are you sure you want to lose unsaved changes?';
|
const returnValue = 'Are you sure you want to lose unsaved changes?';
|
||||||
window.onbeforeunload = e => {
|
window.onbeforeunload = e => {
|
||||||
|
@ -65,6 +54,18 @@ export default {
|
||||||
|
|
||||||
Mousetrap.stopCallback = (e, el, combo) => this.mousetrapStopCallback(e, el, combo);
|
Mousetrap.stopCallback = (e, el, combo) => this.mousetrapStopCallback(e, el, combo);
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
...mapActions(['toggleFileFinder']),
|
||||||
|
mousetrapStopCallback(e, el, combo) {
|
||||||
|
if (combo === 't' && el.classList.contains('dropdown-input-field')) {
|
||||||
|
return true;
|
||||||
|
} else if (combo === 'command+p' || combo === 'ctrl+p') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return originalStopCallback(e, el, combo);
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue