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
bfdeee1d
Commit
bfdeee1d
authored
Mar 23, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correctly toggle between tabs
parent
c5c7baec
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
9 deletions
+18
-9
app/assets/javascripts/ide/components/repo_editor.vue
app/assets/javascripts/ide/components/repo_editor.vue
+1
-1
app/assets/javascripts/ide/components/repo_tab.vue
app/assets/javascripts/ide/components/repo_tab.vue
+8
-2
app/assets/javascripts/ide/lib/common/model.js
app/assets/javascripts/ide/lib/common/model.js
+1
-1
app/assets/javascripts/ide/stores/mutations/file.js
app/assets/javascripts/ide/stores/mutations/file.js
+8
-5
No files found.
app/assets/javascripts/ide/components/repo_editor.vue
View file @
bfdeee1d
...
...
@@ -71,7 +71,7 @@ export default {
this
.
getRawFileData
(
this
.
file
)
.
then
(()
=>
{
const
viewerPromise
=
this
.
delayViewerUpdated
?
this
.
updateViewer
(
'
editor
'
)
?
this
.
updateViewer
(
this
.
file
.
pending
?
'
diff
'
:
'
editor
'
)
:
Promise
.
resolve
();
return
viewerPromise
;
...
...
app/assets/javascripts/ide/components/repo_tab.vue
View file @
bfdeee1d
...
...
@@ -37,9 +37,15 @@ export default {
},
methods
:
{
...
mapActions
([
'
closeFile
'
]),
...
mapActions
([
'
closeFile
'
,
'
updateDelayViewerUpdated
'
,
'
openPendingTab
'
]),
clickFile
(
tab
)
{
this
.
updateDelayViewerUpdated
(
true
);
if
(
tab
.
pending
)
{
this
.
openPendingTab
(
tab
);
}
else
{
this
.
$router
.
push
(
`/project
${
tab
.
url
}
`
);
}
},
mouseOverTab
()
{
if
(
this
.
tab
.
changed
)
{
...
...
app/assets/javascripts/ide/lib/common/model.js
View file @
bfdeee1d
...
...
@@ -80,7 +80,7 @@ export default class Model {
eventHub
.
$off
(
`editor.update.model.dispose.
${
this
.
file
.
key
}
`
,
this
.
dispose
);
eventHub
.
$off
(
`editor.update.model.content.
${
this
.
file
.
key
}
`
,
`editor.update.model.content.
${
this
.
file
.
path
}
`
,
this
.
updateContent
,
);
}
...
...
app/assets/javascripts/ide/stores/mutations/file.js
View file @
bfdeee1d
...
...
@@ -92,6 +92,14 @@ export default {
[
types
.
ADD_PENDING_TAB
](
state
,
file
)
{
const
pendingTab
=
state
.
pendingTabs
.
find
(
f
=>
f
.
path
===
file
.
path
);
Object
.
assign
(
state
,
{
openFiles
:
state
.
openFiles
.
map
(
f
=>
Object
.
assign
(
f
,
{
active
:
false
,
}),
),
});
if
(
pendingTab
)
{
Object
.
assign
(
state
,
{
pendingTabs
:
state
.
pendingTabs
.
map
(
tab
=>
({
...
...
@@ -107,11 +115,6 @@ export default {
pending
:
true
,
key
:
`pending-
${
file
.
key
}
`
,
}),
openFiles
:
state
.
openFiles
.
map
(
f
=>
Object
.
assign
(
f
,
{
active
:
false
,
}),
),
});
}
},
...
...
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