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
1
Merge Requests
1
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
nexedi
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
Hide 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 {
...
@@ -71,7 +71,7 @@ export default {
this
.
getRawFileData
(
this
.
file
)
this
.
getRawFileData
(
this
.
file
)
.
then
(()
=>
{
.
then
(()
=>
{
const
viewerPromise
=
this
.
delayViewerUpdated
const
viewerPromise
=
this
.
delayViewerUpdated
?
this
.
updateViewer
(
'
editor
'
)
?
this
.
updateViewer
(
this
.
file
.
pending
?
'
diff
'
:
'
editor
'
)
:
Promise
.
resolve
();
:
Promise
.
resolve
();
return
viewerPromise
;
return
viewerPromise
;
...
...
app/assets/javascripts/ide/components/repo_tab.vue
View file @
bfdeee1d
...
@@ -37,9 +37,15 @@ export default {
...
@@ -37,9 +37,15 @@ export default {
},
},
methods
:
{
methods
:
{
...
mapActions
([
'
closeFile
'
]),
...
mapActions
([
'
closeFile
'
,
'
updateDelayViewerUpdated
'
,
'
openPendingTab
'
]),
clickFile
(
tab
)
{
clickFile
(
tab
)
{
this
.
$router
.
push
(
`/project
${
tab
.
url
}
`
);
this
.
updateDelayViewerUpdated
(
true
);
if
(
tab
.
pending
)
{
this
.
openPendingTab
(
tab
);
}
else
{
this
.
$router
.
push
(
`/project
${
tab
.
url
}
`
);
}
},
},
mouseOverTab
()
{
mouseOverTab
()
{
if
(
this
.
tab
.
changed
)
{
if
(
this
.
tab
.
changed
)
{
...
...
app/assets/javascripts/ide/lib/common/model.js
View file @
bfdeee1d
...
@@ -80,7 +80,7 @@ export default class Model {
...
@@ -80,7 +80,7 @@ export default class Model {
eventHub
.
$off
(
`editor.update.model.dispose.
${
this
.
file
.
key
}
`
,
this
.
dispose
);
eventHub
.
$off
(
`editor.update.model.dispose.
${
this
.
file
.
key
}
`
,
this
.
dispose
);
eventHub
.
$off
(
eventHub
.
$off
(
`editor.update.model.content.
${
this
.
file
.
key
}
`
,
`editor.update.model.content.
${
this
.
file
.
path
}
`
,
this
.
updateContent
,
this
.
updateContent
,
);
);
}
}
...
...
app/assets/javascripts/ide/stores/mutations/file.js
View file @
bfdeee1d
...
@@ -92,6 +92,14 @@ export default {
...
@@ -92,6 +92,14 @@ export default {
[
types
.
ADD_PENDING_TAB
](
state
,
file
)
{
[
types
.
ADD_PENDING_TAB
](
state
,
file
)
{
const
pendingTab
=
state
.
pendingTabs
.
find
(
f
=>
f
.
path
===
file
.
path
);
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
)
{
if
(
pendingTab
)
{
Object
.
assign
(
state
,
{
Object
.
assign
(
state
,
{
pendingTabs
:
state
.
pendingTabs
.
map
(
tab
=>
({
pendingTabs
:
state
.
pendingTabs
.
map
(
tab
=>
({
...
@@ -107,11 +115,6 @@ export default {
...
@@ -107,11 +115,6 @@ export default {
pending
:
true
,
pending
:
true
,
key
:
`pending-
${
file
.
key
}
`
,
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