Moved tag filter modes to postgres function.
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
<select
|
||||
v-model="mode"
|
||||
class="mode"
|
||||
@change="$router.push({ query: { ...$route.query, mode } })"
|
||||
@change="$router.push({ query: { ...$route.query, mode }, params: { pageNumber: 1 } })"
|
||||
>
|
||||
<option
|
||||
value="all"
|
||||
@@ -37,7 +37,7 @@
|
||||
class="tag"
|
||||
:class="{ selected: selectedTags.includes(tag.slug) }"
|
||||
>
|
||||
<router-link :to="{ query: { ...getNewRange(tag.slug), mode } }">
|
||||
<router-link :to="{ query: { ...getNewRange(tag.slug), mode }, params: { pageNumber: 1 } }">
|
||||
<Icon
|
||||
icon="checkmark"
|
||||
class="include"
|
||||
@@ -88,7 +88,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
mode: 'all',
|
||||
mode: this.$route.query.mode || 'all',
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
||||
@@ -25,6 +25,7 @@ function initActorActions(store, router) {
|
||||
$orderBy:[ReleasesOrderBy!]
|
||||
$selectableTags: [String],
|
||||
$includeTags: [String!],
|
||||
$mode: String!,
|
||||
) {
|
||||
actor(id: $actorId) {
|
||||
id
|
||||
@@ -151,19 +152,9 @@ function initActorActions(store, router) {
|
||||
lessThan: $before,
|
||||
greaterThan: $after,
|
||||
}
|
||||
${mode === 'any' ? `
|
||||
releasesTagsConnection: {
|
||||
some: {
|
||||
tag: {
|
||||
slug: {
|
||||
in: $includeTags
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
` : ''}
|
||||
}
|
||||
${mode === 'all' ? 'selectedTags: $includeTags' : ''}
|
||||
selectedTags: $includeTags
|
||||
mode: $mode
|
||||
first: $limit
|
||||
offset: $offset
|
||||
orderBy: $orderBy
|
||||
@@ -185,6 +176,7 @@ function initActorActions(store, router) {
|
||||
orderBy,
|
||||
excludeTags: store.state.ui.filter,
|
||||
includeTags,
|
||||
mode,
|
||||
});
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user