Added channel filter.
This commit is contained in:
@@ -12,6 +12,7 @@ function initActorActions(store, router) {
|
||||
range = 'latest',
|
||||
}) {
|
||||
const { before, after, orderBy } = getDateRange(range);
|
||||
const includeChannels = router.currentRoute.query.channels ? router.currentRoute.query.channels.split(',') : [];
|
||||
const includeTags = router.currentRoute.query.tags ? router.currentRoute.query.tags.split(',') : [];
|
||||
const mode = router.currentRoute.query.mode || 'all';
|
||||
|
||||
@@ -26,6 +27,7 @@ function initActorActions(store, router) {
|
||||
$selectableTags: [String],
|
||||
$includeTags: [String!],
|
||||
$mode: String!,
|
||||
${includeChannels.length > 0 ? '$includeChannels: [String!]' : ''}
|
||||
) {
|
||||
actor(id: $actorId) {
|
||||
id
|
||||
@@ -146,12 +148,31 @@ function initActorActions(store, router) {
|
||||
slug
|
||||
priority
|
||||
}
|
||||
channels {
|
||||
id
|
||||
name
|
||||
slug
|
||||
type
|
||||
independent
|
||||
parent {
|
||||
id
|
||||
name
|
||||
slug
|
||||
type
|
||||
}
|
||||
}
|
||||
scenesConnection(
|
||||
filter: {
|
||||
date: {
|
||||
lessThan: $before,
|
||||
greaterThan: $after,
|
||||
}
|
||||
${includeChannels.length > 0 ? `
|
||||
entity: {
|
||||
slug: {
|
||||
in: $includeChannels
|
||||
}
|
||||
}` : ''}
|
||||
}
|
||||
selectedTags: $includeTags
|
||||
mode: $mode
|
||||
@@ -176,6 +197,7 @@ function initActorActions(store, router) {
|
||||
orderBy,
|
||||
excludeTags: store.state.ui.filter,
|
||||
includeTags,
|
||||
includeChannels,
|
||||
mode,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user