ide_repo_tree.vue 756 Bytes
Newer Older
Phil Hughes's avatar
Phil Hughes committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
<script>
import SkeletonLoadingContainer from '~/vue_shared/components/skeleton_loading_container.vue';
import RepoFile from './repo_file.vue';

export default {
  components: {
    RepoFile,
    SkeletonLoadingContainer,
  },
  props: {
    tree: {
      type: Object,
      required: true,
    },
  },
};
</script>

<template>
  <div
    class="ide-file-list"
  >
    <template v-if="tree.loading">
      <div
        class="multi-file-loading-container"
        v-for="n in 3"
        :key="n"
      >
        <skeleton-loading-container />
      </div>
    </template>
    <template v-else>
      <repo-file
        v-for="file in tree.tree"
        :key="file.key"
        :file="file"
        :level="0"
      />
    </template>
  </div>
</template>