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
5711296b
Unverified
Commit
5711296b
authored
Apr 20, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove need for getter, allow state to set component
parent
913c6070
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
16 deletions
+5
-16
ide_side_bar.vue
app/assets/javascripts/ide/components/ide_side_bar.vue
+3
-3
getters.js
app/assets/javascripts/ide/stores/getters.js
+0
-11
state.js
app/assets/javascripts/ide/stores/state.js
+2
-2
No files found.
app/assets/javascripts/ide/components/ide_side_bar.vue
View file @
5711296b
...
...
@@ -23,8 +23,8 @@ export default {
IdeTree
,
},
computed
:
{
...
mapState
([
'loading'
,
'currentBranchId'
]),
...
mapGetters
([
'currentProject'
,
'activityBarComponent'
]),
...
mapState
([
'loading'
,
'currentBranchId'
,
'currentActivityView'
]),
...
mapGetters
([
'currentProject'
]),
},
};
</
script
>
...
...
@@ -88,7 +88,7 @@ export default {
</div>
<div
class=
"multi-file-commit-panel-inner-scroll"
>
<component
:is=
"
activityBarComponent
"
:is=
"
currentActivityView
"
/>
</div>
</
template
>
...
...
app/assets/javascripts/ide/stores/getters.js
View file @
5711296b
...
...
@@ -39,15 +39,4 @@ export const hasChanges = state => !!state.changedFiles.length || !!state.staged
export
const
hasMergeRequest
=
state
=>
!!
state
.
currentMergeRequestId
;
export
const
activityBarComponent
=
state
=>
{
switch
(
state
.
currentActivityView
)
{
case
ActivityBarViews
.
edit
:
return
'ide-tree'
;
case
ActivityBarViews
.
commit
:
return
'commit-section'
;
default
:
return
null
;
}
};
export
const
getStagedFile
=
state
=>
path
=>
state
.
stagedFiles
.
find
(
f
=>
f
.
path
===
path
);
app/assets/javascripts/ide/stores/state.js
View file @
5711296b
export
const
ActivityBarViews
=
{
edit
:
0
,
commit
:
1
,
edit
:
'ide-tree'
,
commit
:
'commit-section'
,
};
export
default
()
=>
({
...
...
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