debian-mirror-gitlab/app/assets/javascripts/releases/components/app_show.vue

30 lines
674 B
Vue
Raw Normal View History

2020-04-08 14:13:33 +05:30
<script>
import { mapState, mapActions } from 'vuex';
import ReleaseBlock from './release_block.vue';
2021-01-03 14:25:43 +05:30
import ReleaseSkeletonLoader from './release_skeleton_loader.vue';
2020-04-08 14:13:33 +05:30
export default {
name: 'ReleaseShowApp',
components: {
ReleaseBlock,
2021-01-03 14:25:43 +05:30
ReleaseSkeletonLoader,
2020-04-08 14:13:33 +05:30
},
computed: {
...mapState('detail', ['isFetchingRelease', 'fetchError', 'release']),
},
created() {
this.fetchRelease();
},
methods: {
...mapActions('detail', ['fetchRelease']),
},
};
</script>
<template>
2020-07-28 23:09:34 +05:30
<div class="gl-mt-3">
2021-01-03 14:25:43 +05:30
<release-skeleton-loader v-if="isFetchingRelease" />
2020-04-08 14:13:33 +05:30
<release-block v-else-if="!fetchError" :release="release" />
</div>
</template>