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 {
...
@@ -43,6 +43,10 @@ export default {
required
:
false
,
required
:
false
,
default
:
false
,
default
:
false
,
},
},
activeFileKey
:
{
type
:
String
,
required
:
true
,
},
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -115,6 +119,7 @@ export default {
...
@@ -115,6 +119,7 @@ export default {
:action-component=
"itemActionComponent"
:action-component=
"itemActionComponent"
:key-prefix=
"title"
:key-prefix=
"title"
:staged-list=
"stagedList"
:staged-list=
"stagedList"
:active-file-key=
"activeFileKey"
/>
/>
</li>
</li>
</ul>
</ul>
...
...
app/assets/javascripts/ide/components/commit_sidebar/list_item.vue
View file @
6139050e
...
@@ -30,6 +30,10 @@ export default {
...
@@ -30,6 +30,10 @@ export default {
required
:
false
,
required
:
false
,
default
:
false
,
default
:
false
,
},
},
activeFileKey
:
{
type
:
String
,
required
:
true
,
},
},
},
computed
:
{
computed
:
{
iconName
()
{
iconName
()
{
...
@@ -39,6 +43,12 @@ export default {
...
@@ -39,6 +43,12 @@ export default {
iconClass
()
{
iconClass
()
{
return
`multi-file-
${
this
.
file
.
tempFile
?
'
addition
'
:
'
modified
'
}
append-right-8`
;
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
:
{
methods
:
{
...
mapActions
([
...
mapActions
([
...
@@ -70,7 +80,12 @@ export default {
...
@@ -70,7 +80,12 @@ export default {
</
script
>
</
script
>
<
template
>
<
template
>
<div
class=
"multi-file-commit-list-item"
>
<div
class=
"multi-file-commit-list-item"
:class=
"
{
'is-active': isActive
}"
>
<button
<button
type=
"button"
type=
"button"
class=
"multi-file-commit-list-path"
class=
"multi-file-commit-list-path"
...
...
app/assets/javascripts/ide/components/repo_commit_section.vue
View file @
6139050e
...
@@ -27,7 +27,7 @@ export default {
...
@@ -27,7 +27,7 @@ export default {
'
unusedSeal
'
,
'
unusedSeal
'
,
]),
]),
...
mapState
(
'
commit
'
,
[
'
commitMessage
'
,
'
submitCommitLoading
'
]),
...
mapState
(
'
commit
'
,
[
'
commitMessage
'
,
'
submitCommitLoading
'
]),
...
mapGetters
([
'
lastOpenedFile
'
,
'
hasChanges
'
,
'
someUncommitedChanges
'
]),
...
mapGetters
([
'
lastOpenedFile
'
,
'
hasChanges
'
,
'
someUncommitedChanges
'
,
'
activeFile
'
]),
...
mapGetters
(
'
commit
'
,
[
'
commitButtonDisabled
'
,
'
discardDraftButtonDisabled
'
]),
...
mapGetters
(
'
commit
'
,
[
'
commitButtonDisabled
'
,
'
discardDraftButtonDisabled
'
]),
showStageUnstageArea
()
{
showStageUnstageArea
()
{
return
!!
(
this
.
someUncommitedChanges
||
this
.
lastCommitMsg
||
!
this
.
unusedSeal
);
return
!!
(
this
.
someUncommitedChanges
||
this
.
lastCommitMsg
||
!
this
.
unusedSeal
);
...
@@ -44,6 +44,7 @@ export default {
...
@@ -44,6 +44,7 @@ export default {
if
(
this
.
lastOpenedFile
)
{
if
(
this
.
lastOpenedFile
)
{
this
.
openPendingTab
({
this
.
openPendingTab
({
file
:
this
.
lastOpenedFile
,
file
:
this
.
lastOpenedFile
,
keyPrefix
:
this
.
lastOpenedFile
.
changed
?
'
unstaged
'
:
'
staged
'
,
})
})
.
then
(
changeViewer
=>
{
.
then
(
changeViewer
=>
{
if
(
changeViewer
)
{
if
(
changeViewer
)
{
...
@@ -92,6 +93,7 @@ export default {
...
@@ -92,6 +93,7 @@ export default {
action=
"stageAllChanges"
action=
"stageAllChanges"
:action-btn-text=
"__('Stage all')"
:action-btn-text=
"__('Stage all')"
item-action-component=
"stage-button"
item-action-component=
"stage-button"
:active-file-key=
"activeFile.key"
/>
/>
<commit-files-list
<commit-files-list
icon-name=
"staged"
icon-name=
"staged"
...
@@ -101,6 +103,7 @@ export default {
...
@@ -101,6 +103,7 @@ export default {
:action-btn-text=
"__('Unstage all')"
:action-btn-text=
"__('Unstage all')"
item-action-component=
"unstage-button"
item-action-component=
"unstage-button"
:staged-list=
"true"
:staged-list=
"true"
:active-file-key=
"activeFile.key"
/>
/>
</
template
>
</
template
>
<empty-state
<empty-state
...
...
app/assets/stylesheets/pages/repo.scss
View file @
6139050e
...
@@ -612,6 +612,10 @@
...
@@ -612,6 +612,10 @@
}
}
}
}
.multi-file-commit-list-item.is-active
{
background-color
:
$white-normal
;
}
.multi-file-commit-list-path
{
.multi-file-commit-list-path
{
padding
:
0
;
padding
:
0
;
background
:
none
;
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