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,
};
},

View File

@ -174,9 +174,9 @@ export default {
box-sizing: border-box;
padding: .5rem;
color: var(--text-light);
background: var(--shadow);
background: var(--darken);
font-size: .9rem;
text-shadow: 0 0 3px var(--shadow);
text-shadow: 0 0 3px var(--darken);
white-space: normal;
line-height: 1.25;
transform: translateY(100%);

View File

@ -3,7 +3,6 @@
<div
ref="trigger"
class="trigger noselect"
@mouseenter="toggle"
@click.stop="toggle"
>
<slot />

View File

@ -267,16 +267,20 @@ function initActorActions(store, router) {
letter,
gender,
naturalBoobs,
cup,
}) {
const genderFilter = (gender === null && 'gender: { isNull: true }')
|| (gender === 'all' && ' ')
|| `gender: { equalTo: "${gender}" }`;
console.log(cup);
const { connection: { actors, totalCount } } = await graphql(`
query Actors(
$limit: Int,
$offset: Int = 0,
$letter: String! = "",
$cup: [String!]
$naturalBoobs: Boolean,
) {
connection: actorsConnection(
@ -293,6 +297,9 @@ function initActorActions(store, router) {
naturalBoobs: {
equalTo: $naturalBoobs
}
cup: {
in: $cup
}
${genderFilter}
}
) {
@ -347,6 +354,7 @@ function initActorActions(store, router) {
offset: Math.max(0, (pageNumber - 1)) * limit,
limit,
letter,
cup,
naturalBoobs,
});