forked from DebaucheryLibrarian/traxxx
Applying tag filters to URL.
This commit is contained in:
parent
86377fec5f
commit
88a88227c4
|
@ -288,8 +288,19 @@
|
||||||
:actor="actor"
|
:actor="actor"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<FilterBar :fetch-releases="fetchActor" />
|
<FilterBar
|
||||||
<Releases :releases="actor.releases" />
|
:fetch-releases="fetchActor"
|
||||||
|
:items-total="totalCount"
|
||||||
|
:items-per-page="limit"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Releases :releases="releases" />
|
||||||
|
|
||||||
|
<Pagination
|
||||||
|
:items-total="totalCount"
|
||||||
|
:items-per-page="limit"
|
||||||
|
class="pagination-top"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -297,16 +308,23 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Photos from './photos.vue';
|
import Photos from './photos.vue';
|
||||||
|
import Pagination from '../pagination/pagination.vue';
|
||||||
import FilterBar from '../header/filter-bar.vue';
|
import FilterBar from '../header/filter-bar.vue';
|
||||||
import Releases from '../releases/releases.vue';
|
import Releases from '../releases/releases.vue';
|
||||||
import Gender from './gender.vue';
|
import Gender from './gender.vue';
|
||||||
import Social from './social.vue';
|
import Social from './social.vue';
|
||||||
|
|
||||||
async function fetchActor() {
|
async function fetchActor() {
|
||||||
this.actor = await this.$store.dispatch('fetchActorById', {
|
const { actor, releases, totalCount } = await this.$store.dispatch('fetchActorById', {
|
||||||
actorId: Number(this.$route.params.actorId),
|
actorId: Number(this.$route.params.actorId),
|
||||||
|
limit: 10,
|
||||||
|
pageNumber: Number(this.$route.params.pageNumber),
|
||||||
range: this.$route.params.range,
|
range: this.$route.params.range,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.actor = actor;
|
||||||
|
this.releases = releases;
|
||||||
|
this.totalCount = totalCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
function sfw() {
|
function sfw() {
|
||||||
|
@ -328,6 +346,7 @@ async function mounted() {
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
FilterBar,
|
FilterBar,
|
||||||
|
Pagination,
|
||||||
Photos,
|
Photos,
|
||||||
Releases,
|
Releases,
|
||||||
Gender,
|
Gender,
|
||||||
|
@ -337,6 +356,8 @@ export default {
|
||||||
return {
|
return {
|
||||||
actor: null,
|
actor: null,
|
||||||
releases: null,
|
releases: null,
|
||||||
|
totalCount: 0,
|
||||||
|
limit: 10,
|
||||||
pageTitle: null,
|
pageTitle: null,
|
||||||
expanded: false,
|
expanded: false,
|
||||||
};
|
};
|
||||||
|
@ -612,12 +633,9 @@ export default {
|
||||||
background: var(--background-dim);
|
background: var(--background-dim);
|
||||||
}
|
}
|
||||||
|
|
||||||
.releases {
|
|
||||||
border-top: solid 1px var(--crease);
|
|
||||||
}
|
|
||||||
|
|
||||||
.releases {
|
.releases {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
|
border-top: solid 1px var(--crease);
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,19 +2,19 @@
|
||||||
<div class="filter-bar noselect">
|
<div class="filter-bar noselect">
|
||||||
<span class="sort">
|
<span class="sort">
|
||||||
<router-link
|
<router-link
|
||||||
:to="{ name: isHome ? 'latest' : $route.name, params: { ...$route.params, range: 'latest', pageNumber: 1 } }"
|
:to="{ params: { range: 'latest', pageNumber: 1 } }"
|
||||||
:class="{ active: $route.name === 'latest' || range === 'latest' }"
|
:class="{ active: $route.name === 'latest' || range === 'latest' }"
|
||||||
class="range range-button"
|
class="range range-button"
|
||||||
>Latest</router-link>
|
>Latest</router-link>
|
||||||
|
|
||||||
<router-link
|
<router-link
|
||||||
:to="{ name: isHome ? 'upcoming' : $route.name, params: { ...$route.params, range: 'upcoming', pageNumber: 1 } }"
|
:to="{ params: { range: 'upcoming', pageNumber: 1 } }"
|
||||||
:class="{ active: $route.name === 'upcoming' || range === 'upcoming' }"
|
:class="{ active: $route.name === 'upcoming' || range === 'upcoming' }"
|
||||||
class="range-button"
|
class="range-button"
|
||||||
>Upcoming</router-link>
|
>Upcoming</router-link>
|
||||||
|
|
||||||
<router-link
|
<router-link
|
||||||
:to="{ name: isHome ? 'new' : $route.name, params: { ...$route.params, range: 'new', pageNumber: 1 } }"
|
:to="{ params: { range: 'new', pageNumber: 1 } }"
|
||||||
:class="{ active: $route.name === 'new' || range === 'new' }"
|
:class="{ active: $route.name === 'new' || range === 'new' }"
|
||||||
class="range-button"
|
class="range-button"
|
||||||
>New</router-link>
|
>New</router-link>
|
||||||
|
|
|
@ -8,19 +8,17 @@
|
||||||
v-for="tag in tags"
|
v-for="tag in tags"
|
||||||
:key="`tag-${tag}`"
|
:key="`tag-${tag}`"
|
||||||
class="tag"
|
class="tag"
|
||||||
|
:class="{ selected: selectedTags.has(tag) }"
|
||||||
>
|
>
|
||||||
|
<router-link :to="{ params: { range: getNewRange(tag) } }">
|
||||||
<Icon
|
<Icon
|
||||||
icon="checkmark"
|
icon="checkmark"
|
||||||
class="include"
|
class="include"
|
||||||
/>
|
/>
|
||||||
|
</router-link>
|
||||||
<Icon
|
|
||||||
icon="cross"
|
|
||||||
class="exclude"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<router-link
|
<router-link
|
||||||
:to="{ name: 'tag', params: { tagSlug: tag } }"
|
:to="{ params: { range: tag } }"
|
||||||
class="name"
|
class="name"
|
||||||
>{{ tag }}</router-link>
|
>{{ tag }}</router-link>
|
||||||
</li>
|
</li>
|
||||||
|
@ -31,11 +29,32 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
const tags = [
|
const tags = [
|
||||||
|
'airtight',
|
||||||
'anal',
|
'anal',
|
||||||
|
'blowjob',
|
||||||
'double-penetration',
|
'double-penetration',
|
||||||
|
'facial',
|
||||||
'gangbang',
|
'gangbang',
|
||||||
|
'lesbian',
|
||||||
|
'mff',
|
||||||
|
'mfm',
|
||||||
|
'orgy',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
function getNewRange(tag) {
|
||||||
|
const selected = new Set(this.selectedTags).add(tag);
|
||||||
|
|
||||||
|
if (this.selectedTags.has(tag)) {
|
||||||
|
selected.delete(tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Array.from(selected).join('+');
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectedTags() {
|
||||||
|
return new Set(this.$route.params.range.split('+'));
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
filter: {
|
filter: {
|
||||||
|
@ -49,10 +68,15 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
localFilter: this.filter,
|
|
||||||
tags,
|
tags,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
selectedTags,
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getNewRange,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -82,7 +106,7 @@ export default {
|
||||||
width: 1rem;
|
width: 1rem;
|
||||||
height: 1rem;
|
height: 1rem;
|
||||||
padding: .5rem;
|
padding: .5rem;
|
||||||
fill: var(--darken-weak);
|
fill: var(--darken-hint);
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
@ -90,15 +114,10 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.include:hover,
|
.include:hover,
|
||||||
.include.active {
|
&.selected .include {
|
||||||
fill: var(--success);
|
fill: var(--success);
|
||||||
}
|
}
|
||||||
|
|
||||||
.exclude:hover,
|
|
||||||
.exclude.active {
|
|
||||||
fill: var(--alert);
|
|
||||||
}
|
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
padding: .5rem;
|
padding: .5rem;
|
||||||
|
|
|
@ -28,8 +28,8 @@ import Pagination from '../pagination/pagination.vue';
|
||||||
async function fetchReleases() {
|
async function fetchReleases() {
|
||||||
const { releases, totalCount } = await this.$store.dispatch('fetchReleases', {
|
const { releases, totalCount } = await this.$store.dispatch('fetchReleases', {
|
||||||
limit: this.limit,
|
limit: this.limit,
|
||||||
|
range: this.$route.params.range,
|
||||||
pageNumber: Number(this.$route.params.pageNumber) || 1,
|
pageNumber: Number(this.$route.params.pageNumber) || 1,
|
||||||
range: this.$route.name,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this.totalCount = totalCount;
|
this.totalCount = totalCount;
|
||||||
|
|
|
@ -212,10 +212,12 @@ export default {
|
||||||
|
|
||||||
.content-inner {
|
.content-inner {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.releases {
|
.releases {
|
||||||
padding: 1rem 1rem 1rem .5rem;
|
padding: 1rem 1rem 1rem .5rem;
|
||||||
|
border-top: solid 1px var(--crease);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar {
|
.sidebar {
|
||||||
|
|
|
@ -41,7 +41,11 @@
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<FilterBar :fetch-releases="fetchSite" />
|
<FilterBar
|
||||||
|
:fetch-releases="fetchSite"
|
||||||
|
:items-total="totalCount"
|
||||||
|
:items-per-page="limit"
|
||||||
|
/>
|
||||||
|
|
||||||
<div class="content-inner">
|
<div class="content-inner">
|
||||||
<Releases :releases="releases" />
|
<Releases :releases="releases" />
|
||||||
|
@ -54,12 +58,16 @@ import FilterBar from '../header/filter-bar.vue';
|
||||||
import Releases from '../releases/releases.vue';
|
import Releases from '../releases/releases.vue';
|
||||||
|
|
||||||
async function fetchSite() {
|
async function fetchSite() {
|
||||||
this.site = await this.$store.dispatch('fetchSiteBySlug', {
|
const { site, releases, totalCount } = await this.$store.dispatch('fetchSiteBySlug', {
|
||||||
siteSlug: this.$route.params.siteSlug,
|
siteSlug: this.$route.params.siteSlug,
|
||||||
range: this.$route.params.range,
|
range: this.$route.params.range,
|
||||||
|
pageNumber: Number(this.$route.params.pageNumber) || 1,
|
||||||
|
limit: this.limit,
|
||||||
});
|
});
|
||||||
|
|
||||||
this.releases = this.site.releases;
|
this.site = site;
|
||||||
|
this.releases = releases;
|
||||||
|
this.totalCount = totalCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function route() {
|
async function route() {
|
||||||
|
@ -81,6 +89,8 @@ export default {
|
||||||
return {
|
return {
|
||||||
site: null,
|
site: null,
|
||||||
releases: null,
|
releases: null,
|
||||||
|
totalCount: 0,
|
||||||
|
limit: 10,
|
||||||
pageTitle: null,
|
pageTitle: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { graphql, get } from '../api';
|
import { graphql, get } from '../api';
|
||||||
import {
|
import {
|
||||||
|
releaseFields,
|
||||||
releasePosterFragment,
|
releasePosterFragment,
|
||||||
releaseActorsFragment,
|
releaseActorsFragment,
|
||||||
releaseTagsFragment,
|
releaseTagsFragment,
|
||||||
|
@ -8,13 +9,19 @@ import { curateActor, curateRelease } from '../curate';
|
||||||
import getDateRange from '../get-date-range';
|
import getDateRange from '../get-date-range';
|
||||||
|
|
||||||
function initActorActions(store, _router) {
|
function initActorActions(store, _router) {
|
||||||
async function fetchActorById({ _commit }, { actorId, limit = 100, range = 'latest' }) {
|
async function fetchActorById({ _commit }, {
|
||||||
|
actorId,
|
||||||
|
limit = 10,
|
||||||
|
pageNumber = 1,
|
||||||
|
range = 'latest',
|
||||||
|
}) {
|
||||||
const { before, after, orderBy } = getDateRange(range);
|
const { before, after, orderBy } = getDateRange(range);
|
||||||
|
|
||||||
const { actor } = await graphql(`
|
const { actor, connection: { releases, totalCount } } = await graphql(`
|
||||||
query Actor(
|
query Actor(
|
||||||
$actorId: Int!
|
$actorId: Int!
|
||||||
$limit:Int = 1000,
|
$limit:Int = 10,
|
||||||
|
$offset:Int = 0,
|
||||||
$after:Date = "1900-01-01",
|
$after:Date = "1900-01-01",
|
||||||
$before:Date = "2100-01-01",
|
$before:Date = "2100-01-01",
|
||||||
$orderBy:[ReleasesActorsOrderBy!]
|
$orderBy:[ReleasesActorsOrderBy!]
|
||||||
|
@ -123,7 +130,7 @@ function initActorActions(store, _router) {
|
||||||
name
|
name
|
||||||
slug
|
slug
|
||||||
}
|
}
|
||||||
releases: releasesActors(
|
releasesConnection: releasesActorsConnection(
|
||||||
filter: {
|
filter: {
|
||||||
release: {
|
release: {
|
||||||
date: {
|
date: {
|
||||||
|
@ -140,10 +147,12 @@ function initActorActions(store, _router) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
first: $limit,
|
first: $limit
|
||||||
|
offset: $offset
|
||||||
orderBy: $orderBy
|
orderBy: $orderBy
|
||||||
) {
|
) {
|
||||||
|
releases: nodes {
|
||||||
release {
|
release {
|
||||||
id
|
id
|
||||||
url
|
url
|
||||||
|
@ -168,17 +177,50 @@ function initActorActions(store, _router) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
connection: releasesActorsConnection(
|
||||||
|
first: $limit
|
||||||
|
offset: $offset
|
||||||
|
orderBy: $orderBy
|
||||||
|
filter: {
|
||||||
|
actorId: {
|
||||||
|
equalTo: $actorId
|
||||||
|
}
|
||||||
|
or: [
|
||||||
|
{
|
||||||
|
release: {
|
||||||
|
date: {
|
||||||
|
lessThan: $before,
|
||||||
|
greaterThan: $after
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
) {
|
||||||
|
releases: nodes {
|
||||||
|
release {
|
||||||
|
${releaseFields}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
totalCount
|
||||||
|
}
|
||||||
}
|
}
|
||||||
`, {
|
`, {
|
||||||
actorId,
|
actorId,
|
||||||
limit,
|
limit,
|
||||||
|
offset: Math.max(0, (pageNumber - 1)) * limit,
|
||||||
after,
|
after,
|
||||||
before,
|
before,
|
||||||
orderBy: orderBy === 'DATE_DESC' ? 'RELEASE_BY_RELEASE_ID__DATE_DESC' : 'RELEASE_BY_RELEASE_ID__DATE_ASC',
|
orderBy: orderBy === 'DATE_DESC' ? 'RELEASE_BY_RELEASE_ID__DATE_DESC' : 'RELEASE_BY_RELEASE_ID__DATE_ASC',
|
||||||
exclude: store.state.ui.filter,
|
exclude: store.state.ui.filter,
|
||||||
});
|
});
|
||||||
|
|
||||||
return curateActor(actor, null, curateRelease);
|
return {
|
||||||
|
actor: curateActor(actor, null, curateRelease),
|
||||||
|
releases: releases.map(release => curateRelease(release.release)),
|
||||||
|
totalCount,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchActors({ _commit }, {
|
async function fetchActors({ _commit }, {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
|
|
||||||
function curateActor(actor, release, curateActorRelease) {
|
function curateActor(actor, release) {
|
||||||
if (!actor) {
|
if (!actor) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -53,10 +53,6 @@ function curateActor(actor, release, curateActorRelease) {
|
||||||
curatedActor.ageThen = dayjs(release.date).diff(actor.birthdate, 'year');
|
curatedActor.ageThen = dayjs(release.date).diff(actor.birthdate, 'year');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actor.releases) {
|
|
||||||
curatedActor.releases = actor.releases.map(actorRelease => curateActorRelease(actorRelease.release));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (actor.aliasFor) {
|
if (actor.aliasFor) {
|
||||||
curatedActor.aliasFor = curateActor(curatedActor.aliasFor);
|
curatedActor.aliasFor = curateActor(curatedActor.aliasFor);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ const dateRanges = {
|
||||||
};
|
};
|
||||||
|
|
||||||
function getDateRange(range) {
|
function getDateRange(range) {
|
||||||
return dateRanges[range]();
|
return (dateRanges[range] || dateRanges.all)();
|
||||||
}
|
}
|
||||||
|
|
||||||
export default getDateRange;
|
export default getDateRange;
|
||||||
|
|
|
@ -19,35 +19,17 @@ const routes = [
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
redirect: {
|
redirect: {
|
||||||
name: 'latest',
|
name: 'home',
|
||||||
params: {
|
params: {
|
||||||
|
range: 'latest',
|
||||||
pageNumber: 1,
|
pageNumber: 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/home',
|
path: '/:range/:pageNumber?',
|
||||||
redirect: {
|
|
||||||
name: 'latest',
|
|
||||||
params: {
|
|
||||||
pageNumber: 1,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/latest/:pageNumber?',
|
|
||||||
component: Home,
|
component: Home,
|
||||||
name: 'latest',
|
name: 'home',
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/upcoming/:pageNumber?',
|
|
||||||
component: Home,
|
|
||||||
name: 'upcoming',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/new/:pageNumber?',
|
|
||||||
component: Home,
|
|
||||||
name: 'new',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/scene/:releaseId/:releaseSlug?',
|
path: '/scene/:releaseId/:releaseSlug?',
|
||||||
|
@ -67,11 +49,12 @@ const routes = [
|
||||||
params: {
|
params: {
|
||||||
...from.params,
|
...from.params,
|
||||||
range: 'latest',
|
range: 'latest',
|
||||||
|
pageNumber: 1,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/actor/:actorId/:actorSlug?/:range',
|
path: '/actor/:actorId/:actorSlug/:range/:pageNumber?',
|
||||||
component: Actor,
|
component: Actor,
|
||||||
name: 'actorRange',
|
name: 'actorRange',
|
||||||
},
|
},
|
||||||
|
@ -84,11 +67,12 @@ const routes = [
|
||||||
params: {
|
params: {
|
||||||
...from.params,
|
...from.params,
|
||||||
range: 'latest',
|
range: 'latest',
|
||||||
|
pageNumber: 1,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/site/:siteSlug/:range',
|
path: '/site/:siteSlug/:range/:pageNumber?',
|
||||||
component: Site,
|
component: Site,
|
||||||
name: 'siteRange',
|
name: 'siteRange',
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { graphql } from '../api';
|
import { graphql } from '../api';
|
||||||
import { releaseFields } from '../fragments';
|
import { releaseFields } from '../fragments';
|
||||||
import { curateSite } from '../curate';
|
import { curateSite, curateRelease } from '../curate';
|
||||||
import getDateRange from '../get-date-range';
|
import getDateRange from '../get-date-range';
|
||||||
|
|
||||||
function initSitesActions(store, _router) {
|
function initSitesActions(store, _router) {
|
||||||
|
@ -12,7 +12,7 @@ function initSitesActions(store, _router) {
|
||||||
}) {
|
}) {
|
||||||
const { before, after, orderBy } = getDateRange(range);
|
const { before, after, orderBy } = getDateRange(range);
|
||||||
|
|
||||||
const { site } = await graphql(`
|
const { site, connection: { releases, totalCount } } = await graphql(`
|
||||||
query Site(
|
query Site(
|
||||||
$siteSlug: String!,
|
$siteSlug: String!,
|
||||||
$limit:Int = 100,
|
$limit:Int = 100,
|
||||||
|
@ -39,7 +39,7 @@ function initSitesActions(store, _router) {
|
||||||
slug
|
slug
|
||||||
url
|
url
|
||||||
}
|
}
|
||||||
releases(
|
releasesConnection(
|
||||||
filter: {
|
filter: {
|
||||||
date: {
|
date: {
|
||||||
lessThan: $before,
|
lessThan: $before,
|
||||||
|
@ -59,8 +59,41 @@ function initSitesActions(store, _router) {
|
||||||
offset: $offset
|
offset: $offset
|
||||||
orderBy: $orderBy
|
orderBy: $orderBy
|
||||||
) {
|
) {
|
||||||
|
releases: nodes {
|
||||||
${releaseFields}
|
${releaseFields}
|
||||||
}
|
}
|
||||||
|
totalCount
|
||||||
|
}
|
||||||
|
}
|
||||||
|
connection: releasesConnection(
|
||||||
|
first: $limit
|
||||||
|
offset: $offset
|
||||||
|
orderBy: $orderBy
|
||||||
|
filter: {
|
||||||
|
site: {
|
||||||
|
slug: {
|
||||||
|
equalTo: $siteSlug
|
||||||
|
}
|
||||||
|
}
|
||||||
|
date: {
|
||||||
|
lessThan: $before,
|
||||||
|
greaterThan: $after
|
||||||
|
}
|
||||||
|
releasesTagsConnection: {
|
||||||
|
none: {
|
||||||
|
tag: {
|
||||||
|
slug: {
|
||||||
|
in: $exclude
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
) {
|
||||||
|
releases: nodes {
|
||||||
|
${releaseFields}
|
||||||
|
}
|
||||||
|
totalCount
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`, {
|
`, {
|
||||||
|
@ -74,7 +107,11 @@ function initSitesActions(store, _router) {
|
||||||
exclude: store.state.ui.filter,
|
exclude: store.state.ui.filter,
|
||||||
});
|
});
|
||||||
|
|
||||||
return curateSite(site);
|
return {
|
||||||
|
site: curateSite(site),
|
||||||
|
releases: releases.map(release => curateRelease(release)),
|
||||||
|
totalCount,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchSites({ _commit }, { limit = 100 }) {
|
async function fetchSites({ _commit }, { limit = 100 }) {
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
Binary file not shown.
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 26 KiB |
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
|
@ -5,29 +5,35 @@ const substitutes = {
|
||||||
á: 'a',
|
á: 'a',
|
||||||
ä: 'a',
|
ä: 'a',
|
||||||
å: 'a',
|
å: 'a',
|
||||||
|
ã: 'a',
|
||||||
æ: 'ae',
|
æ: 'ae',
|
||||||
ç: 'c',
|
ç: 'c',
|
||||||
è: 'e',
|
è: 'e',
|
||||||
é: 'e',
|
é: 'e',
|
||||||
ë: 'e',
|
ë: 'e',
|
||||||
|
ẽ: 'e',
|
||||||
ì: 'i',
|
ì: 'i',
|
||||||
í: 'i',
|
í: 'i',
|
||||||
ï: 'i',
|
ï: 'i',
|
||||||
|
ĩ: 'i',
|
||||||
ǹ: 'n',
|
ǹ: 'n',
|
||||||
ń: 'n',
|
ń: 'n',
|
||||||
ñ: 'n',
|
ñ: 'n',
|
||||||
ò: 'o',
|
ò: 'o',
|
||||||
ó: 'o',
|
ó: 'o',
|
||||||
ö: 'o',
|
ö: 'o',
|
||||||
|
õ: 'o',
|
||||||
ø: 'o',
|
ø: 'o',
|
||||||
œ: 'oe',
|
œ: 'oe',
|
||||||
ß: 'ss',
|
ß: 'ss',
|
||||||
ù: 'u',
|
ù: 'u',
|
||||||
ú: 'u',
|
ú: 'u',
|
||||||
ü: 'u',
|
ü: 'u',
|
||||||
|
ũ: 'u',
|
||||||
ỳ: 'y',
|
ỳ: 'y',
|
||||||
ý: 'y',
|
ý: 'y',
|
||||||
ÿ: 'y',
|
ÿ: 'y',
|
||||||
|
ỹ: 'y',
|
||||||
};
|
};
|
||||||
|
|
||||||
function slugify(string, delimiter = '-', {
|
function slugify(string, delimiter = '-', {
|
||||||
|
|
Loading…
Reference in New Issue