Added footer and basic stats page.
This commit is contained in:
@@ -154,6 +154,32 @@ function initUiActions(_store, _router) {
|
||||
};
|
||||
}
|
||||
|
||||
async function fetchStats() {
|
||||
const {
|
||||
scenes,
|
||||
movies,
|
||||
actors,
|
||||
networks,
|
||||
channels,
|
||||
} = await graphql(`
|
||||
query Stats {
|
||||
scenes: releasesConnection { totalCount }
|
||||
movies: moviesConnection { totalCount }
|
||||
actors: actorsConnection { totalCount }
|
||||
networks: entitiesConnection(filter: { type: { equalTo: "network" } }) { totalCount }
|
||||
channels: entitiesConnection(filter: { type: { equalTo: "channel" } }) { totalCount }
|
||||
}
|
||||
`);
|
||||
|
||||
return {
|
||||
totalScenes: scenes.totalCount,
|
||||
totalMovies: movies.totalCount,
|
||||
totalActors: actors.totalCount,
|
||||
totalNetworks: networks.totalCount,
|
||||
totalChannels: channels.totalCount,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
search,
|
||||
setFilter,
|
||||
@@ -161,6 +187,7 @@ function initUiActions(_store, _router) {
|
||||
setBatch,
|
||||
setSfw,
|
||||
setTheme,
|
||||
fetchStats,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user