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
Jérome Perrin
gitlab-ce
Commits
b61aa6f8
Commit
b61aa6f8
authored
Apr 05, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed staged/unstaged files not opening when another 1 is open
fixes eslint
parent
748cd767
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
+12
-9
app/assets/javascripts/ide/components/commit_sidebar/list.vue
...assets/javascripts/ide/components/commit_sidebar/list.vue
+2
-5
app/assets/javascripts/ide/components/commit_sidebar/list_item.vue
...s/javascripts/ide/components/commit_sidebar/list_item.vue
+6
-1
app/assets/javascripts/ide/stores/mutations/file.js
app/assets/javascripts/ide/stores/mutations/file.js
+4
-3
No files found.
app/assets/javascripts/ide/components/commit_sidebar/list.vue
View file @
b61aa6f8
...
...
@@ -50,11 +50,7 @@ export default {
...
mapGetters
([
'
collapseButtonIcon
'
,
'
collapseButtonTooltip
'
]),
},
methods
:
{
...
mapActions
([
'
toggleRightPanelCollapsed
'
,
'
stageAllChanges
'
,
'
unstageAllChanges
'
,
]),
...
mapActions
([
'
toggleRightPanelCollapsed
'
,
'
stageAllChanges
'
,
'
unstageAllChanges
'
]),
actionBtnClicked
()
{
this
[
this
.
action
]();
},
...
...
@@ -131,6 +127,7 @@ export default {
<list-item
:file=
"file"
:action-component=
"itemActionComponent"
:key-prefix=
"title"
/>
</li>
</ul>
...
...
app/assets/javascripts/ide/components/commit_sidebar/list_item.vue
View file @
b61aa6f8
...
...
@@ -19,6 +19,11 @@ export default {
type
:
String
,
required
:
true
,
},
keyPrefix
:
{
type
:
String
,
required
:
false
,
default
:
''
,
},
},
computed
:
{
iconName
()
{
...
...
@@ -39,7 +44,7 @@ export default {
openFileInEditor
()
{
return
this
.
openPendingTab
({
file
:
this
.
file
,
keyPrefix
:
this
.
file
.
staged
?
'
staged
'
:
'
unstaged
'
,
keyPrefix
:
this
.
keyPrefix
.
toLowerCase
()
,
}).
then
(
changeViewer
=>
{
if
(
changeViewer
)
{
this
.
updateViewer
(
'
diff
'
);
...
...
app/assets/javascripts/ide/stores/mutations/file.js
View file @
b61aa6f8
...
...
@@ -154,9 +154,10 @@ export default {
});
},
[
types
.
ADD_PENDING_TAB
](
state
,
{
file
,
keyPrefix
=
'
pending
'
})
{
const
pendingTab
=
state
.
openFiles
.
find
(
f
=>
f
.
path
===
file
.
path
&&
f
.
pending
);
const
key
=
`
${
keyPrefix
}
-
${
file
.
key
}
`
;
const
pendingTab
=
state
.
openFiles
.
find
(
f
=>
f
.
key
===
key
&&
f
.
pending
);
let
openFiles
=
state
.
openFiles
.
map
(
f
=>
Object
.
assign
(
f
,
{
active
:
f
.
path
===
file
.
path
,
opened
:
false
,
active
:
false
}),
Object
.
assign
(
f
,
{
active
:
f
.
key
===
key
,
opened
:
false
}),
);
if
(
!
pendingTab
)
{
...
...
@@ -172,7 +173,7 @@ export default {
active
:
true
,
pending
:
true
,
opened
:
true
,
key
:
`
${
keyPrefix
}
-
${
f
.
key
}
`
,
key
,
});
}
...
...
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