summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/ide/components/ide_review.vue
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-04-20 09:09:19 +0100
committerPhil Hughes <me@iamphill.com>2018-04-23 08:55:59 +0100
commit4924e4edb22ece1b5e246fca9f4ae686e6e0e8d3 (patch)
tree73817bf2826f9b3e4fa4b1e3d2abd87f1794fc3c /app/assets/javascripts/ide/components/ide_review.vue
parent34d5d1fa80770db015253a9d39393979fc838376 (diff)
downloadgitlab-ce-4924e4edb22ece1b5e246fca9f4ae686e6e0e8d3.tar.gz
Added review mode to new IDE sidebar
#44846
Diffstat (limited to 'app/assets/javascripts/ide/components/ide_review.vue')
-rw-r--r--app/assets/javascripts/ide/components/ide_review.vue64
1 files changed, 64 insertions, 0 deletions
diff --git a/app/assets/javascripts/ide/components/ide_review.vue b/app/assets/javascripts/ide/components/ide_review.vue
new file mode 100644
index 00000000000..4eb59cc3ca1
--- /dev/null
+++ b/app/assets/javascripts/ide/components/ide_review.vue
@@ -0,0 +1,64 @@
+<script>
+import { mapActions, mapGetters, mapState } from 'vuex';
+import Icon from '~/vue_shared/components/icon.vue';
+import SkeletonLoadingContainer from '~/vue_shared/components/skeleton_loading_container.vue';
+import RepoFile from './repo_file.vue';
+import NewDropdown from './new_dropdown/index.vue';
+
+export default {
+ components: {
+ Icon,
+ RepoFile,
+ SkeletonLoadingContainer,
+ NewDropdown,
+ },
+ computed: {
+ ...mapState(['currentBranchId']),
+ ...mapGetters(['currentProject', 'currentTree']),
+ },
+ mounted() {
+ this.updateViewer('diff');
+ },
+ methods: {
+ ...mapActions(['updateViewer']),
+ },
+};
+</script>
+
+<template>
+ <div
+ class="ide-file-list"
+ >
+ <template v-if="!currentTree || currentTree.loading">
+ <div
+ class="multi-file-loading-container"
+ v-for="n in 3"
+ :key="n"
+ >
+ <skeleton-loading-container />
+ </div>
+ </template>
+ <template v-else>
+ <header class="ide-tree-header ide-review-header">
+ {{ __('Review') }}
+ <div class="prepend-top-5 clgray">
+ {{ __('Lastest changed') }}
+ </div>
+ </header>
+ <repo-file
+ v-for="file in currentTree.tree"
+ :key="file.key"
+ :file="file"
+ :level="0"
+ :disable-action-dropdown="true"
+ />
+ </template>
+ </div>
+</template>
+
+<style>
+.ide-review-header {
+ flex-direction: column;
+ align-items: flex-start;
+}
+</style>