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
Show 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 {
...
@@ -29,8 +29,8 @@ export default {
},
},
computed
:
{
computed
:
{
changedIcon
()
{
changedIcon
()
{
const
pre
fix
=
this
.
file
.
staged
&&
!
this
.
showStagedIcon
?
'
-solid
'
:
''
;
const
suf
fix
=
this
.
file
.
staged
&&
!
this
.
showStagedIcon
?
'
-solid
'
:
''
;
return
this
.
file
.
tempFile
?
`file-addition
s
${
prefix
}
`
:
`file-modified
${
pre
fix
}
`
;
return
this
.
file
.
tempFile
?
`file-addition
${
suffix
}
`
:
`file-modified
${
suf
fix
}
`
;
},
},
stagedIcon
()
{
stagedIcon
()
{
return
`
${
this
.
changedIcon
}
-solid`
;
return
`
${
this
.
changedIcon
}
-solid`
;
...
...
app/assets/javascripts/ide/components/commit_sidebar/list.vue
View file @
8c5adf68
...
@@ -29,7 +29,7 @@ export default {
...
@@ -29,7 +29,7 @@ export default {
required
:
false
,
required
:
false
,
default
:
true
,
default
:
true
,
},
},
icon
:
{
icon
Name
:
{
type
:
String
,
type
:
String
,
required
:
true
,
required
:
true
,
},
},
...
@@ -78,9 +78,6 @@ export default {
...
@@ -78,9 +78,6 @@ export default {
>
>
<header
<header
class=
"multi-file-commit-panel-header"
class=
"multi-file-commit-panel-header"
:class=
"
{
'is-collapsed': rightPanelCollapsed,
}"
>
>
<div
<div
v-if=
"!rightPanelCollapsed"
v-if=
"!rightPanelCollapsed"
...
@@ -91,7 +88,7 @@ export default {
...
@@ -91,7 +88,7 @@ export default {
>
>
<icon
<icon
v-once
v-once
:name=
"icon"
:name=
"icon
Name
"
:size=
"18"
:size=
"18"
/>
/>
{{
titleText
}}
{{
titleText
}}
...
@@ -123,7 +120,7 @@ export default {
...
@@ -123,7 +120,7 @@ export default {
<list-collapsed
<list-collapsed
v-if=
"rightPanelCollapsed"
v-if=
"rightPanelCollapsed"
:files=
"fileList"
:files=
"fileList"
:icon
=
"icon
"
:icon
-name=
"iconName
"
:title=
"title"
:title=
"title"
/>
/>
<template
v-else
>
<template
v-else
>
...
...
app/assets/javascripts/ide/components/commit_sidebar/list_collapsed.vue
View file @
8c5adf68
<
script
>
<
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
tooltip
from
'
~/vue_shared/directives/tooltip
'
;
import
{
sprintf
,
n__
,
__
}
from
'
~/locale
'
;
import
{
sprintf
,
n__
,
__
}
from
'
~/locale
'
;
export
default
{
export
default
{
components
:
{
components
:
{
i
con
,
I
con
,
},
},
directives
:
{
directives
:
{
tooltip
,
tooltip
,
...
@@ -15,7 +15,7 @@ export default {
...
@@ -15,7 +15,7 @@ export default {
type
:
Array
,
type
:
Array
,
required
:
true
,
required
:
true
,
},
},
icon
:
{
icon
Name
:
{
type
:
String
,
type
:
String
,
required
:
true
,
required
:
true
,
},
},
...
@@ -52,7 +52,7 @@ export default {
...
@@ -52,7 +52,7 @@ export default {
return
sprintf
(
__
(
'
%{title} changes
'
),
{
title
:
this
.
title
});
return
sprintf
(
__
(
'
%{title} changes
'
),
{
title
:
this
.
title
});
},
},
additionIconName
()
{
additionIconName
()
{
return
this
.
title
.
toLowerCase
()
===
'
staged
'
?
'
file-addition
s-solid
'
:
'
file-additions
'
;
return
this
.
title
.
toLowerCase
()
===
'
staged
'
?
'
file-addition
-solid
'
:
'
file-addition
'
;
},
},
modifiedIconName
()
{
modifiedIconName
()
{
return
this
.
title
.
toLowerCase
()
===
'
staged
'
?
'
file-modified-solid
'
:
'
file-modified
'
;
return
this
.
title
.
toLowerCase
()
===
'
staged
'
?
'
file-modified-solid
'
:
'
file-modified
'
;
...
@@ -74,7 +74,7 @@ export default {
...
@@ -74,7 +74,7 @@ export default {
>
>
<icon
<icon
v-once
v-once
:name=
"icon"
:name=
"icon
Name
"
:size=
"18"
:size=
"18"
/>
/>
</div>
</div>
...
...
app/assets/javascripts/ide/components/commit_sidebar/list_item.vue
View file @
8c5adf68
...
@@ -33,7 +33,7 @@ export default {
...
@@ -33,7 +33,7 @@ export default {
computed
:
{
computed
:
{
iconName
()
{
iconName
()
{
const
prefix
=
this
.
stagedList
?
'
-solid
'
:
''
;
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
()
{
iconClass
()
{
return
`multi-file-
${
this
.
file
.
tempFile
?
'
additions
'
:
'
modified
'
}
append-right-8`
;
return
`multi-file-
${
this
.
file
.
tempFile
?
'
additions
'
:
'
modified
'
}
append-right-8`
;
...
...
app/assets/javascripts/ide/components/repo_commit_section.vue
View file @
8c5adf68
<
script
>
<
script
>
import
{
mapState
,
mapActions
,
mapGetters
}
from
'
vuex
'
;
import
{
mapState
,
mapActions
,
mapGetters
}
from
'
vuex
'
;
import
tooltip
from
'
~/vue_shared/directives/tooltip
'
;
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
DeprecatedModal
from
'
~/vue_shared/components/deprecated_modal.vue
'
;
import
LoadingButton
from
'
~/vue_shared/components/loading_button.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
EmptyState
from
'
./commit_sidebar/empty_state.vue
'
;
import
CommitMessageField
from
'
./commit_sidebar/message_field.vue
'
;
import
CommitMessageField
from
'
./commit_sidebar/message_field.vue
'
;
import
*
as
consts
from
'
../stores/modules/commit/constants
'
;
import
*
as
consts
from
'
../stores/modules/commit/constants
'
;
...
@@ -13,8 +13,8 @@ import Actions from './commit_sidebar/actions.vue';
...
@@ -13,8 +13,8 @@ import Actions from './commit_sidebar/actions.vue';
export
default
{
export
default
{
components
:
{
components
:
{
DeprecatedModal
,
DeprecatedModal
,
i
con
,
I
con
,
c
ommitFilesList
,
C
ommitFilesList
,
EmptyState
,
EmptyState
,
Actions
,
Actions
,
LoadingButton
,
LoadingButton
,
...
@@ -72,7 +72,7 @@ export default {
...
@@ -72,7 +72,7 @@ export default {
v-if=
"changedFiles.length || stagedFiles.length"
v-if=
"changedFiles.length || stagedFiles.length"
>
>
<commit-files-list
<commit-files-list
icon=
"unstaged"
icon
-name
=
"unstaged"
:title=
"__('Unstaged')"
:title=
"__('Unstaged')"
:file-list=
"changedFiles"
:file-list=
"changedFiles"
action=
"stageAllChanges"
action=
"stageAllChanges"
...
@@ -80,7 +80,7 @@ export default {
...
@@ -80,7 +80,7 @@ export default {
item-action-component=
"stage-button"
item-action-component=
"stage-button"
/>
/>
<commit-files-list
<commit-files-list
icon=
"staged"
icon
-name
=
"staged"
:title=
"__('Staged')"
:title=
"__('Staged')"
:file-list=
"stagedFiles"
:file-list=
"stagedFiles"
action=
"unstageAllChanges"
action=
"unstageAllChanges"
...
...
app/assets/stylesheets/pages/repo.scss
View file @
8c5adf68
...
@@ -540,22 +540,6 @@
...
@@ -540,22 +540,6 @@
margin-bottom
:
0
;
margin-bottom
:
0
;
border-bottom
:
1px
solid
$white-dark
;
border-bottom
:
1px
solid
$white-dark
;
padding
:
$gl-btn-padding
0
;
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
{
.multi-file-commit-panel-header-title
{
...
@@ -835,6 +819,24 @@
...
@@ -835,6 +819,24 @@
flex
:
1
;
flex
:
1
;
min-height
:
140px
;
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
{
.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', () => {
...
@@ -28,7 +28,7 @@ describe('IDE changed file icon', () => {
it
(
'
equals file-addition when a temp file
'
,
()
=>
{
it
(
'
equals file-addition when a temp file
'
,
()
=>
{
vm
.
file
.
tempFile
=
true
;
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', () => {
...
@@ -73,7 +73,7 @@ describe('Multi-file editor commit sidebar list item', () => {
it
(
'
returns addition when not a tempFile
'
,
()
=>
{
it
(
'
returns addition when not a tempFile
'
,
()
=>
{
f
.
tempFile
=
true
;
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