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
5588efed
Unverified
Commit
5588efed
authored
Apr 19, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaned up after merging master
parent
f43b7af7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
126 deletions
+27
-126
empty_state.vue
...javascripts/ide/components/commit_sidebar/empty_state.vue
+2
-29
list.vue
...assets/javascripts/ide/components/commit_sidebar/list.vue
+23
-63
repo_commit_section.vue
...assets/javascripts/ide/components/repo_commit_section.vue
+0
-1
getters.js
app/assets/javascripts/ide/stores/getters.js
+0
-9
repo.scss
app/assets/stylesheets/pages/repo.scss
+2
-23
actions_spec.js
spec/javascripts/ide/stores/actions_spec.js
+0
-1
No files found.
app/assets/javascripts/ide/components/commit_sidebar/empty_state.vue
View file @
5588efed
<
script
>
<
script
>
import
{
map
Actions
,
mapState
,
mapGetters
}
from
'vuex'
;
import
{
map
State
}
from
'vuex'
;
import
Icon
from
'~/vue_shared/components/icon.vue'
;
import
Icon
from
'~/vue_shared/components/icon.vue'
;
import
tooltip
from
'~/vue_shared/directives/tooltip'
;
import
tooltip
from
'~/vue_shared/directives/tooltip'
;
...
@@ -21,15 +21,11 @@ export default {
...
@@ -21,15 +21,11 @@ export default {
},
},
},
},
computed
:
{
computed
:
{
...
mapState
([
'lastCommitMsg'
,
'rightPanelCollapsed'
]),
...
mapState
([
'lastCommitMsg'
]),
...
mapGetters
([
'collapseButtonIcon'
,
'collapseButtonTooltip'
]),
statusSvg
()
{
statusSvg
()
{
return
this
.
lastCommitMsg
?
this
.
committedStateSvgPath
:
this
.
noChangesStateSvgPath
;
return
this
.
lastCommitMsg
?
this
.
committedStateSvgPath
:
this
.
noChangesStateSvgPath
;
},
},
},
},
methods
:
{
...
mapActions
([
'toggleRightPanelCollapsed'
]),
},
};
};
</
script
>
</
script
>
...
@@ -37,31 +33,8 @@ export default {
...
@@ -37,31 +33,8 @@ export default {
<div
<div
class=
"multi-file-commit-panel-section ide-commit-empty-state js-empty-state"
class=
"multi-file-commit-panel-section ide-commit-empty-state js-empty-state"
>
>
<header
class=
"multi-file-commit-panel-header"
:class=
"
{
'is-collapsed': rightPanelCollapsed,
}"
>
<button
v-tooltip
:title=
"collapseButtonTooltip"
data-container=
"body"
data-placement=
"left"
type=
"button"
class=
"btn btn-transparent multi-file-commit-panel-collapse-btn"
:aria-label=
"__('Toggle sidebar')"
@
click
.
stop=
"toggleRightPanelCollapsed"
>
<icon
:name=
"collapseButtonIcon"
:size=
"18"
/>
</button>
</header>
<div
<div
class=
"ide-commit-empty-state-container"
class=
"ide-commit-empty-state-container"
v-if=
"!rightPanelCollapsed"
>
>
<div
class=
"svg-content svg-80"
>
<div
class=
"svg-content svg-80"
>
<img
:src=
"statusSvg"
/>
<img
:src=
"statusSvg"
/>
...
...
app/assets/javascripts/ide/components/commit_sidebar/list.vue
View file @
5588efed
<
script
>
<
script
>
import
{
mapActions
,
mapState
,
mapGetters
}
from
'vuex'
;
import
{
mapActions
}
from
'vuex'
;
import
{
__
,
sprintf
}
from
'~/locale'
;
import
{
__
,
sprintf
}
from
'~/locale'
;
import
Icon
from
'~/vue_shared/components/icon.vue'
;
import
Icon
from
'~/vue_shared/components/icon.vue'
;
import
tooltip
from
'~/vue_shared/directives/tooltip'
;
import
tooltip
from
'~/vue_shared/directives/tooltip'
;
import
ListItem
from
'./list_item.vue'
;
import
ListItem
from
'./list_item.vue'
;
import
ListCollapsed
from
'./list_collapsed.vue'
;
export
default
{
export
default
{
components
:
{
components
:
{
Icon
,
Icon
,
ListItem
,
ListItem
,
ListCollapsed
,
},
},
directives
:
{
directives
:
{
tooltip
,
tooltip
,
...
@@ -24,11 +22,6 @@ export default {
...
@@ -24,11 +22,6 @@ export default {
type
:
Array
,
type
:
Array
,
required
:
true
,
required
:
true
,
},
},
showToggle
:
{
type
:
Boolean
,
required
:
false
,
default
:
true
,
},
iconName
:
{
iconName
:
{
type
:
String
,
type
:
String
,
required
:
true
,
required
:
true
,
...
@@ -52,8 +45,6 @@ export default {
...
@@ -52,8 +45,6 @@ export default {
},
},
},
},
computed
:
{
computed
:
{
...
mapState
([
'rightPanelCollapsed'
]),
...
mapGetters
([
'collapseButtonIcon'
,
'collapseButtonTooltip'
]),
titleText
()
{
titleText
()
{
return
sprintf
(
__
(
'%{title} changes'
),
{
return
sprintf
(
__
(
'%{title} changes'
),
{
title
:
this
.
title
,
title
:
this
.
title
,
...
@@ -61,7 +52,7 @@ export default {
...
@@ -61,7 +52,7 @@ export default {
},
},
},
},
methods
:
{
methods
:
{
...
mapActions
([
'
toggleRightPanelCollapsed'
,
'
stageAllChanges'
,
'unstageAllChanges'
]),
...
mapActions
([
'stageAllChanges'
,
'unstageAllChanges'
]),
actionBtnClicked
()
{
actionBtnClicked
()
{
this
[
this
.
action
]();
this
[
this
.
action
]();
},
},
...
@@ -72,19 +63,12 @@ export default {
...
@@ -72,19 +63,12 @@ export default {
<
template
>
<
template
>
<div
<div
class=
"ide-commit-list-container"
class=
"ide-commit-list-container"
:class=
"
{
'is-collapsed': rightPanelCollapsed,
}"
>
>
<header
<header
class=
"multi-file-commit-panel-header"
class=
"multi-file-commit-panel-header"
>
>
<div
<div
v-if=
"!rightPanelCollapsed"
class=
"multi-file-commit-panel-header-title"
class=
"multi-file-commit-panel-header-title"
:class=
"
{
'append-right-10': showToggle,
}"
>
>
<icon
<icon
v-once
v-once
...
@@ -100,52 +84,28 @@ export default {
...
@@ -100,52 +84,28 @@ export default {
{{
actionBtnText
}}
{{
actionBtnText
}}
</button>
</button>
</div>
</div>
<button
v-if=
"showToggle"
v-tooltip
:title=
"collapseButtonTooltip"
data-container=
"body"
data-placement=
"left"
type=
"button"
class=
"btn btn-transparent multi-file-commit-panel-collapse-btn"
:aria-label=
"__('Toggle sidebar')"
@
click
.
stop=
"toggleRightPanelCollapsed"
>
<icon
:name=
"collapseButtonIcon"
:size=
"18"
/>
</button>
</header>
</header>
<list-collapsed
<ul
v-if=
"rightPanelCollapsed"
v-if=
"fileList.length"
:files=
"fileList"
class=
"multi-file-commit-list list-unstyled append-bottom-0"
:icon-name=
"iconName"
>
:title=
"title"
<li
/>
v-for=
"file in fileList"
<template
v-else
>
:key=
"file.key"
<ul
v-if=
"fileList.length"
class=
"multi-file-commit-list list-unstyled append-bottom-0"
>
<li
v-for=
"file in fileList"
:key=
"file.key"
>
<list-item
:file=
"file"
:action-component=
"itemActionComponent"
:key-prefix=
"title"
:staged-list=
"stagedList"
/>
</li>
</ul>
<p
v-else
class=
"multi-file-commit-list help-block"
>
>
{{
__
(
'No changes'
)
}}
<list-item
</p>
:file=
"file"
</
template
>
:action-component=
"itemActionComponent"
:key-prefix=
"title"
:staged-list=
"stagedList"
/>
</li>
</ul>
<p
v-else
class=
"multi-file-commit-list help-block"
>
{{
__
(
'No changes'
)
}}
</p>
</div>
</div>
</
template
>
</
template
>
app/assets/javascripts/ide/components/repo_commit_section.vue
View file @
5588efed
...
@@ -76,7 +76,6 @@ export default {
...
@@ -76,7 +76,6 @@ export default {
action=
"unstageAllChanges"
action=
"unstageAllChanges"
:action-btn-text=
"__('Unstage all')"
:action-btn-text=
"__('Unstage all')"
item-action-component=
"unstage-button"
item-action-component=
"unstage-button"
:show-toggle=
"false"
:staged-list=
"true"
:staged-list=
"true"
/>
/>
<form
<form
...
...
app/assets/javascripts/ide/stores/getters.js
View file @
5588efed
import
{
ActivityBarViews
}
from
'./state'
;
import
{
ActivityBarViews
}
from
'./state'
;
import
{
__
}
from
'~/locale'
;
export
const
activeFile
=
state
=>
state
.
openFiles
.
find
(
file
=>
file
.
active
)
||
null
;
export
const
activeFile
=
state
=>
state
.
openFiles
.
find
(
file
=>
file
.
active
)
||
null
;
...
@@ -36,16 +35,8 @@ export const currentProject = state => state.projects[state.currentProjectId];
...
@@ -36,16 +35,8 @@ export const currentProject = state => state.projects[state.currentProjectId];
export
const
currentTree
=
state
=>
export
const
currentTree
=
state
=>
state
.
trees
[
`
${
state
.
currentProjectId
}
/
${
state
.
currentBranchId
}
`
];
state
.
trees
[
`
${
state
.
currentProjectId
}
/
${
state
.
currentBranchId
}
`
];
// eslint-disable-next-line no-confusing-arrow
export
const
collapseButtonIcon
=
state
=>
state
.
rightPanelCollapsed
?
'angle-double-left'
:
'angle-double-right'
;
export
const
hasChanges
=
state
=>
!!
state
.
changedFiles
.
length
||
!!
state
.
stagedFiles
.
length
;
export
const
hasChanges
=
state
=>
!!
state
.
changedFiles
.
length
||
!!
state
.
stagedFiles
.
length
;
// eslint-disable-next-line no-confusing-arrow
export
const
collapseButtonTooltip
=
state
=>
state
.
rightPanelCollapsed
?
__
(
'Expand sidebar'
)
:
__
(
'Collapse sidebar'
);
export
const
hasMergeRequest
=
state
=>
!!
state
.
currentMergeRequestId
;
export
const
hasMergeRequest
=
state
=>
!!
state
.
currentMergeRequestId
;
export
const
activityBarComponent
=
state
=>
{
export
const
activityBarComponent
=
state
=>
{
...
...
app/assets/stylesheets/pages/repo.scss
View file @
5588efed
...
@@ -743,32 +743,11 @@
...
@@ -743,32 +743,11 @@
.ide-commit-list-container
{
.ide-commit-list-container
{
display
:
flex
;
display
:
flex
;
flex
:
1
;
flex-direction
:
column
;
flex-direction
:
column
;
width
:
100%
;
width
:
100%
;
min-height
:
140px
;
padding
:
0
16px
;
padding
:
0
16px
;
&
:not
(
.is-collapsed
)
{
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
{
.ide-staged-action-btn
{
...
...
spec/javascripts/ide/stores/actions_spec.js
View file @
5588efed
import
*
as
urlUtils
from
'~/lib/utils/url_utility'
;
import
*
as
urlUtils
from
'~/lib/utils/url_utility'
;
import
*
as
actions
from
'~/ide/stores/actions'
;
import
*
as
actions
from
'~/ide/stores/actions'
;
import
store
from
'~/ide/stores'
;
import
store
from
'~/ide/stores'
;
import
*
as
actions
from
'~/ide/stores/actions'
;
import
*
as
types
from
'~/ide/stores/mutation_types'
;
import
*
as
types
from
'~/ide/stores/mutation_types'
;
import
router
from
'~/ide/ide_router'
;
import
router
from
'~/ide/ide_router'
;
import
{
resetStore
,
file
}
from
'../helpers'
;
import
{
resetStore
,
file
}
from
'../helpers'
;
...
...
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