forked from DebaucheryLibrarian/traxxx
Improved cup size query.
This commit is contained in:
parent
0124561686
commit
2f401765b6
|
@ -79,6 +79,7 @@
|
||||||
:min="0"
|
:min="0"
|
||||||
:max="boobSizes.length - 1"
|
:max="boobSizes.length - 1"
|
||||||
:value="boobSize"
|
:value="boobSize"
|
||||||
|
:values="boobSizes"
|
||||||
:disabled="!boobSizeRequired"
|
:disabled="!boobSizeRequired"
|
||||||
@change="(sizeRange) => updateValue('boobSize', sizeRange)"
|
@change="(sizeRange) => updateValue('boobSize', sizeRange)"
|
||||||
>
|
>
|
||||||
|
@ -153,7 +154,7 @@ import Range from '../form/range.vue';
|
||||||
import Pagination from '../pagination/pagination.vue';
|
import Pagination from '../pagination/pagination.vue';
|
||||||
|
|
||||||
const toggleValues = [true, undefined, false];
|
const toggleValues = [true, undefined, false];
|
||||||
const boobSizes = ['A', 'B', 'C', 'D', 'E', 'F', 'G'];
|
const boobSizes = 'ABCDEFZ'.split('');
|
||||||
|
|
||||||
function updateFilters() {
|
function updateFilters() {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
|
@ -179,7 +180,7 @@ async function fetchActors(scroll) {
|
||||||
pageNumber: Number(this.$route.params.pageNumber) || 1,
|
pageNumber: Number(this.$route.params.pageNumber) || 1,
|
||||||
letter: this.letter.replace('all', ''),
|
letter: this.letter.replace('all', ''),
|
||||||
gender: curatedGender === 'other' ? null : curatedGender,
|
gender: curatedGender === 'other' ? null : curatedGender,
|
||||||
boobSize: this.boobSizeRequired && this.boobSizes.slice(this.boobSize[0], this.boobSize[1]),
|
boobSize: this.boobSizeRequired && this.boobSize,
|
||||||
naturalBoobs: toggleValues[this.naturalBoobs] ?? null,
|
naturalBoobs: toggleValues[this.naturalBoobs] ?? null,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -231,7 +232,7 @@ export default {
|
||||||
limit: 50,
|
limit: 50,
|
||||||
letters: ['all'].concat(Array.from({ length: 26 }, (value, index) => String.fromCharCode(index + 97).toUpperCase())),
|
letters: ['all'].concat(Array.from({ length: 26 }, (value, index) => String.fromCharCode(index + 97).toUpperCase())),
|
||||||
boobSizes,
|
boobSizes,
|
||||||
boobSize: this.$route.query.bs?.split(',') || [0, boobSizes.length - 1],
|
boobSize: this.$route.query.bs?.split(',') || ['A', 'Z'],
|
||||||
boobSizeRequired: this.$route.query.bs || false,
|
boobSizeRequired: this.$route.query.bs || false,
|
||||||
naturalBoobs: naturalBoobs > -1 ? naturalBoobs : 1,
|
naturalBoobs: naturalBoobs > -1 ? naturalBoobs : 1,
|
||||||
};
|
};
|
||||||
|
|
|
@ -64,6 +64,11 @@ function maxPercentage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function emit() {
|
function emit() {
|
||||||
|
if (this.values) {
|
||||||
|
this.$emit('change', [this.values[this.minValue], this.values[this.maxValue]]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.$emit('change', [this.minValue, this.maxValue]);
|
this.$emit('change', [this.minValue, this.maxValue]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,6 +93,10 @@ export default {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => [3, 7],
|
default: () => [3, 7],
|
||||||
},
|
},
|
||||||
|
values: {
|
||||||
|
type: Array,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
disabled: {
|
disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
|
@ -95,6 +104,13 @@ export default {
|
||||||
},
|
},
|
||||||
emits: ['change'],
|
emits: ['change'],
|
||||||
data() {
|
data() {
|
||||||
|
if (this.values) {
|
||||||
|
return {
|
||||||
|
valueA: this.values.indexOf(this.value[0]),
|
||||||
|
valueB: this.values.indexOf(this.value[1]),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
valueA: this.value[0],
|
valueA: this.value[0],
|
||||||
valueB: this.value[1],
|
valueB: this.value[1],
|
||||||
|
|
|
@ -273,7 +273,7 @@ function initActorActions(store, router) {
|
||||||
|| (gender === 'all' && ' ')
|
|| (gender === 'all' && ' ')
|
||||||
|| `gender: { equalTo: "${gender}" }`;
|
|| `gender: { equalTo: "${gender}" }`;
|
||||||
|
|
||||||
const cupFilter = boobSize ? `cup: { in: [${boobSize.map(size => `"${size}"`)}] }` : '';
|
const cupFilter = boobSize ? `cup: { greaterThanOrEqualTo: "${boobSize[0]}", lessThanOrEqualTo: "${boobSize[1]}" }` : '';
|
||||||
|
|
||||||
const { connection: { actors, totalCount } } = await graphql(`
|
const { connection: { actors, totalCount } } = await graphql(`
|
||||||
query Actors(
|
query Actors(
|
||||||
|
|
Loading…
Reference in New Issue