debian-mirror-gitlab/app/assets/javascripts/ide/components/ide_side_bar.vue

61 lines
1.8 KiB
Vue
Raw Normal View History

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';
2020-03-13 15:44:24 +05:30
import RepoCommitSection from './repo_commit_section.vue';
2018-10-15 14:42:47 +05:30
import CommitForm from './commit_sidebar/form.vue';
import IdeReview from './ide_review.vue';
2018-11-18 11:00:15 +05:30
import IdeProjectHeader from './ide_project_header.vue';
2021-01-03 14:25:43 +05:30
import { SIDEBAR_INIT_WIDTH } 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,
2020-03-13 15:44:24 +05:30
RepoCommitSection,
2018-10-15 14:42:47 +05:30
IdeTree,
CommitForm,
IdeReview,
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>
<component :is="currentActivityView" />
</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>