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