2018-05-09 12:01:36 +05:30
|
|
|
<script>
|
2018-10-15 14:42:47 +05:30
|
|
|
import { mapState, mapGetters } from 'vuex';
|
2020-11-24 15:15:51 +05:30
|
|
|
import { GlDeprecatedSkeletonLoading as GlSkeletonLoading } from '@gitlab/ui';
|
2018-10-15 14:42:47 +05:30
|
|
|
import IdeTree from './ide_tree.vue';
|
|
|
|
import ResizablePanel from './resizable_panel.vue';
|
|
|
|
import ActivityBar from './activity_bar.vue';
|
|
|
|
import CommitForm from './commit_sidebar/form.vue';
|
2018-11-18 11:00:15 +05:30
|
|
|
import IdeProjectHeader from './ide_project_header.vue';
|
2021-01-29 00:20:46 +05:30
|
|
|
import { SIDEBAR_INIT_WIDTH, leftSidebarViews } from '../constants';
|
2018-05-09 12:01:36 +05:30
|
|
|
|
2018-10-15 14:42:47 +05:30
|
|
|
export default {
|
|
|
|
components: {
|
2018-12-13 13:39:08 +05:30
|
|
|
GlSkeletonLoading,
|
2018-10-15 14:42:47 +05:30
|
|
|
ResizablePanel,
|
|
|
|
ActivityBar,
|
|
|
|
IdeTree,
|
2021-02-22 17:27:13 +05:30
|
|
|
[leftSidebarViews.review.name]: () =>
|
|
|
|
import(/* webpackChunkName: 'ide_runtime' */ './ide_review.vue'),
|
|
|
|
[leftSidebarViews.commit.name]: () =>
|
|
|
|
import(/* webpackChunkName: 'ide_runtime' */ './repo_commit_section.vue'),
|
2018-10-15 14:42:47 +05:30
|
|
|
CommitForm,
|
2018-11-18 11:00:15 +05:30
|
|
|
IdeProjectHeader,
|
2018-10-15 14:42:47 +05:30
|
|
|
},
|
|
|
|
computed: {
|
2018-12-13 13:39:08 +05:30
|
|
|
...mapState(['loading', 'currentActivityView', 'changedFiles', 'stagedFiles', 'lastCommitMsg']),
|
|
|
|
...mapGetters(['currentProject', 'someUncommittedChanges']),
|
2018-10-15 14:42:47 +05:30
|
|
|
},
|
2020-06-23 00:09:42 +05:30
|
|
|
SIDEBAR_INIT_WIDTH,
|
2018-10-15 14:42:47 +05:30
|
|
|
};
|
2018-05-09 12:01:36 +05:30
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2020-06-23 00:09:42 +05:30
|
|
|
<resizable-panel
|
|
|
|
:initial-width="$options.SIDEBAR_INIT_WIDTH"
|
|
|
|
side="left"
|
|
|
|
class="multi-file-commit-panel flex-column"
|
|
|
|
>
|
2018-11-18 11:00:15 +05:30
|
|
|
<template v-if="loading">
|
2021-01-03 14:25:43 +05:30
|
|
|
<div class="multi-file-commit-panel-inner" data-testid="ide-side-bar-inner">
|
2019-02-15 15:39:39 +05:30
|
|
|
<div v-for="n in 3" :key="n" class="multi-file-loading-container">
|
2018-12-13 13:39:08 +05:30
|
|
|
<gl-skeleton-loading />
|
2018-05-09 12:01:36 +05:30
|
|
|
</div>
|
2018-11-18 11:00:15 +05:30
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<template v-else>
|
2019-02-15 15:39:39 +05:30
|
|
|
<ide-project-header :project="currentProject" />
|
2018-11-18 11:00:15 +05:30
|
|
|
<div class="ide-context-body d-flex flex-fill">
|
|
|
|
<activity-bar />
|
2021-01-03 14:25:43 +05:30
|
|
|
<div class="multi-file-commit-panel-inner" data-testid="ide-side-bar-inner">
|
2018-11-18 11:00:15 +05:30
|
|
|
<div class="multi-file-commit-panel-inner-content">
|
2021-01-03 14:25:43 +05:30
|
|
|
<keep-alive>
|
2021-01-29 00:20:46 +05:30
|
|
|
<component :is="currentActivityView" @tree-ready="$emit('tree-ready')" />
|
2021-01-03 14:25:43 +05:30
|
|
|
</keep-alive>
|
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>
|