mirror of
https://github.com/misenhower/splatoon3.ink.git
synced 2026-07-14 15:51:27 -05:00
Add regional labels to Splatfest boxes
This commit is contained in:
parent
ce6996cbc0
commit
7b02be63ef
|
|
@ -3,6 +3,7 @@
|
|||
<div class="space-y-2">
|
||||
<div class="font-splatoon1 text-2xl xl:text-3xl text-shadow mx-2">
|
||||
{{ $t(title) }}
|
||||
{{ regions.length < 4 ? ` (${regions.join('/')})` : '' }}
|
||||
</div>
|
||||
|
||||
<div class="flex justify-center mx-2">
|
||||
|
|
@ -41,12 +42,37 @@ import { computed } from 'vue';
|
|||
import ProductContainer from './ProductContainer.vue';
|
||||
import { STATUS_PAST, STATUS_ACTIVE, STATUS_UPCOMING } from '@/stores/splatfests';
|
||||
import SquidTape from './SquidTape.vue';
|
||||
import { useUSSplatfestsStore, useEUSplatfestsStore, useJPSplatfestsStore, useAPSplatfestsStore } from '@/stores/splatfests';
|
||||
|
||||
const props = defineProps({
|
||||
festival: Object,
|
||||
historyMode: Boolean,
|
||||
});
|
||||
|
||||
const usSplatfests = useUSSplatfestsStore();
|
||||
const euSplatfests = useEUSplatfestsStore();
|
||||
const jpSplatfests = useJPSplatfestsStore();
|
||||
const apSplatfests = useAPSplatfestsStore();
|
||||
|
||||
const regions = computed(() => {
|
||||
const availableRegions = [];
|
||||
const id = props.festival.__splatoon3ink_id;
|
||||
if (usSplatfests.festivals.map(f => f.__splatoon3ink_id).includes(id)) {
|
||||
availableRegions.push('NA');
|
||||
}
|
||||
if (euSplatfests.festivals.map(f => f.__splatoon3ink_id).includes(id)) {
|
||||
availableRegions.push('EU');
|
||||
}
|
||||
if (jpSplatfests.festivals.map(f => f.__splatoon3ink_id).includes(id)) {
|
||||
availableRegions.push('JP');
|
||||
}
|
||||
if (apSplatfests.festivals.map(f => f.__splatoon3ink_id).includes(id)) {
|
||||
availableRegions.push('AP');
|
||||
}
|
||||
return availableRegions;
|
||||
})
|
||||
|
||||
|
||||
const title = computed(() => {
|
||||
if (props.historyMode) {
|
||||
return 'festival.active';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user