Commit 3c9439ac authored by Phil Hughes's avatar Phil Hughes

made path prop in dropdown optional

added computed prop for showing loading indicator
parent 06eb127b
......@@ -26,7 +26,6 @@ export default {
<new-dropdown
:project-id="currentProject.name_with_namespace"
:branch="currentBranchId"
path=""
/>
</template>
</ide-tree-list>
......
......@@ -31,6 +31,9 @@ export default {
computed: {
...mapState(['currentBranchId']),
...mapGetters(['currentProject', 'currentTree']),
showLoading() {
return !this.currentTree || this.currentTree.loading;
},
},
mounted() {
this.updateViewer(this.viewerType);
......@@ -45,7 +48,7 @@ export default {
<div
class="ide-file-list"
>
<template v-if="!currentTree || currentTree.loading">
<template v-if="showLoading">
<div
class="multi-file-loading-container"
v-for="n in 3"
......
......@@ -17,7 +17,8 @@ export default {
},
path: {
type: String,
required: true,
required: false,
default: '',
},
},
data() {
......
......@@ -24,7 +24,7 @@ export default {
...mapGetters([
'currentMergeRequest',
'getStagedFile',
'isReviewModeActive',
'isEditModeActive',
'isCommitModeActive',
]),
shouldHideEditor() {
......@@ -191,8 +191,7 @@ export default {
<div class="ide-mode-tabs clearfix" >
<ul
class="nav-links pull-left"
v-if="!shouldHideEditor"
v-show="!isReviewModeActive && !isCommitModeActive"
v-if="!shouldHideEditor && isEditModeActive"
>
<li :class="editTabCSS">
<a
......
......@@ -54,7 +54,7 @@ export const allBlobs = state =>
export const getStagedFile = state => path => state.stagedFiles.find(f => f.path === path);
export const isReviewModeActive = state => state.currentActivityView === activityBarViews.review;
export const isEditModeActive = state => state.currentActivityView === activityBarViews.edit;
export const isCommitModeActive = state => state.currentActivityView === activityBarViews.commit;
// prevent babel-plugin-rewire from generating an invalid default during karma tests
......
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