fix(shops): various

This commit is contained in:
Sabe Jones 2024-04-24 17:58:20 -05:00
parent 3bf323032c
commit 372763c57c
9 changed files with 24 additions and 18 deletions

View file

@ -1,7 +1,8 @@
<template>
<div
id="body"
class="customize-section d-flex flex-column justify-content-between"
class="customize-section d-flex flex-column"
:class="{ 'justify-content-between': editing }"
>
<sub-menu
class="text-center"
@ -21,7 +22,7 @@
:current-value="user.preferences.shirt"
/>
</div>
<customize-banner />
<customize-banner v-if="editing" />
</div>
</template>

View file

@ -66,7 +66,7 @@
></p>
</div>
<customize-banner
v-else
v-else-if="editing"
/>
</div>
</template>

View file

@ -2,7 +2,7 @@
<div
id="hair"
class="customize-section d-flex flex-column"
:class="{ 'justify-content-between': !showEmptySection}"
:class="{ 'justify-content-between': editing && !showEmptySection}"
>
<sub-menu
class="text-center"
@ -42,11 +42,11 @@
id="facialhair"
>
<customize-options
v-if="editing && userMustaches.length > 1"
v-if="userMustaches.length > 1"
:items="userMustaches"
/>
<customize-options
v-if="editing && userBeards.length > 1"
v-if="userBeards.length > 1"
:items="userBeards"
/>
<div
@ -64,7 +64,7 @@
</div>
</div>
<customize-banner
v-if="!showEmptySection"
v-if="editing && !showEmptySection"
/>
</div>
</template>
@ -169,7 +169,7 @@ export default {
return [none, ...options];
},
showEmptySection () {
return this.editing && this.activeSubPage === 'facialhair'
return this.activeSubPage === 'facialhair'
&& this.userMustaches.length === 1 && this.userBeards.length === 1;
},
},

View file

@ -1,7 +1,8 @@
<template>
<div
id="skin"
class="customize-section d-flex flex-column justify-content-between"
class="customize-section d-flex flex-column"
:class="{ 'justify-content-between': editing }"
>
<sub-menu
class="text-center"
@ -13,7 +14,7 @@
:items="userSkins"
:current-value="user.preferences.skin"
/>
<customize-banner />
<customize-banner v-if="editing" />
</div>
</template>

View file

@ -301,7 +301,7 @@
/>
</div>
</div>
<customize-banner />
<customize-banner class="padding-fix"/>
</div>
<div v-else>
<h3 v-once> {{ $t('noItemsOwned') }} </h3>
@ -643,6 +643,10 @@
line-height: 24px;
}
.padding-fix {
padding-top: 1px;
}
.purchase-all {
margin-bottom: 1em;
}

View file

@ -70,7 +70,7 @@ export const avatarEditorUtilities = { // eslint-disable-line import/prefer-defa
}
case 'hair': {
if (subType === 'color') {
str += `hair_bangs_1_${key}`; // todo get current hair-bang setting
str += `hair_bangs_${this.user.preferences.hair.bangs || 1}_${key}`; // todo get current hair-bang setting
} else {
str += `hair_${subType}_${key}_${this.user.preferences.hair.color}`;
}
@ -81,8 +81,7 @@ export const avatarEditorUtilities = { // eslint-disable-line import/prefer-defa
break;
}
default: {
// `hair_base_${option.key}_${user.preferences.hair.color}`
// console.warn('unknown type', type, key);
throw new Error(`unknown type ${type} ${subType} ${key}`);
}
}

View file

@ -128,5 +128,6 @@
"checkNextMonth": "Be sure to check back later for next month's options!",
"checkNextSeason": "Be sure to check back later for next season's options!",
"noItemsOwned": "You don't own any of these items",
"visitCustomizationsShop": "Head over to the <a href='/shops/customizations'>Customizations Shop</a> to browse the many ways you can customize your avatar!"
"visitCustomizationsShop": "Head over to the <a href='/shops/customizations'>Customizations Shop</a> to browse the many ways you can customize your avatar!",
"lookingForMore": "Looking for more?"
}

View file

@ -856,10 +856,10 @@ export function getScheduleMatchingGroup (type, date) {
cachedScheduleMatchers[matcher.type] = makeMatcherClass();
}
let end = moment(checkedDate);
end.date(TYPE_SCHEDULE[type]);
end.date(TYPE_SCHEDULE[matcher.type]);
if (end.date() <= moment(checkedDate).date()) {
end = moment(end).add(1, 'months');
}
}
cachedScheduleMatchers[matcher.type].end = end.toDate();
if (matcher.matcher instanceof Function) {
cachedScheduleMatchers[matcher.type].matchers.push(matcher.matcher);

View file

@ -384,7 +384,7 @@ export default function getItemInfo (user, type, item, officialPinnedItems, lang
case 'haircolor': {
itemInfo = {
key: item.key,
class: `hair hair_bangs_${user.preferences.hair.bangs}_${item.key}`,
class: `hair hair_bangs_${user.preferences.hair.bangs || 1}_${item.key}`,
currency: 'gems',
locked: false,
notes: '',