Refactored stats page.

This commit is contained in:
DebaucheryLibrarian 2023-06-24 17:16:06 +02:00
parent f4ed4fb8d8
commit fbcf17d1c4
15 changed files with 139 additions and 62 deletions

View File

@ -165,6 +165,7 @@ export default {
.campaign-banner { .campaign-banner {
height: auto; height: auto;
width: auto;
max-height: 100%; max-height: 100%;
max-width: 100%; max-width: 100%;
} }

View File

@ -288,6 +288,7 @@ export default {
} }
.campaign-container { .campaign-container {
max-height: 150px;
background: var(--background-dim); background: var(--background-dim);
text-align: center; text-align: center;
padding: .5rem; padding: .5rem;

View File

@ -8,7 +8,10 @@
<dt class="stat-label">Version</dt> <dt class="stat-label">Version</dt>
<dd class="stat-value">{{ version }}</dd> <dd class="stat-value">{{ version }}</dd>
</div> </div>
</dl>
<template v-if="loaded">
<dl class="stat-table">
<div class="stat-row"> <div class="stat-row">
<dt class="stat-label">Content updated</dt> <dt class="stat-label">Content updated</dt>
<dd class="stat-value">{{ formatDate(lastScrape, 'YYYY-MM-DD HH:mm') }}</dd> <dd class="stat-value">{{ formatDate(lastScrape, 'YYYY-MM-DD HH:mm') }}</dd>
@ -41,38 +44,44 @@
<dd class="stat-value">{{ totalActors }}</dd> <dd class="stat-value">{{ totalActors }}</dd>
</div> </div>
</dl> </dl>
</template>
<Ellipsis v-else />
</div> </div>
<Footer /> <Footer />
</div> </div>
</template> </template>
<script> <script setup>
async function mounted() { import { ref, onMounted } from 'vue';
const stats = await this.$store.dispatch('fetchStats'); import { useStore } from 'vuex';
this.totalScenes = stats.totalScenes; import Ellipsis from '../loading/ellipsis.vue';
this.totalMovies = stats.totalMovies;
this.totalActors = stats.totalActors;
this.totalNetworks = stats.totalNetworks;
this.totalChannels = stats.totalChannels;
this.lastScrape = stats.lastScrape;
this.version = VERSION; // eslint-disable-line no-undef const store = useStore();
} const version = VERSION; // eslint-disable-line no-undef
export default { const loaded = ref(false);
data() { const totalScenes = ref(0);
return { const totalMovies = ref(0);
totalScenes: 0, const totalActors = ref(0);
totalMovies: 0, const totalNetworks = ref(0);
totalActors: 0, const totalChannels = ref(0);
totalNetworks: 0, const lastScrape = ref(null);
totalChannels: 0,
}; onMounted(async () => {
}, const stats = await store.dispatch('fetchStats');
mounted,
}; totalScenes.value = stats.totalScenes;
totalMovies.value = stats.totalMovies;
totalActors.value = stats.totalActors;
totalNetworks.value = stats.totalNetworks;
totalChannels.value = stats.totalChannels;
lastScrape.value = stats.lastScrape;
loaded.value = true;
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -280,23 +280,15 @@ function initUiActions(store, _router) {
actors, actors,
networks, networks,
channels, channels,
batches: [batch],
} = await graphql(` } = await graphql(`
query Stats { query Stats {
scenes: releasesConnection( scenes: releasesConnection { totalCount }
last: 1,
orderBy: BATCH_BY_CREATED_BATCH_ID__CREATED_AT_ASC
) {
totalCount
scenes: nodes {
batch: createdBatch {
createdAt
}
}
}
movies: moviesConnection { totalCount } movies: moviesConnection { totalCount }
actors: actorsConnection { totalCount } actors: actorsConnection { totalCount }
networks: entitiesConnection(filter: { type: { equalTo: "network" } }) { totalCount } networks: entitiesConnection(filter: { type: { equalTo: "network" } }) { totalCount }
channels: entitiesConnection(filter: { type: { equalTo: "channel" } }) { totalCount } channels: entitiesConnection(filter: { type: { equalTo: "channel" } }) { totalCount }
batches(orderBy: CREATED_AT_DESC, first: 1) { createdAt }
} }
`); `);
@ -306,7 +298,7 @@ function initUiActions(store, _router) {
totalActors: actors.totalCount, totalActors: actors.totalCount,
totalNetworks: networks.totalCount, totalNetworks: networks.totalCount,
totalChannels: channels.totalCount, totalChannels: channels.totalCount,
lastScrape: new Date(scenes.scenes[0]?.batch.createdAt), lastScrape: new Date(batch.createdAt),
}; };
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

View File

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 88 KiB

View File

@ -40,6 +40,15 @@ const bannerTags = {
archangel_970_90_kendra_lust: ['dp', 'anal', 'sex', 'interracial', 'black'], archangel_970_90_kendra_lust: ['dp', 'anal', 'sex', 'interracial', 'black'],
// dogfart // dogfart
wefuckblackgirls_728_90_loss: ['mfm', 'threesome', 'anal', 'black', 'interracial'], wefuckblackgirls_728_90_loss: ['mfm', 'threesome', 'anal', 'black', 'interracial'],
dfxtra_900_250_mfm: ['mfm', 'threesome', 'black', 'interracial'],
dfxtra_900_250_gay_anal: ['gay', 'anal', 'black', 'interracial'],
dfxtra_300_250_mfm: ['mfm', 'threesome', 'black', 'interracial'],
dfxtra_300_250_gay_bj: ['gay', 'blowjob', 'black', 'interracial'],
blacksonblondes_900_250_mfm: ['mfm', 'threesome', 'black', 'interracial'],
blacksonblondes_900_250_mfm_hj: ['mfm', 'threesome', 'handjob', 'black', 'interracial'],
blacksonblondes_300_250_mfm: ['mfm', 'threesome', 'black', 'interracial'],
blacksonblondes_300_250_mff_april: ['mff', 'threesome', 'black', 'interracial'],
blacksonblondes_300_250_mff_april2: ['mff', 'threesome', 'black', 'interracial'],
// evilangel // evilangel
evilangel_728_90_adriana_chechik_gangbang: ['gangbang', 'airtight', 'dp', 'dvp', 'facial', 'brunette'], evilangel_728_90_adriana_chechik_gangbang: ['gangbang', 'airtight', 'dp', 'dvp', 'facial', 'brunette'],
evilangel_728_90_kenzie_reeves_lexi_lore: ['anal', 'mff', 'blowjob', 'blonde'], evilangel_728_90_kenzie_reeves_lexi_lore: ['anal', 'mff', 'blowjob', 'blonde'],
@ -250,6 +259,71 @@ const campaigns = [
affiliate: 'bang_signup', affiliate: 'bang_signup',
comment: 'per signup', comment: 'per signup',
}, },
// dfxtra / dogfart
{
network: 'dfxtra',
url: 'https://www.g2fame.com/dfxtra/go.php?pr=8&su=2&si=681&ad=277470&pa=index&ar=&campaign=460352&buffer=',
comment: 'per signup',
},
{
network: 'dfxtra',
banner: 'dfxtra_900_250_mfm',
url: 'https://www.g2fame.com/dfxtra/go.php?pr=8&su=2&si=681&ad=277470&pa=index&ar=&campaign=460352&buffer=',
comment: 'per signup',
},
{
network: 'dfxtra',
banner: 'dfxtra_900_250_gay_anal',
url: 'https://www.g2fame.com/dfxtra/go.php?pr=8&su=2&si=681&ad=277470&pa=index&ar=&campaign=460352&buffer=',
comment: 'per signup',
},
{
network: 'dfxtra',
banner: 'dfxtra_300_250_mfm',
url: 'https://www.g2fame.com/dfxtra/go.php?pr=8&su=2&si=681&ad=277470&pa=index&ar=&campaign=460352&buffer=',
comment: 'per signup',
},
{
network: 'dfxtra',
banner: 'dfxtra_300_250_gay_bj',
url: 'https://www.g2fame.com/dfxtra/go.php?pr=8&su=2&si=681&ad=277470&pa=index&ar=&campaign=460352&buffer=',
comment: 'per signup',
},
{
channel: 'blacksonblondes',
url: 'https://www.g2fame.com/blacksonblondes/go.php?pr=8&su=2&si=682&ad=277470&pa=index&ar=&campaign=460352&buffer=',
comment: 'per signup',
},
{
channel: 'blacksonblondes',
banner: 'blacksonblondes_900_250_mfm_hj',
url: 'https://www.g2fame.com/blacksonblondes/go.php?pr=8&su=2&si=682&ad=277470&pa=index&ar=&campaign=460352&buffer=',
comment: 'per signup',
},
{
channel: 'blacksonblondes',
banner: 'blacksonblondes_900_250_mfm',
url: 'https://www.g2fame.com/blacksonblondes/go.php?pr=8&su=2&si=682&ad=277470&pa=index&ar=&campaign=460352&buffer=',
comment: 'per signup',
},
{
channel: 'blacksonblondes',
banner: 'blacksonblondes_300_250_mfm',
url: 'https://www.g2fame.com/blacksonblondes/go.php?pr=8&su=2&si=682&ad=277470&pa=index&ar=&campaign=460352&buffer=',
comment: 'per signup',
},
{
channel: 'blacksonblondes',
banner: 'blacksonblondes_300_250_mff_april',
url: 'https://www.g2fame.com/blacksonblondes/go.php?pr=8&su=2&si=682&ad=277470&pa=index&ar=&campaign=460352&buffer=',
comment: 'per signup',
},
{
channel: 'blacksonblondes',
banner: 'blacksonblondes_300_250_mff_april2',
url: 'https://www.g2fame.com/blacksonblondes/go.php?pr=8&su=2&si=682&ad=277470&pa=index&ar=&campaign=460352&buffer=',
comment: 'per signup',
},
// julesjordan // julesjordan
{ {
network: 'julesjordan', network: 'julesjordan',