From 7936677fd804033ef43e0e2cd9fd8154901009a9 Mon Sep 17 00:00:00 2001 From: Sabe Jones Date: Wed, 22 May 2024 09:16:13 -0500 Subject: [PATCH] WIP(shops): empty states and deselect UX --- .../components/avatarModal/extra-settings.vue | 5 ++++ .../client/src/components/creatorIntro.vue | 30 +++++++++++++++---- .../shops/market/equipmentSection.vue | 14 ++++++++- .../client/src/mixins/avatarEditUtilities.js | 3 ++ website/client/src/store/actions/user.js | 4 +++ website/common/locales/en/gear.json | 4 ++- 6 files changed, 52 insertions(+), 8 deletions(-) diff --git a/website/client/src/components/avatarModal/extra-settings.vue b/website/client/src/components/avatarModal/extra-settings.vue index b821ba919e..470abd7ffb 100644 --- a/website/client/src/components/avatarModal/extra-settings.vue +++ b/website/client/src/components/avatarModal/extra-settings.vue @@ -208,6 +208,11 @@ export default { for (const key of keys) { const option = this.createGearItem(key, 'headAccessory', 'special', 'headband'); + const newKey = `headAccessory_special_${key}`; + option.click = () => { + const type = this.user.preferences.costume ? 'costume' : 'equipped'; + return this.equip(newKey, type); + }; options.push(option); } diff --git a/website/client/src/components/creatorIntro.vue b/website/client/src/components/creatorIntro.vue index cff5f47a8f..56d871bb44 100644 --- a/website/client/src/components/creatorIntro.vue +++ b/website/client/src/components/creatorIntro.vue @@ -176,10 +176,16 @@ :id="bg.key" :key="bg.key" class="background-item" - :class="{selected: bg.key === user.preferences.background}" + :class="{ selected: bg.key === user.preferences.background }" @click="unlock('background.' + bg.key)" >
+
+
@@ -264,7 +270,7 @@ > {{ $t('monthlyBackgrounds') }}
-
+
bg.key, 'desc'); + this.standardBackgrounds.splice(0, 0, { key: '', notes: () => this.$t('noBackground') }); if (this.editing) this.modalPage = 2; }, methods: { diff --git a/website/client/src/components/shops/market/equipmentSection.vue b/website/client/src/components/shops/market/equipmentSection.vue index 4bc28229c1..419dd288f5 100644 --- a/website/client/src/components/shops/market/equipmentSection.vue +++ b/website/client/src/components/shops/market/equipmentSection.vue @@ -42,7 +42,7 @@ :item-width="94" :item-margin="24" :type="'gear'" - :no-items-label="$t('noGearItemsOfClass')" + :no-items-label="noItemsLabel" >