clean up releases page

This commit is contained in:
Gamebrary 2020-11-01 10:52:25 -07:00
parent 18b5cb6eaa
commit c51f2d5cae

View file

@ -10,53 +10,31 @@
class="position-sticky" class="position-sticky"
/> />
<b-container fluid> <b-container>
<b-form-row> <b-card
<b-col cols="2" md="3"> v-for="release in releases"
<b-list-group> :key="release.id"
<b-list-group-item :bg-variant="nightMode ? 'dark' : null"
button :text-variant="nightMode ? 'white' : null"
class="d-flex justify-content-center justify-content-md-between v-if="selectedTag"
align-items-center p-2" hide-footer
v-for="release in releases" class="mb-3"
:key="release.id" >
:variant="nightMode ? 'dark' : null" <template v-slot:header>
:active="selectedRelease && release.id === selectedRelease.id" <h6 class="mb-0">
@click="selectedRelease = release" <b-badge>{{ release.tag_name }}</b-badge>
> {{ release.name }}
<h6 class="m-0"> </h6>
<b-badge>{{ release.tag_name }}</b-badge> </template>
<span class="d-none d-md-inline">{{ release.name }}</span>
</h6>
</b-list-group-item>
</b-list-group>
</b-col>
<b-col cols="10" md="9"> <b-card-text>
<b-card <small class="text-muted">
:bg-variant="nightMode ? 'dark' : null" {{ $t('releases.published') }} {{ formatDate(release.published_at) }}
:text-variant="nightMode ? 'white' : null" </small>
v-if="selectedRelease"
hide-footer
class="mb-3"
>
<template v-slot:header>
<h6 class="mb-0">
<b-badge>{{ selectedRelease.tag_name }}</b-badge>
{{ selectedRelease.name }}
</h6>
</template>
<small class="text-muted"> <vue-markdown :source="release.body" class="w-100 releases" />
{{ $t('releases.published') }} {{ formatDate(selectedRelease.published_at) }} </b-card-text>
</small> </b-card>
<b-card-text>
<vue-markdown :source="selectedRelease.body" class="w-100 releases" />
</b-card-text>
</b-card>
</b-col>
</b-form-row>
</b-container> </b-container>
</div> </div>
</template> </template>
@ -70,12 +48,6 @@ export default {
VueMarkdown, VueMarkdown,
}, },
data() {
return {
selectedRelease: null,
};
},
computed: { computed: {
...mapState(['releases', 'notification', 'settings']), ...mapState(['releases', 'notification', 'settings']),
...mapGetters(['nightMode']), ...mapGetters(['nightMode']),
@ -84,8 +56,6 @@ export default {
mounted() { mounted() {
const [latestRelease] = this.releases; const [latestRelease] = this.releases;
this.selectedRelease = latestRelease;
if (this.notification && latestRelease && latestRelease.tag_name) { if (this.notification && latestRelease && latestRelease.tag_name) {
this.$store.commit('UPDATE_SETTING', { key: 'release', value: latestRelease.tag_name }); this.$store.commit('UPDATE_SETTING', { key: 'release', value: latestRelease.tag_name });