Added working minimum cup size slider.

This commit is contained in:
DebaucheryLibrarian
2021-03-02 02:30:44 +01:00
parent d6bebd8fec
commit 408066aba0
4 changed files with 16 additions and 5 deletions

View File

@@ -79,7 +79,8 @@
class="range"
type="range"
min="0"
max="10"
max="6"
@change="updateFilters"
>
<span
@@ -148,6 +149,7 @@ import Gender from './gender.vue';
import Pagination from '../pagination/pagination.vue';
const toggleValues = [true, undefined, false];
const cupSizes = ['A', 'B', 'C', 'D', 'E', 'F', 'G'];
function updateFilters() {
this.$router.push({
@@ -155,6 +157,7 @@ function updateFilters() {
params: this.$route.params,
query: {
naturalBoobs: toggleValues[this.naturalBoobs],
cup: [cupSizes[this.boobSize]],
},
});
}
@@ -172,6 +175,7 @@ async function fetchActors(scroll) {
pageNumber: Number(this.$route.params.pageNumber) || 1,
letter: this.letter.replace('all', ''),
gender: curatedGender === 'other' ? null : curatedGender,
cup: [...cupSizes.slice(this.boobSize)],
naturalBoobs: toggleValues[this.naturalBoobs] ?? null,
});
@@ -220,7 +224,7 @@ export default {
totalCount: 0,
limit: 50,
letters: ['all'].concat(Array.from({ length: 26 }, (value, index) => String.fromCharCode(index + 97).toUpperCase())),
boobSize: 0,
boobSize: cupSizes.indexOf(this.$route.query.cup || 'A'),
naturalBoobs: naturalBoobs > -1 ? naturalBoobs : 1,
};
},