forked from DebaucheryLibrarian/traxxx
Added setting to disable campaigns.
This commit is contained in:
@@ -96,7 +96,10 @@
|
||||
/>
|
||||
</Scroll>
|
||||
|
||||
<div class="campaign-container">
|
||||
<div
|
||||
v-if="config.campaigns.entity"
|
||||
class="campaign-container"
|
||||
>
|
||||
<Campaign
|
||||
:entity="entity"
|
||||
:min-ratio="3"
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<template>
|
||||
<div class="home">
|
||||
<div class="content-inner">
|
||||
<div class="campaign-container">
|
||||
<div
|
||||
v-if="config.campaigns.home"
|
||||
class="campaign-container"
|
||||
>
|
||||
<Campaign
|
||||
:min-ratio="6"
|
||||
/>
|
||||
@@ -35,6 +38,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import config from 'config';
|
||||
|
||||
import FilterBar from '../filters/filter-bar.vue';
|
||||
import Releases from '../releases/releases.vue';
|
||||
import Pagination from '../pagination/pagination.vue';
|
||||
@@ -76,7 +81,7 @@ export default {
|
||||
releases: [],
|
||||
networks: [],
|
||||
pageTitle: null,
|
||||
limit: 29, // reserve one campaign spot
|
||||
limit: 30 - config.campaigns.tiles, // reserve one campaign spot
|
||||
totalCount: 0,
|
||||
from: null,
|
||||
done: false,
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import config from 'config';
|
||||
|
||||
import { defineProps, defineEmits, computed } from 'vue';
|
||||
import { useStore } from 'vuex';
|
||||
import { useRouter } from 'vue-router';
|
||||
@@ -97,7 +99,7 @@ const props = defineProps({
|
||||
|
||||
const campaignIndex = computed(() => Math.floor(Math.random() * props.releases.length - 5) + 5);
|
||||
|
||||
const items = computed(() => props.releases.flatMap((release, index) => (props.releases.length > 10 && index === campaignIndex.value ? ['campaign', release] : release)));
|
||||
const items = computed(() => props.releases.flatMap((release, index) => (config.campaigns.tiles && props.releases.length > 10 && index === campaignIndex.value ? ['campaign', release] : release)));
|
||||
|
||||
const range = computed(() => router.route?.params.range);
|
||||
const sfw = computed(() => store.state.ui.sfw);
|
||||
|
||||
Reference in New Issue
Block a user