customize page count

pull/142/head
Akhil Gupta 3 years ago
parent 6a02818d05
commit c9cfd46551

@ -14,7 +14,7 @@
</a> --> </a> -->
<h1 align="center" style="margin-bottom:0px">Podgrab</h1> <h1 align="center" style="margin-bottom:0px">Podgrab</h1>
<p align="center">Current Version - 2021.07.30</p> <p align="center">Current Version -2021.08.02</p>
<p align="center"> <p align="center">
A self-hosted podcast manager to download episodes as soon as they become live A self-hosted podcast manager to download episodes as soon as they become live

@ -253,6 +253,11 @@
<option :key="index" v-for="index in filter.totalPages" >${index}</option> <option :key="index" v-for="index in filter.totalPages" >${index}</option>
</select> </select>
<select name="count" id="countDdl" v-model="filter.count" >
<option :key="index" v-for="index in countOptions" >${index}</option>
</select>
<a <a
v-if="filter.nextPage" v-if="filter.nextPage"
class="button" class="button"
@ -291,8 +296,14 @@ var app = new Vue({
return this.filter.count; return this.filter.count;
} }
}, },
watch:{
watch:{
count(newValue,oldValue){
if(newValue===oldValue){
return;
}
this.getData();
},
page(newPage,oldPage){ page(newPage,oldPage){
if(newPage==oldPage){ if(newPage==oldPage){
return; return;
@ -310,9 +321,6 @@ var app = new Vue({
this.getData() this.getData()
}, },
count(current,old){
this.getData()
},
showFilters(current,old){ showFilters(current,old){
if(localStorage){ if(localStorage){
@ -355,6 +363,7 @@ var app = new Vue({
mounted(){ mounted(){
if(localStorage && localStorage.episodesFilter){ if(localStorage && localStorage.episodesFilter){
this.filter=JSON.parse(localStorage.episodesFilter); this.filter=JSON.parse(localStorage.episodesFilter);
} }
if(localStorage && localStorage.showFilters){ if(localStorage && localStorage.showFilters){
this.showFilters=JSON.parse(localStorage.showFilters); this.showFilters=JSON.parse(localStorage.showFilters);
@ -401,7 +410,7 @@ var app = new Vue({
this.selectedPlayedStatus=this.playedStatusOptions[i] this.selectedPlayedStatus=this.playedStatusOptions[i]
} }
} }
this.filter.page=1;
this.getData() this.getData()
@ -560,6 +569,7 @@ var app = new Vue({
selectedTags:[], selectedTags:[],
selectedDownloadStatus:"", selectedDownloadStatus:"",
selectedPlayedStatus:"", selectedPlayedStatus:"",
countOptions:[10,20,30,40,50,100],
showFilters:localStorage && localStorage.showFilters && JSON.parse(localStorage.showFilters), showFilters:localStorage && localStorage.showFilters && JSON.parse(localStorage.showFilters),
{{ $len := len .podcastItems}} {{ $len := len .podcastItems}}

@ -128,7 +128,7 @@
<table> <table>
<tr> <tr>
<td>Current Version</td> <td>Current Version</td>
<td> 2021.07.30</td> <td> 2021.08.02</td>
</tr> </tr>
<tr> <tr>
<td>Website</td> <td>Website</td>

Loading…
Cancel
Save