mirror of
https://github.com/romancm/gamebrary
synced 2024-12-18 23:33:15 +00:00
clean up releases page
This commit is contained in:
parent
18b5cb6eaa
commit
c51f2d5cae
1 changed files with 23 additions and 53 deletions
|
@ -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">
|
|
||||||
<b-list-group>
|
|
||||||
<b-list-group-item
|
|
||||||
button
|
|
||||||
class="d-flex justify-content-center justify-content-md-between
|
|
||||||
align-items-center p-2"
|
|
||||||
v-for="release in releases"
|
v-for="release in releases"
|
||||||
:key="release.id"
|
:key="release.id"
|
||||||
:variant="nightMode ? 'dark' : null"
|
|
||||||
:active="selectedRelease && release.id === selectedRelease.id"
|
|
||||||
@click="selectedRelease = release"
|
|
||||||
>
|
|
||||||
<h6 class="m-0">
|
|
||||||
<b-badge>{{ release.tag_name }}</b-badge>
|
|
||||||
<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
|
|
||||||
:bg-variant="nightMode ? 'dark' : null"
|
:bg-variant="nightMode ? 'dark' : null"
|
||||||
:text-variant="nightMode ? 'white' : null"
|
:text-variant="nightMode ? 'white' : null"
|
||||||
v-if="selectedRelease"
|
v-if="selectedTag"
|
||||||
hide-footer
|
hide-footer
|
||||||
class="mb-3"
|
class="mb-3"
|
||||||
>
|
>
|
||||||
<template v-slot:header>
|
<template v-slot:header>
|
||||||
<h6 class="mb-0">
|
<h6 class="mb-0">
|
||||||
<b-badge>{{ selectedRelease.tag_name }}</b-badge>
|
<b-badge>{{ release.tag_name }}</b-badge>
|
||||||
{{ selectedRelease.name }}
|
{{ release.name }}
|
||||||
</h6>
|
</h6>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<b-card-text>
|
||||||
<small class="text-muted">
|
<small class="text-muted">
|
||||||
{{ $t('releases.published') }} {{ formatDate(selectedRelease.published_at) }}
|
{{ $t('releases.published') }} {{ formatDate(release.published_at) }}
|
||||||
</small>
|
</small>
|
||||||
|
|
||||||
<b-card-text>
|
<vue-markdown :source="release.body" class="w-100 releases" />
|
||||||
<vue-markdown :source="selectedRelease.body" class="w-100 releases" />
|
|
||||||
</b-card-text>
|
</b-card-text>
|
||||||
</b-card>
|
</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 });
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue