Added setting to disable campaigns.
This commit is contained in:
parent
4a3674feac
commit
57a8b8e2f6
|
@ -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);
|
||||
|
|
|
@ -7,6 +7,11 @@ export default {
|
|||
mediaPath: '/media',
|
||||
s3Path: 'https://s3.wasabisys.com',
|
||||
},
|
||||
campaigns: {
|
||||
home: true,
|
||||
entity: true,
|
||||
tiles: 0,
|
||||
},
|
||||
showDisclaimer: false,
|
||||
disclaimer: 'This site is in early development, and content may occasionally disappear. Please stay tuned, you will be able to use traxxx to its full potential in the near future!',
|
||||
selectableTags: [
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
"knex": "^0.95.12",
|
||||
"knex-migrate": "^1.7.4",
|
||||
"longjohn": "^0.2.12",
|
||||
"merge-anything": "^5.1.7",
|
||||
"mime": "^2.4.4",
|
||||
"mitt": "^3.0.0",
|
||||
"moment": "^2.24.0",
|
||||
|
@ -10581,6 +10582,17 @@
|
|||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/is-what": {
|
||||
"version": "4.1.15",
|
||||
"resolved": "https://registry.npmjs.org/is-what/-/is-what-4.1.15.tgz",
|
||||
"integrity": "sha512-uKua1wfy3Yt+YqsD6mTUEa2zSi3G1oPlqTflgaPJ7z63vUGN5pxFpnQfeSLMFnJDEsdvOtkp1rUWkYjB4YfhgA==",
|
||||
"engines": {
|
||||
"node": ">=12.13"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/mesqueeb"
|
||||
}
|
||||
},
|
||||
"node_modules/is-windows": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
|
||||
|
@ -11602,6 +11614,20 @@
|
|||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/merge-anything": {
|
||||
"version": "5.1.7",
|
||||
"resolved": "https://registry.npmjs.org/merge-anything/-/merge-anything-5.1.7.tgz",
|
||||
"integrity": "sha512-eRtbOb1N5iyH0tkQDAoQ4Ipsp/5qSR79Dzrz8hEPxRX10RWWR/iQXdoKmBSRCThY1Fh5EhISDtpSc93fpxUniQ==",
|
||||
"dependencies": {
|
||||
"is-what": "^4.1.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.13"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/mesqueeb"
|
||||
}
|
||||
},
|
||||
"node_modules/merge-deep": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/merge-deep/-/merge-deep-3.0.3.tgz",
|
||||
|
@ -27103,6 +27129,11 @@
|
|||
"call-bind": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"is-what": {
|
||||
"version": "4.1.15",
|
||||
"resolved": "https://registry.npmjs.org/is-what/-/is-what-4.1.15.tgz",
|
||||
"integrity": "sha512-uKua1wfy3Yt+YqsD6mTUEa2zSi3G1oPlqTflgaPJ7z63vUGN5pxFpnQfeSLMFnJDEsdvOtkp1rUWkYjB4YfhgA=="
|
||||
},
|
||||
"is-windows": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
|
||||
|
@ -27903,6 +27934,14 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"merge-anything": {
|
||||
"version": "5.1.7",
|
||||
"resolved": "https://registry.npmjs.org/merge-anything/-/merge-anything-5.1.7.tgz",
|
||||
"integrity": "sha512-eRtbOb1N5iyH0tkQDAoQ4Ipsp/5qSR79Dzrz8hEPxRX10RWWR/iQXdoKmBSRCThY1Fh5EhISDtpSc93fpxUniQ==",
|
||||
"requires": {
|
||||
"is-what": "^4.1.8"
|
||||
}
|
||||
},
|
||||
"merge-deep": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/merge-deep/-/merge-deep-3.0.3.tgz",
|
||||
|
|
|
@ -114,6 +114,7 @@
|
|||
"knex": "^0.95.12",
|
||||
"knex-migrate": "^1.7.4",
|
||||
"longjohn": "^0.2.12",
|
||||
"merge-anything": "^5.1.7",
|
||||
"mime": "^2.4.4",
|
||||
"mitt": "^3.0.0",
|
||||
"moment": "^2.24.0",
|
||||
|
|
Loading…
Reference in New Issue