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
6139050e
Commit
6139050e
authored
Jun 11, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add active class to active file in IDE commit panel
Closes #46051
parent
1c28b624
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
2 deletions
+29
-2
app/assets/javascripts/ide/components/commit_sidebar/list.vue
...assets/javascripts/ide/components/commit_sidebar/list.vue
+5
-0
app/assets/javascripts/ide/components/commit_sidebar/list_item.vue
...s/javascripts/ide/components/commit_sidebar/list_item.vue
+16
-1
app/assets/javascripts/ide/components/repo_commit_section.vue
...assets/javascripts/ide/components/repo_commit_section.vue
+4
-1
app/assets/stylesheets/pages/repo.scss
app/assets/stylesheets/pages/repo.scss
+4
-0
No files found.
app/assets/javascripts/ide/components/commit_sidebar/list.vue
View file @
6139050e
...
...
@@ -43,6 +43,10 @@ export default {
required
:
false
,
default
:
false
,
},
activeFileKey
:
{
type
:
String
,
required
:
true
,
},
},
data
()
{
return
{
...
...
@@ -115,6 +119,7 @@ export default {
:action-component=
"itemActionComponent"
:key-prefix=
"title"
:staged-list=
"stagedList"
:active-file-key=
"activeFileKey"
/>
</li>
</ul>
...
...
app/assets/javascripts/ide/components/commit_sidebar/list_item.vue
View file @
6139050e
...
...
@@ -30,6 +30,10 @@ export default {
required
:
false
,
default
:
false
,
},
activeFileKey
:
{
type
:
String
,
required
:
true
,
},
},
computed
:
{
iconName
()
{
...
...
@@ -39,6 +43,12 @@ export default {
iconClass
()
{
return
`multi-file-
${
this
.
file
.
tempFile
?
'
addition
'
:
'
modified
'
}
append-right-8`
;
},
fullKey
()
{
return
`
${
this
.
keyPrefix
.
toLowerCase
()}
-
${
this
.
file
.
key
}
`
;
},
isActive
()
{
return
this
.
activeFileKey
===
this
.
fullKey
;
},
},
methods
:
{
...
mapActions
([
...
...
@@ -70,7 +80,12 @@ export default {
</
script
>
<
template
>
<div
class=
"multi-file-commit-list-item"
>
<div
class=
"multi-file-commit-list-item"
:class=
"
{
'is-active': isActive
}"
>
<button
type=
"button"
class=
"multi-file-commit-list-path"
...
...
app/assets/javascripts/ide/components/repo_commit_section.vue
View file @
6139050e
...
...
@@ -27,7 +27,7 @@ export default {
'
unusedSeal
'
,
]),
...
mapState
(
'
commit
'
,
[
'
commitMessage
'
,
'
submitCommitLoading
'
]),
...
mapGetters
([
'
lastOpenedFile
'
,
'
hasChanges
'
,
'
someUncommitedChanges
'
]),
...
mapGetters
([
'
lastOpenedFile
'
,
'
hasChanges
'
,
'
someUncommitedChanges
'
,
'
activeFile
'
]),
...
mapGetters
(
'
commit
'
,
[
'
commitButtonDisabled
'
,
'
discardDraftButtonDisabled
'
]),
showStageUnstageArea
()
{
return
!!
(
this
.
someUncommitedChanges
||
this
.
lastCommitMsg
||
!
this
.
unusedSeal
);
...
...
@@ -44,6 +44,7 @@ export default {
if
(
this
.
lastOpenedFile
)
{
this
.
openPendingTab
({
file
:
this
.
lastOpenedFile
,
keyPrefix
:
this
.
lastOpenedFile
.
changed
?
'
unstaged
'
:
'
staged
'
,
})
.
then
(
changeViewer
=>
{
if
(
changeViewer
)
{
...
...
@@ -92,6 +93,7 @@ export default {
action=
"stageAllChanges"
:action-btn-text=
"__('Stage all')"
item-action-component=
"stage-button"
:active-file-key=
"activeFile.key"
/>
<commit-files-list
icon-name=
"staged"
...
...
@@ -101,6 +103,7 @@ export default {
:action-btn-text=
"__('Unstage all')"
item-action-component=
"unstage-button"
:staged-list=
"true"
:active-file-key=
"activeFile.key"
/>
</
template
>
<empty-state
...
...
app/assets/stylesheets/pages/repo.scss
View file @
6139050e
...
...
@@ -612,6 +612,10 @@
}
}
.multi-file-commit-list-item.is-active
{
background-color
:
$white-normal
;
}
.multi-file-commit-list-path
{
padding
:
0
;
background
:
none
;
...
...
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