gamebrary/src/components/Settings/Releases.vue

49 lines
949 B
Vue
Raw Normal View History

2020-08-15 00:02:34 +00:00
<template lang="html">
2020-09-01 22:38:59 +00:00
<div class="releases">
<b-card
v-for="release in releases"
:key="release.id"
header-tag="header"
2020-08-15 00:02:34 +00:00
hide-footer
2020-09-01 22:38:59 +00:00
class="mb-3"
2020-08-15 00:02:34 +00:00
>
2020-09-01 22:38:59 +00:00
<template v-slot:header>
<h6 class="mb-0">
<b-badge>{{ release.tag_name }}</b-badge>
{{ release.name }}
</h6>
</template>
<small class="text-muted">
{{ $t('releases.published', { date: formatDate(release.published_at) }) }}
</small>
<b-card-text>
<vue-markdown :source="release.body" class="w-100" />
</b-card-text>
</b-card>
</div>
2020-08-15 00:02:34 +00:00
</template>
<script>
2020-09-01 22:38:59 +00:00
import { mapState } from 'vuex';
2020-08-15 00:02:34 +00:00
import VueMarkdown from 'vue-markdown';
import moment from 'moment';
export default {
components: {
VueMarkdown,
},
2020-09-01 22:38:59 +00:00
computed: {
...mapState(['releases']),
2020-08-15 00:02:34 +00:00
},
methods: {
formatDate(date) {
return moment(date).format('LL');
},
},
};
</script>