Hiding scroll buttons on small screens. Fixed channel count on overview.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
>
|
||||
<input
|
||||
v-model="query"
|
||||
:placeholder="`Find ${siteCount} sites in ${networks.length} networks`"
|
||||
:placeholder="`Find ${channelCount} channels in ${entities.length} networks`"
|
||||
class="query"
|
||||
@input="searchEntities"
|
||||
>
|
||||
@@ -35,9 +35,9 @@
|
||||
class="entity-tiles"
|
||||
>
|
||||
<Entity
|
||||
v-for="network in networks"
|
||||
:key="`network-tile-${network.slug}`"
|
||||
:entity="network"
|
||||
v-for="entity in entities"
|
||||
:key="`entity-tile-${entity.slug}`"
|
||||
:entity="entity"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -54,7 +54,7 @@ async function searchEntities() {
|
||||
}
|
||||
|
||||
async function mounted() {
|
||||
this.networks = await this.$store.dispatch('fetchEntities', {
|
||||
this.entities = await this.$store.dispatch('fetchEntities', {
|
||||
type: 'network',
|
||||
entitySlugs: [
|
||||
'bamvisions',
|
||||
@@ -62,11 +62,12 @@ async function mounted() {
|
||||
'legalporno',
|
||||
],
|
||||
});
|
||||
|
||||
this.pageTitle = 'Networks';
|
||||
}
|
||||
|
||||
function siteCount() {
|
||||
return this.networks.map(network => network.children).flat().length;
|
||||
function channelCount() {
|
||||
return this.entities.reduce((acc, entity) => acc + entity.childrenTotal, 0);
|
||||
}
|
||||
|
||||
export default {
|
||||
@@ -77,12 +78,12 @@ export default {
|
||||
return {
|
||||
query: '',
|
||||
pageTitle: null,
|
||||
networks: [],
|
||||
entities: [],
|
||||
searchResults: [],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
siteCount,
|
||||
channelCount,
|
||||
},
|
||||
mounted,
|
||||
methods: {
|
||||
|
||||
Reference in New Issue
Block a user