BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
b61aa6f8
Unverified
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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
+12
-9
list.vue
...assets/javascripts/ide/components/commit_sidebar/list.vue
+2
-5
list_item.vue
...s/javascripts/ide/components/commit_sidebar/list_item.vue
+6
-1
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