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
8c5adf68
Commit
8c5adf68
authored
Apr 18, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updates to variable names to make more sense
fixed up duplicate is-collapsed classes
parent
fb3e23b0
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
37 additions
and
38 deletions
+37
-38
app/assets/javascripts/ide/components/changed_file_icon.vue
app/assets/javascripts/ide/components/changed_file_icon.vue
+2
-2
app/assets/javascripts/ide/components/commit_sidebar/list.vue
...assets/javascripts/ide/components/commit_sidebar/list.vue
+3
-6
app/assets/javascripts/ide/components/commit_sidebar/list_collapsed.vue
...ascripts/ide/components/commit_sidebar/list_collapsed.vue
+5
-5
app/assets/javascripts/ide/components/commit_sidebar/list_item.vue
...s/javascripts/ide/components/commit_sidebar/list_item.vue
+1
-1
app/assets/javascripts/ide/components/repo_commit_section.vue
...assets/javascripts/ide/components/repo_commit_section.vue
+6
-6
app/assets/stylesheets/pages/repo.scss
app/assets/stylesheets/pages/repo.scss
+18
-16
spec/javascripts/ide/components/changed_file_icon_spec.js
spec/javascripts/ide/components/changed_file_icon_spec.js
+1
-1
spec/javascripts/ide/components/commit_sidebar/list_item_spec.js
...vascripts/ide/components/commit_sidebar/list_item_spec.js
+1
-1
No files found.
app/assets/javascripts/ide/components/changed_file_icon.vue
View file @
8c5adf68
...
...
@@ -29,8 +29,8 @@ export default {
},
computed
:
{
changedIcon
()
{
const
pre
fix
=
this
.
file
.
staged
&&
!
this
.
showStagedIcon
?
'
-solid
'
:
''
;
return
this
.
file
.
tempFile
?
`file-addition
s
${
prefix
}
`
:
`file-modified
${
pre
fix
}
`
;
const
suf
fix
=
this
.
file
.
staged
&&
!
this
.
showStagedIcon
?
'
-solid
'
:
''
;
return
this
.
file
.
tempFile
?
`file-addition
${
suffix
}
`
:
`file-modified
${
suf
fix
}
`
;
},
stagedIcon
()
{
return
`
${
this
.
changedIcon
}
-solid`
;
...
...
app/assets/javascripts/ide/components/commit_sidebar/list.vue
View file @
8c5adf68
...
...
@@ -29,7 +29,7 @@ export default {
required
:
false
,
default
:
true
,
},
icon
:
{
icon
Name
:
{
type
:
String
,
required
:
true
,
},
...
...
@@ -78,9 +78,6 @@ export default {
>
<header
class=
"multi-file-commit-panel-header"
:class=
"
{
'is-collapsed': rightPanelCollapsed,
}"
>
<div
v-if=
"!rightPanelCollapsed"
...
...
@@ -91,7 +88,7 @@ export default {
>
<icon
v-once
:name=
"icon"
:name=
"icon
Name
"
:size=
"18"
/>
{{
titleText
}}
...
...
@@ -123,7 +120,7 @@ export default {
<list-collapsed
v-if=
"rightPanelCollapsed"
:files=
"fileList"
:icon
=
"icon
"
:icon
-name=
"iconName
"
:title=
"title"
/>
<template
v-else
>
...
...
app/assets/javascripts/ide/components/commit_sidebar/list_collapsed.vue
View file @
8c5adf68
<
script
>
import
i
con
from
'
~/vue_shared/components/icon.vue
'
;
import
I
con
from
'
~/vue_shared/components/icon.vue
'
;
import
tooltip
from
'
~/vue_shared/directives/tooltip
'
;
import
{
sprintf
,
n__
,
__
}
from
'
~/locale
'
;
export
default
{
components
:
{
i
con
,
I
con
,
},
directives
:
{
tooltip
,
...
...
@@ -15,7 +15,7 @@ export default {
type
:
Array
,
required
:
true
,
},
icon
:
{
icon
Name
:
{
type
:
String
,
required
:
true
,
},
...
...
@@ -52,7 +52,7 @@ export default {
return
sprintf
(
__
(
'
%{title} changes
'
),
{
title
:
this
.
title
});
},
additionIconName
()
{
return
this
.
title
.
toLowerCase
()
===
'
staged
'
?
'
file-addition
s-solid
'
:
'
file-additions
'
;
return
this
.
title
.
toLowerCase
()
===
'
staged
'
?
'
file-addition
-solid
'
:
'
file-addition
'
;
},
modifiedIconName
()
{
return
this
.
title
.
toLowerCase
()
===
'
staged
'
?
'
file-modified-solid
'
:
'
file-modified
'
;
...
...
@@ -74,7 +74,7 @@ export default {
>
<icon
v-once
:name=
"icon"
:name=
"icon
Name
"
:size=
"18"
/>
</div>
...
...
app/assets/javascripts/ide/components/commit_sidebar/list_item.vue
View file @
8c5adf68
...
...
@@ -33,7 +33,7 @@ export default {
computed
:
{
iconName
()
{
const
prefix
=
this
.
stagedList
?
'
-solid
'
:
''
;
return
this
.
file
.
tempFile
?
`file-addition
s
${
prefix
}
`
:
`file-modified
${
prefix
}
`
;
return
this
.
file
.
tempFile
?
`file-addition
${
prefix
}
`
:
`file-modified
${
prefix
}
`
;
},
iconClass
()
{
return
`multi-file-
${
this
.
file
.
tempFile
?
'
additions
'
:
'
modified
'
}
append-right-8`
;
...
...
app/assets/javascripts/ide/components/repo_commit_section.vue
View file @
8c5adf68
<
script
>
import
{
mapState
,
mapActions
,
mapGetters
}
from
'
vuex
'
;
import
tooltip
from
'
~/vue_shared/directives/tooltip
'
;
import
i
con
from
'
~/vue_shared/components/icon.vue
'
;
import
I
con
from
'
~/vue_shared/components/icon.vue
'
;
import
DeprecatedModal
from
'
~/vue_shared/components/deprecated_modal.vue
'
;
import
LoadingButton
from
'
~/vue_shared/components/loading_button.vue
'
;
import
c
ommitFilesList
from
'
./commit_sidebar/list.vue
'
;
import
C
ommitFilesList
from
'
./commit_sidebar/list.vue
'
;
import
EmptyState
from
'
./commit_sidebar/empty_state.vue
'
;
import
CommitMessageField
from
'
./commit_sidebar/message_field.vue
'
;
import
*
as
consts
from
'
../stores/modules/commit/constants
'
;
...
...
@@ -13,8 +13,8 @@ import Actions from './commit_sidebar/actions.vue';
export
default
{
components
:
{
DeprecatedModal
,
i
con
,
c
ommitFilesList
,
I
con
,
C
ommitFilesList
,
EmptyState
,
Actions
,
LoadingButton
,
...
...
@@ -72,7 +72,7 @@ export default {
v-if=
"changedFiles.length || stagedFiles.length"
>
<commit-files-list
icon=
"unstaged"
icon
-name
=
"unstaged"
:title=
"__('Unstaged')"
:file-list=
"changedFiles"
action=
"stageAllChanges"
...
...
@@ -80,7 +80,7 @@ export default {
item-action-component=
"stage-button"
/>
<commit-files-list
icon=
"staged"
icon
-name
=
"staged"
:title=
"__('Staged')"
:file-list=
"stagedFiles"
action=
"unstageAllChanges"
...
...
app/assets/stylesheets/pages/repo.scss
View file @
8c5adf68
...
...
@@ -540,22 +540,6 @@
margin-bottom
:
0
;
border-bottom
:
1px
solid
$white-dark
;
padding
:
$gl-btn-padding
0
;
&
.is-collapsed
{
margin-left
:
-
$gl-padding
;
margin-right
:
-
$gl-padding
;
svg
{
margin-left
:
auto
;
margin-right
:
auto
;
}
.multi-file-commit-panel-collapse-btn
{
margin-right
:
auto
;
margin-left
:
auto
;
border-left
:
0
;
}
}
}
.multi-file-commit-panel-header-title
{
...
...
@@ -835,6 +819,24 @@
flex
:
1
;
min-height
:
140px
;
}
&
.is-collapsed
{
.multi-file-commit-panel-header
{
margin-left
:
-
$gl-padding
;
margin-right
:
-
$gl-padding
;
svg
{
margin-left
:
auto
;
margin-right
:
auto
;
}
.multi-file-commit-panel-collapse-btn
{
margin-right
:
auto
;
margin-left
:
auto
;
border-left
:
0
;
}
}
}
}
.ide-staged-action-btn
{
...
...
spec/javascripts/ide/components/changed_file_icon_spec.js
View file @
8c5adf68
...
...
@@ -28,7 +28,7 @@ describe('IDE changed file icon', () => {
it
(
'
equals file-addition when a temp file
'
,
()
=>
{
vm
.
file
.
tempFile
=
true
;
expect
(
vm
.
changedIcon
).
toBe
(
'
file-addition
s
'
);
expect
(
vm
.
changedIcon
).
toBe
(
'
file-addition
'
);
});
});
...
...
spec/javascripts/ide/components/commit_sidebar/list_item_spec.js
View file @
8c5adf68
...
...
@@ -73,7 +73,7 @@ describe('Multi-file editor commit sidebar list item', () => {
it
(
'
returns addition when not a tempFile
'
,
()
=>
{
f
.
tempFile
=
true
;
expect
(
vm
.
iconName
).
toBe
(
'
file-addition
s
'
);
expect
(
vm
.
iconName
).
toBe
(
'
file-addition
'
);
});
});
...
...
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