Commit eec8c1e6 authored by Laura Heimann's avatar Laura Heimann

fixed minimum items per page

parent 33793bfe
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
<SongRow> <SongRow>
<template v-slot:controls> <template v-slot:controls>
<div :class="'button ' + (hotSongsOffset == 0 ? 'button-disabled' : '')" v-on:click="hotPrevious()"><i class="mdi mdi-chevron-left"></i> {{ $t('songrow.navigation.previous' )}}</div> <div :class="'button ' + (hotSongsOffset == 0 ? 'button-disabled' : '')" v-on:click="hotPrevious()"><i class="mdi mdi-chevron-left"></i> {{ $t('songrow.navigation.previous' )}}</div>
<div :class="'button ' + (hotSongs.length < 11 ? 'button-disabled' : '')" v-on:click="hotNext()">{{ $t('songrow.navigation.next' )}} <i class="mdi mdi-chevron-right"></i></div> <div :class="'button ' + (hotSongs.length < 9 ? 'button-disabled' : '')" v-on:click="hotNext()">{{ $t('songrow.navigation.next' )}} <i class="mdi mdi-chevron-right"></i></div>
</template> </template>
<template v-slot:song-list> <template v-slot:song-list>
<SongItemPlaceholder <SongItemPlaceholder
v-if="isHotSongsLoading" v-if="isHotSongsLoading"
v-for="n in 12" v-for="n in 10"
v-bind:key="n" /> v-bind:key="n" />
<SongItem <SongItem
v-if="!isHotSongsLoading" v-if="!isHotSongsLoading"
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
}, },
methods: { methods: {
hotNext: function() { hotNext: function() {
if(this.$data.hotSongs.length > 11) { if(this.$data.hotSongs.length > 9) {
this.$data.hotSongsOffset++; this.$data.hotSongsOffset++;
this.updateHot(); this.updateHot();
} }
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
<SongRow> <SongRow>
<template v-slot:controls> <template v-slot:controls>
<div :class="'button ' + (newSongsOffset == 0 ? 'button-disabled' : '')" v-on:click="newPrevious()"><i class="mdi mdi-chevron-left"></i> {{ $t('songrow.navigation.previous' )}}</div> <div :class="'button ' + (newSongsOffset == 0 ? 'button-disabled' : '')" v-on:click="newPrevious()"><i class="mdi mdi-chevron-left"></i> {{ $t('songrow.navigation.previous' )}}</div>
<div :class="'button ' + (newSongs.length < 11 ? 'button-disabled' : '')" v-on:click="newNext()">{{ $t('songrow.navigation.next' )}} <i class="mdi mdi-chevron-right"></i></div> <div :class="'button ' + (newSongs.length < 9 ? 'button-disabled' : '')" v-on:click="newNext()">{{ $t('songrow.navigation.next' )}} <i class="mdi mdi-chevron-right"></i></div>
</template> </template>
<template v-slot:song-list> <template v-slot:song-list>
<SongItemPlaceholder <SongItemPlaceholder
v-if="isNewSongsLoading" v-if="isNewSongsLoading"
v-for="n in 12" v-for="n in 10"
v-bind:key="n" /> v-bind:key="n" />
<SongItem <SongItem
v-if="!isNewSongsLoading" v-if="!isNewSongsLoading"
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
}, },
methods: { methods: {
newNext: function() { newNext: function() {
if(this.$data.newSongs.length > 11) { if(this.$data.newSongs.length > 9) {
this.$data.newSongsOffset++; this.$data.newSongsOffset++;
this.updateNew(); this.updateNew();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment