Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
af507c79
Commit
af507c79
authored
Apr 25, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed eslint
parent
272b8f3f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
app/assets/javascripts/ide/components/ide.vue
app/assets/javascripts/ide/components/ide.vue
+13
-12
No files found.
app/assets/javascripts/ide/components/ide.vue
View file @
af507c79
<
script
>
import
Mousetrap
from
'
mousetrap
'
;
import
{
mapActions
,
mapState
,
mapGetters
}
from
'
vuex
'
;
import
IdeSidebar
from
'
./ide_side_bar.vue
'
;
import
RepoTabs
from
'
./repo_tabs.vue
'
;
...
...
@@ -32,18 +33,6 @@ export default {
]),
...
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
()
{
const
returnValue
=
'
Are you sure you want to lose unsaved changes?
'
;
window
.
onbeforeunload
=
e
=>
{
...
...
@@ -65,6 +54,18 @@ export default {
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
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment