mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
fix(backgrounds): correct event and tt loading
This commit is contained in:
@@ -207,13 +207,13 @@
|
|||||||
<div
|
<div
|
||||||
class="row justify-content-center title-row mb-3"
|
class="row justify-content-center title-row mb-3"
|
||||||
>
|
>
|
||||||
<strong>{{ allBackgrounds.eventBackgrounds.text }}</strong>
|
<strong>{{ $t('eventBackgrounds') }}</strong>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="background-row d-flex justify-content-center mb-4"
|
class="background-row d-flex justify-content-center mb-4"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
v-for="bg in allBackgrounds.eventBackgrounds.items"
|
v-for="bg in eventBackgrounds"
|
||||||
:id="bg.key"
|
:id="bg.key"
|
||||||
:key="bg.key"
|
:key="bg.key"
|
||||||
class="background-item"
|
class="background-item"
|
||||||
@@ -1030,6 +1030,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
allBackgrounds: content.backgroundsFlat,
|
allBackgrounds: content.backgroundsFlat,
|
||||||
|
eventBackgrounds: [],
|
||||||
monthlyBackgrounds: [],
|
monthlyBackgrounds: [],
|
||||||
standardBackgrounds: [],
|
standardBackgrounds: [],
|
||||||
standardBackgroundMax: 1,
|
standardBackgroundMax: 1,
|
||||||
@@ -1097,16 +1098,20 @@ export default {
|
|||||||
this.$root.$emit('bv::hide::modal', 'avatar-modal');
|
this.$root.$emit('bv::hide::modal', 'avatar-modal');
|
||||||
},
|
},
|
||||||
updateBackgrounds () {
|
updateBackgrounds () {
|
||||||
|
this.eventBackgrounds = [];
|
||||||
this.monthlyBackgrounds = [];
|
this.monthlyBackgrounds = [];
|
||||||
this.standardBackgrounds = [
|
this.standardBackgrounds = [
|
||||||
{ key: '', notes: () => this.$t('noBackground') },
|
{ key: '', notes: () => this.$t('noBackground') },
|
||||||
];
|
];
|
||||||
|
this.timeTravelBackgrounds = [];
|
||||||
forEach(this.allBackgrounds, bg => {
|
forEach(this.allBackgrounds, bg => {
|
||||||
if (bg.set === 'incentiveBackgrounds') {
|
if (bg.set === 'incentiveBackgrounds') {
|
||||||
this.standardBackgroundMax += 1;
|
this.standardBackgroundMax += 1;
|
||||||
}
|
}
|
||||||
if (this.user.purchased.background[bg.key]) {
|
if (this.user.purchased.background[bg.key]) {
|
||||||
if (bg.set === 'incentiveBackgrounds') {
|
if (bg.set === 'eventBackgrounds') {
|
||||||
|
this.eventBackgrounds.push(bg);
|
||||||
|
} else if (bg.set === 'incentiveBackgrounds') {
|
||||||
this.standardBackgrounds.push(bg);
|
this.standardBackgrounds.push(bg);
|
||||||
} else if (bg.set === 'timeTravelBackgrounds') {
|
} else if (bg.set === 'timeTravelBackgrounds') {
|
||||||
this.timeTravelBackgrounds.push(bg);
|
this.timeTravelBackgrounds.push(bg);
|
||||||
|
|||||||
Reference in New Issue
Block a user