2018-05-09 12:01:36 +05:30
|
|
|
<script>
|
2018-10-15 14:42:47 +05:30
|
|
|
import { mapState, mapGetters } from 'vuex';
|
|
|
|
import SkeletonLoadingContainer from '~/vue_shared/components/skeleton_loading_container.vue';
|
|
|
|
import IdeTree from './ide_tree.vue';
|
|
|
|
import ResizablePanel from './resizable_panel.vue';
|
|
|
|
import ActivityBar from './activity_bar.vue';
|
|
|
|
import CommitSection from './repo_commit_section.vue';
|
|
|
|
import CommitForm from './commit_sidebar/form.vue';
|
|
|
|
import IdeReview from './ide_review.vue';
|
|
|
|
import SuccessMessage from './commit_sidebar/success_message.vue';
|
2018-11-18 11:00:15 +05:30
|
|
|
import IdeProjectHeader from './ide_project_header.vue';
|
2018-10-15 14:42:47 +05:30
|
|
|
import { activityBarViews } from '../constants';
|
2018-05-09 12:01:36 +05:30
|
|
|
|
2018-10-15 14:42:47 +05:30
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
SkeletonLoadingContainer,
|
|
|
|
ResizablePanel,
|
|
|
|
ActivityBar,
|
|
|
|
CommitSection,
|
|
|
|
IdeTree,
|
|
|
|
CommitForm,
|
|
|
|
IdeReview,
|
|
|
|
SuccessMessage,
|
2018-11-18 11:00:15 +05:30
|
|
|
IdeProjectHeader,
|
2018-10-15 14:42:47 +05:30
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
...mapState([
|
|
|
|
'loading',
|
|
|
|
'currentActivityView',
|
|
|
|
'changedFiles',
|
|
|
|
'stagedFiles',
|
|
|
|
'lastCommitMsg',
|
|
|
|
]),
|
|
|
|
...mapGetters(['currentProject', 'someUncommitedChanges']),
|
|
|
|
showSuccessMessage() {
|
|
|
|
return (
|
|
|
|
this.currentActivityView === activityBarViews.edit &&
|
|
|
|
(this.lastCommitMsg && !this.someUncommitedChanges)
|
|
|
|
);
|
2018-05-09 12:01:36 +05:30
|
|
|
},
|
2018-10-15 14:42:47 +05:30
|
|
|
},
|
|
|
|
};
|
2018-05-09 12:01:36 +05:30
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<resizable-panel
|
|
|
|
:collapsible="false"
|
2018-10-15 14:42:47 +05:30
|
|
|
:initial-width="340"
|
2018-05-09 12:01:36 +05:30
|
|
|
side="left"
|
2018-11-18 11:00:15 +05:30
|
|
|
class="flex-column"
|
2018-05-09 12:01:36 +05:30
|
|
|
>
|
2018-11-18 11:00:15 +05:30
|
|
|
<template v-if="loading">
|
|
|
|
<div class="multi-file-commit-panel-inner">
|
2018-05-09 12:01:36 +05:30
|
|
|
<div
|
|
|
|
v-for="n in 3"
|
|
|
|
:key="n"
|
2018-11-08 19:23:39 +05:30
|
|
|
class="multi-file-loading-container"
|
2018-05-09 12:01:36 +05:30
|
|
|
>
|
|
|
|
<skeleton-loading-container />
|
|
|
|
</div>
|
2018-11-18 11:00:15 +05:30
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<template v-else>
|
|
|
|
<ide-project-header
|
|
|
|
:project="currentProject"
|
|
|
|
/>
|
|
|
|
<div class="ide-context-body d-flex flex-fill">
|
|
|
|
<activity-bar />
|
|
|
|
<div class="multi-file-commit-panel-inner">
|
|
|
|
<div class="multi-file-commit-panel-inner-content">
|
|
|
|
<component
|
|
|
|
:is="currentActivityView"
|
2018-10-15 14:42:47 +05:30
|
|
|
/>
|
2018-11-18 11:00:15 +05:30
|
|
|
</div>
|
|
|
|
<commit-form />
|
2018-10-15 14:42:47 +05:30
|
|
|
</div>
|
2018-11-18 11:00:15 +05:30
|
|
|
</div>
|
|
|
|
</template>
|
2018-05-09 12:01:36 +05:30
|
|
|
</resizable-panel>
|
|
|
|
</template>
|