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
>
import
{
map
Actions
,
mapState
,
mapGetters
}
from
'vuex'
;
import
{
map
State
}
from
'vuex'
;
import
Icon
from
'~/vue_shared/components/icon.vue'
;
import
tooltip
from
'~/vue_shared/directives/tooltip'
;
...
...
@@ -21,15 +21,11 @@ export default {
},
},
computed
:
{
...
mapState
([
'lastCommitMsg'
,
'rightPanelCollapsed'
]),
...
mapGetters
([
'collapseButtonIcon'
,
'collapseButtonTooltip'
]),
...
mapState
([
'lastCommitMsg'
]),
statusSvg
()
{
return
this
.
lastCommitMsg
?
this
.
committedStateSvgPath
:
this
.
noChangesStateSvgPath
;
},
},
methods
:
{
...
mapActions
([
'toggleRightPanelCollapsed'
]),
},
};
</
script
>
...
...
@@ -37,31 +33,8 @@ export default {
<div
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
class=
"ide-commit-empty-state-container"
v-if=
"!rightPanelCollapsed"
>
<div
class=
"svg-content svg-80"
>
<img
:src=
"statusSvg"
/>
...
...
app/assets/javascripts/ide/components/commit_sidebar/list.vue
View file @
5588efed
<
script
>
import
{
mapActions
,
mapState
,
mapGetters
}
from
'vuex'
;
import
{
mapActions
}
from
'vuex'
;
import
{
__
,
sprintf
}
from
'~/locale'
;
import
Icon
from
'~/vue_shared/components/icon.vue'
;
import
tooltip
from
'~/vue_shared/directives/tooltip'
;
import
ListItem
from
'./list_item.vue'
;
import
ListCollapsed
from
'./list_collapsed.vue'
;
export
default
{
components
:
{
Icon
,
ListItem
,
ListCollapsed
,
},
directives
:
{
tooltip
,
...
...
@@ -24,11 +22,6 @@ export default {
type
:
Array
,
required
:
true
,
},
showToggle
:
{
type
:
Boolean
,
required
:
false
,
default
:
true
,
},
iconName
:
{
type
:
String
,
required
:
true
,
...
...
@@ -52,8 +45,6 @@ export default {
},
},
computed
:
{
...
mapState
([
'rightPanelCollapsed'
]),
...
mapGetters
([
'collapseButtonIcon'
,
'collapseButtonTooltip'
]),
titleText
()
{
return
sprintf
(
__
(
'%{title} changes'
),
{
title
:
this
.
title
,
...
...
@@ -61,7 +52,7 @@ export default {
},
},
methods
:
{
...
mapActions
([
'
toggleRightPanelCollapsed'
,
'
stageAllChanges'
,
'unstageAllChanges'
]),
...
mapActions
([
'stageAllChanges'
,
'unstageAllChanges'
]),
actionBtnClicked
()
{
this
[
this
.
action
]();
},
...
...
@@ -72,19 +63,12 @@ export default {
<
template
>
<div
class=
"ide-commit-list-container"
:class=
"
{
'is-collapsed': rightPanelCollapsed,
}"
>
<header
class=
"multi-file-commit-panel-header"
>
<div
v-if=
"!rightPanelCollapsed"
class=
"multi-file-commit-panel-header-title"
:class=
"
{
'append-right-10': showToggle,
}"
>
<icon
v-once
...
...
@@ -100,52 +84,28 @@ export default {
{{
actionBtnText
}}
</button>
</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>
<list-collapsed
v-if=
"rightPanelCollapsed"
:files=
"fileList"
:icon-name=
"iconName"
:title=
"title"
/>
<template
v-else
>
<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"
<ul
v-if=
"fileList.length"
class=
"multi-file-commit-list list-unstyled append-bottom-0"
>
<li
v-for=
"file in fileList"
:key=
"file.key"
>
{{
__
(
'No changes'
)
}}
</p>
</
template
>
<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'
)
}}
</p>
</div>
</
template
>
app/assets/javascripts/ide/components/repo_commit_section.vue
View file @
5588efed
...
...
@@ -76,7 +76,6 @@ export default {
action=
"unstageAllChanges"
:action-btn-text=
"__('Unstage all')"
item-action-component=
"unstage-button"
:show-toggle=
"false"
:staged-list=
"true"
/>
<form
...
...
app/assets/javascripts/ide/stores/getters.js
View file @
5588efed
import
{
ActivityBarViews
}
from
'./state'
;
import
{
__
}
from
'~/locale'
;
export
const
activeFile
=
state
=>
state
.
openFiles
.
find
(
file
=>
file
.
active
)
||
null
;
...
...
@@ -36,16 +35,8 @@ export const currentProject = state => state.projects[state.currentProjectId];
export
const
currentTree
=
state
=>
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
;
// 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
activityBarComponent
=
state
=>
{
...
...
app/assets/stylesheets/pages/repo.scss
View file @
5588efed
...
...
@@ -743,32 +743,11 @@
.ide-commit-list-container
{
display
:
flex
;
flex
:
1
;
flex-direction
:
column
;
width
:
100%
;
min-height
:
140px
;
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
{
...
...
spec/javascripts/ide/stores/actions_spec.js
View file @
5588efed
import
*
as
urlUtils
from
'~/lib/utils/url_utility'
;
import
*
as
actions
from
'~/ide/stores/actions'
;
import
store
from
'~/ide/stores'
;
import
*
as
actions
from
'~/ide/stores/actions'
;
import
*
as
types
from
'~/ide/stores/mutation_types'
;
import
router
from
'~/ide/ide_router'
;
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