BigW Consortium Gitlab

remove need for getter, allow state to set component

parent 913c6070
......@@ -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>
......
......@@ -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);
export const ActivityBarViews = {
edit: 0,
commit: 1,
edit: 'ide-tree',
commit: 'commit-section',
};
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