Commit 5711296b authored by Phil Hughes's avatar Phil Hughes

remove need for getter, allow state to set component

parent 913c6070
...@@ -23,8 +23,8 @@ export default { ...@@ -23,8 +23,8 @@ export default {
IdeTree, IdeTree,
}, },
computed: { computed: {
...mapState(['loading', 'currentBranchId']), ...mapState(['loading', 'currentBranchId', 'currentActivityView']),
...mapGetters(['currentProject', 'activityBarComponent']), ...mapGetters(['currentProject']),
}, },
}; };
</script> </script>
...@@ -88,7 +88,7 @@ export default { ...@@ -88,7 +88,7 @@ export default {
</div> </div>
<div class="multi-file-commit-panel-inner-scroll"> <div class="multi-file-commit-panel-inner-scroll">
<component <component
:is="activityBarComponent" :is="currentActivityView"
/> />
</div> </div>
</template> </template>
......
...@@ -39,15 +39,4 @@ export const hasChanges = state => !!state.changedFiles.length || !!state.staged ...@@ -39,15 +39,4 @@ export const hasChanges = state => !!state.changedFiles.length || !!state.staged
export const hasMergeRequest = state => !!state.currentMergeRequestId; 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); export const getStagedFile = state => path => state.stagedFiles.find(f => f.path === path);
export const ActivityBarViews = { export const ActivityBarViews = {
edit: 0, edit: 'ide-tree',
commit: 1, commit: 'commit-section',
}; };
export default () => ({ export default () => ({
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment