Added dedicated scene function and pagination to tag page.
This commit is contained in:
@@ -85,6 +85,8 @@ export default {
|
||||
}
|
||||
|
||||
.content-inner {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
|
||||
@@ -112,6 +112,7 @@ export default {
|
||||
.pagination {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
overflow: hidden;
|
||||
height: 3rem;
|
||||
}
|
||||
|
||||
@@ -84,6 +84,7 @@ export default {
|
||||
}
|
||||
|
||||
.releases {
|
||||
flex-grow: 1;
|
||||
border-top: solid 1px var(--crease);
|
||||
|
||||
&.embedded {
|
||||
|
||||
@@ -30,7 +30,13 @@
|
||||
</Scroll>
|
||||
|
||||
<FilterBar :fetch-releases="fetchReleases" />
|
||||
<Releases :releases="tag.releases" />
|
||||
<Releases :releases="releases" />
|
||||
|
||||
<Pagination
|
||||
:items-total="totalCount"
|
||||
:items-per-page="limit"
|
||||
class="pagination-bottom"
|
||||
/>
|
||||
|
||||
<Footer />
|
||||
</div>
|
||||
@@ -46,16 +52,23 @@ import escapeHtml from '../../../src/utils/escape-html';
|
||||
import FilterBar from '../filters/filter-bar.vue';
|
||||
import Photos from './photos.vue';
|
||||
import Releases from '../releases/releases.vue';
|
||||
import Pagination from '../pagination/pagination.vue';
|
||||
import Scroll from '../scroll/scroll.vue';
|
||||
|
||||
const converter = new Converter();
|
||||
|
||||
async function fetchReleases() {
|
||||
this.tag = await this.$store.dispatch('fetchTagBySlug', {
|
||||
const { tag, releases, totalCount } = await this.$store.dispatch('fetchTagBySlug', {
|
||||
tagSlug: this.$route.params.tagSlug,
|
||||
pageNumber: Number(this.$route.params.pageNumber),
|
||||
limit: this.limit,
|
||||
range: this.$route.params.range,
|
||||
});
|
||||
|
||||
this.tag = tag;
|
||||
this.releases = releases;
|
||||
this.totalCount = totalCount;
|
||||
|
||||
this.hasMedia = this.tag.poster || this.tag.photos.length > 0;
|
||||
this.description = this.tag.description && converter.makeHtml(escapeHtml(this.tag.description));
|
||||
}
|
||||
@@ -74,6 +87,7 @@ export default {
|
||||
FilterBar,
|
||||
Releases,
|
||||
Photos,
|
||||
Pagination,
|
||||
Scroll,
|
||||
},
|
||||
data() {
|
||||
@@ -81,6 +95,8 @@ export default {
|
||||
tag: null,
|
||||
description: null,
|
||||
releases: null,
|
||||
totalCount: 0,
|
||||
limit: 15,
|
||||
pageTitle: null,
|
||||
hasMedia: false,
|
||||
expanded: false,
|
||||
|
||||
Reference in New Issue
Block a user