Added alert dialog. Fixed image rotation EXIT data being discarded.
This commit is contained in:
@@ -424,6 +424,94 @@ function initActorActions(store, router) {
|
||||
};
|
||||
}
|
||||
|
||||
async function searchActors({ _commit }, { query, limit = 20, minLength = 2 }) {
|
||||
const { actors } = await graphql(`
|
||||
query SearchActors(
|
||||
$query: String!
|
||||
$limit: Int = 20
|
||||
$minLength: Int = 2
|
||||
$hasAuth: Boolean!
|
||||
$userId: Int
|
||||
) {
|
||||
actors: searchActors(
|
||||
search: $query,
|
||||
minLength: $minLength
|
||||
first: $limit
|
||||
) {
|
||||
id
|
||||
name
|
||||
slug
|
||||
age
|
||||
ageAtDeath
|
||||
dateOfBirth
|
||||
dateOfDeath
|
||||
gender
|
||||
aliasFor: actorByAliasFor {
|
||||
id
|
||||
name
|
||||
slug
|
||||
age
|
||||
ageAtDeath
|
||||
dateOfBirth
|
||||
dateOfDeath
|
||||
gender
|
||||
entity {
|
||||
id
|
||||
name
|
||||
slug
|
||||
}
|
||||
avatar: avatarMedia {
|
||||
id
|
||||
path
|
||||
thumbnail
|
||||
lazy
|
||||
isS3
|
||||
width
|
||||
height
|
||||
comment
|
||||
credit
|
||||
}
|
||||
birthCountry: countryByBirthCountryAlpha2 {
|
||||
alpha2
|
||||
name
|
||||
alias
|
||||
}
|
||||
}
|
||||
entity {
|
||||
id
|
||||
name
|
||||
slug
|
||||
}
|
||||
avatar: avatarMedia {
|
||||
id
|
||||
path
|
||||
thumbnail
|
||||
lazy
|
||||
isS3
|
||||
width
|
||||
height
|
||||
comment
|
||||
credit
|
||||
}
|
||||
birthCountry: countryByBirthCountryAlpha2 {
|
||||
alpha2
|
||||
name
|
||||
alias
|
||||
}
|
||||
${actorStashesFields}
|
||||
}
|
||||
}
|
||||
`, {
|
||||
query,
|
||||
limit,
|
||||
minLength,
|
||||
hasAuth: !!store.state.auth.user,
|
||||
userId: store.state.auth.user?.id,
|
||||
});
|
||||
|
||||
return actors.map(actor => curateActor(actor));
|
||||
}
|
||||
|
||||
async function fetchActorReleases({ _commit }, actorId) {
|
||||
const releases = await get(`/actors/${actorId}/releases`, {
|
||||
filter: store.state.ui.filter,
|
||||
@@ -438,6 +526,7 @@ function initActorActions(store, router) {
|
||||
fetchActorById,
|
||||
fetchActors,
|
||||
fetchActorReleases,
|
||||
searchActors,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user