Added basic filter for actor boob size.

This commit is contained in:
DebaucheryLibrarian 2021-03-01 02:41:53 +01:00
parent 357b0287b2
commit c2ec4c15e3
5 changed files with 29 additions and 25 deletions

View File

@ -123,12 +123,6 @@
</ul> </ul>
</nav> </nav>
<Pagination
ref="pagination"
:items-total="totalCount"
:items-per-page="limit"
/>
<div class="tiles"> <div class="tiles">
<Actor <Actor
v-for="actor in actors" v-for="actor in actors"
@ -383,9 +377,7 @@ export default {
} }
.filter-section { .filter-section {
&:not(:last-child) {
margin: 0 0 .5rem 0; margin: 0 0 .5rem 0;
}
} }
.filter-label { .filter-label {
@ -412,20 +404,28 @@ export default {
color: var(--enabled); color: var(--enabled);
} }
.range-toggle::-webkit-slider-thumb { .range-toggle {
background: radial-gradient(circle, var(--shadow-hint) .75rem, var(--enabled-background) calc(.75rem + 1px));
&::-webkit-slider-thumb {
background: var(--enabled); background: var(--enabled);
} }
} }
}
&.off { &.off {
.range-label.off { .range-label.off {
color: var(--disabled); color: var(--disabled);
} }
.range-toggle::-webkit-slider-thumb { .range-toggle {
background: radial-gradient(circle, var(--shadow-hint) .75rem, var(--disabled-background) calc(.75rem + 1px));
&::-webkit-slider-thumb {
background: var(--disabled); background: var(--disabled);
} }
} }
}
.icon { .icon {
fill: var(--shadow); fill: var(--shadow);
@ -465,26 +465,27 @@ export default {
.range, .range,
.range-toggle { .range-toggle {
flex-grow: 1; flex-grow: 1;
height: 1rem; height: 1.5rem;
appearance: none; appearance: none;
border-radius: .5rem; padding: 2px;
border-radius: .75rem;
background: var(--shadow-hint); background: var(--shadow-hint);
cursor: pointer; cursor: pointer;
&::-webkit-slider-thumb { &::-webkit-slider-thumb {
appearance: none; appearance: none;
background: var(--primary); background: var(--primary);
width: 1rem; width: 1.5rem;
height: 1rem; height: 1.5rem;
border-radius: .5rem; border-radius: .75rem;
} }
} }
.range-toggle { .range-toggle {
background: radial-gradient(circle at center, var(--shadow-weak) 0, var(--shadow-weak) .5rem, var(--shadow-hint) .5rem); background: radial-gradient(circle, var(--shadow-hint) .75rem, var(--shadow-hint) calc(.75rem + 1px));
&::-webkit-slider-thumb { &::-webkit-slider-thumb {
background: #aaa; background: var(--shadow-hint);
} }
} }

View File

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

View File

@ -39,7 +39,9 @@ $breakpoint4: 1500px;
--success: #5c2; --success: #5c2;
--enabled: #5c2; --enabled: #5c2;
--enabled-background: rgba(0, 255, 0, .1);
--disabled: #c20; --disabled: #c20;
--disabled-background: rgba(255, 0, 0, .1);
} }
.light { .light {

View File

@ -272,15 +272,12 @@ function initActorActions(store, router) {
|| (gender === 'all' && ' ') || (gender === 'all' && ' ')
|| `gender: { equalTo: "${gender}" }`; || `gender: { equalTo: "${gender}" }`;
const naturalBoobsFilter = (naturalBoobs && 'naturalBoobs: { equalTo: true }')
|| (naturalBoobs === false && 'naturalBoobs: { equalTo: false }')
|| '';
const { connection: { actors, totalCount } } = await graphql(` const { connection: { actors, totalCount } } = await graphql(`
query Actors( query Actors(
$limit: Int, $limit: Int,
$offset: Int = 0, $offset: Int = 0,
$letter: String! = "", $letter: String! = "",
$naturalBoobs: Boolean,
) { ) {
connection: actorsConnection( connection: actorsConnection(
first: $limit, first: $limit,
@ -292,9 +289,11 @@ function initActorActions(store, router) {
} }
name: { name: {
startsWith: $letter startsWith: $letter
}
naturalBoobs: {
equalTo: $naturalBoobs
} }
${genderFilter} ${genderFilter}
${naturalBoobsFilter}
} }
) { ) {
totalCount totalCount

View File

@ -26,6 +26,7 @@ module.exports = postgraphile(
graphileBuildOptions: { graphileBuildOptions: {
pgOmitListSuffix: true, pgOmitListSuffix: true,
connectionFilterRelations: true, connectionFilterRelations: true,
connectionFilterAllowNullInput: true,
}, },
appendPlugins: [ appendPlugins: [
PgSimplifyInflectorPlugin, PgSimplifyInflectorPlugin,