From 8a88d165e6da9fa985caef3bd05c74136c1b9e91 Mon Sep 17 00:00:00 2001 From: Sabe Jones Date: Tue, 2 Apr 2024 11:28:07 -0500 Subject: [PATCH 1/4] fix(event): end AF earlier --- website/common/script/content/constants/events.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/common/script/content/constants/events.js b/website/common/script/content/constants/events.js index a328cc5ae9..e0f85d9a43 100644 --- a/website/common/script/content/constants/events.js +++ b/website/common/script/content/constants/events.js @@ -17,7 +17,7 @@ export const EVENTS = { }, aprilFools2024: { start: '2024-04-01T00:00-04:00', - end: '2024-04-02T20:00-04:00', + end: '2024-04-02T08:00-04:00', aprilFools: 'Fungi', }, spring2024: { From 5a9f2c610a8b5404847dd1a153a1e23279d28204 Mon Sep 17 00:00:00 2001 From: Sabe Jones Date: Tue, 2 Apr 2024 15:20:04 -0500 Subject: [PATCH 2/4] Revert "fix(content): adjust release dates" This reverts commit 0b230b0a87e626f9fd5d91b444379976a9fbe41b. --- website/common/script/content/appearance/backgrounds.js | 2 +- website/common/script/content/gear/sets/armoire.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/website/common/script/content/appearance/backgrounds.js b/website/common/script/content/appearance/backgrounds.js index fd2f0f344d..24f174c779 100644 --- a/website/common/script/content/appearance/backgrounds.js +++ b/website/common/script/content/appearance/backgrounds.js @@ -666,7 +666,7 @@ const releaseDates = { backgrounds012024: '2024-01-04T08:00-05:00', backgrounds022024: '2024-02-06T08:00-05:00', backgrounds032024: '2024-03-05T08:00-05:00', - backgrounds042024: '2024-04-04T00:00-04:00', + backgrounds042024: '2023-04-04T00:00-04:00', }; const flat = {}; diff --git a/website/common/script/content/gear/sets/armoire.js b/website/common/script/content/gear/sets/armoire.js index e55f8ce35d..fb68285d2b 100644 --- a/website/common/script/content/gear/sets/armoire.js +++ b/website/common/script/content/gear/sets/armoire.js @@ -1806,7 +1806,7 @@ const releaseDates = { schoolUniform: '2024-01-04T08:00-05:00', whiteLoungeWear: '2024-02-06T08:00-05:00', hatterSet: '2024-03-05T08:00-05:00', - optimistSet: '2024-04-04T00:00-05:00', + optimistSet: '2024-03-05T00:00-05:00', }; forEach({ From 76d7f02fe8bac89abe1111c9eb72b8459a4d2895 Mon Sep 17 00:00:00 2001 From: Sabe Jones Date: Tue, 2 Apr 2024 15:20:17 -0500 Subject: [PATCH 3/4] 5.22.3 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3362e5f72b..384d85e20d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "habitica", - "version": "5.22.2", + "version": "5.22.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "habitica", - "version": "5.22.2", + "version": "5.22.3", "hasInstallScript": true, "dependencies": { "@babel/core": "^7.22.10", diff --git a/package.json b/package.json index b135130061..6d82303421 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "habitica", "description": "A habit tracker app which treats your goals like a Role Playing Game.", - "version": "5.22.2", + "version": "5.22.3", "main": "./website/server/index.js", "dependencies": { "@babel/core": "^7.22.10", From 37731b236a98e6d6afcc2138ef6e1585ed7ff0eb Mon Sep 17 00:00:00 2001 From: Sabe Jones Date: Tue, 2 Apr 2024 17:58:06 -0500 Subject: [PATCH 4/4] WIP(shop): add item names and unlocking --- .../client/src/components/shops/buyModal.vue | 25 ++-- .../components/shops/customizations/index.vue | 9 +- .../src/components/shops/market/index.vue | 5 + website/client/src/components/ui/itemRows.vue | 14 +- .../src/components/ui/layoutSection.vue | 19 +-- website/common/locales/en/customizations.json | 127 ++++++++++++++++++ .../script/content/appearance/hair/base.js | 41 +++--- .../script/content/appearance/hair/beard.js | 9 +- .../content/appearance/hair/mustache.js | 7 +- .../script/content/appearance/prefill.js | 4 + website/common/script/libs/getItemInfo.js | 12 ++ 11 files changed, 218 insertions(+), 54 deletions(-) create mode 100644 website/common/locales/en/customizations.json diff --git a/website/client/src/components/shops/buyModal.vue b/website/client/src/components/shops/buyModal.vue index 1eb7fbb2bc..3396cf2621 100644 --- a/website/client/src/components/shops/buyModal.vue +++ b/website/client/src/components/shops/buyModal.vue @@ -541,10 +541,6 @@ margin: auto -1rem -1rem; } - // .pt-015 { - // padding-top: 0.15rem; - // } - .gems-left { height: 32px; background-color: $green-100; @@ -596,8 +592,10 @@ import moment from 'moment'; import planGemLimits from '@/../../common/script/libs/planGemLimits'; import { drops as dropEggs } from '@/../../common/script/content/eggs'; import { drops as dropPotions } from '@/../../common/script/content/hatching-potions'; -import spellsMixin from '@/mixins/spells'; +import { avatarEditorUtilities } from '@/mixins/avatarEditUtilities'; import numberInvalid from '@/mixins/numberInvalid'; +import spellsMixin from '@/mixins/spells'; +import sync from '@/mixins/sync'; import svgClose from '@/assets/svg/close.svg'; import svgGold from '@/assets/svg/gold.svg'; @@ -644,7 +642,15 @@ export default { CountdownBanner, numberIncrement, }, - mixins: [buyMixin, currencyMixin, notifications, numberInvalid, spellsMixin], + mixins: [ + avatarEditorUtilities, + buyMixin, + currencyMixin, + notifications, + numberInvalid, + spellsMixin, + sync, + ], props: { // eslint-disable-next-line vue/require-default-prop item: { @@ -754,7 +760,7 @@ export default { this.selectedAmountToBuy = 1; }, - buyItem () { + async buyItem () { // @TODO: I think we should buying to the items. // Turn the items into classes, and use polymorphism if (this.item.buy) { @@ -827,7 +833,10 @@ export default { return; } - if (this.genericPurchase) { + if (this.item.purchaseType === 'customization') { + await this.unlock(this.item.path); + this.sync(); + } else if (this.genericPurchase) { this.makeGenericPurchase(this.item, 'buyModal', this.selectedAmountToBuy); this.purchased(this.item.text); } diff --git a/website/client/src/components/shops/customizations/index.vue b/website/client/src/components/shops/customizations/index.vue index a7d0233b3b..1c7bfc57aa 100644 --- a/website/client/src/components/shops/customizations/index.vue +++ b/website/client/src/components/shops/customizations/index.vue @@ -51,6 +51,7 @@ div:nth-of-type(8n) { - margin-right: 0px; - } - } - .npc { background-repeat: no-repeat; } diff --git a/website/client/src/components/shops/market/index.vue b/website/client/src/components/shops/market/index.vue index 7235ec8d4e..25af92bc2a 100644 --- a/website/client/src/components/shops/market/index.vue +++ b/website/client/src/components/shops/market/index.vue @@ -35,6 +35,7 @@ :hide-pinned="hidePinned" :hide-locked="hideLocked" :search-by="searchTextThrottled" + class="mb-4" />
@@ -121,6 +122,10 @@ height: 112px; } + .items { + max-width: 944px; + } + .market { .avatar { cursor: default; diff --git a/website/client/src/components/ui/itemRows.vue b/website/client/src/components/ui/itemRows.vue index 0dae56b50e..52d850ab14 100644 --- a/website/client/src/components/ui/itemRows.vue +++ b/website/client/src/components/ui/itemRows.vue @@ -18,7 +18,7 @@

@@ -29,7 +29,11 @@ @import '~@/assets/scss/colors.scss'; .item-rows { - margin-right: -1.5rem; + max-width: 944px; + } + + .btn-show-more { + max-width: 920px; } @@ -64,6 +68,10 @@ export default { maxItemsPerRow: { type: Number, }, + foldButton: { + type: Boolean, + default: true, + }, }, data () { return { @@ -82,7 +90,7 @@ export default { }, }, created () { - this.showAll = this.$_openedItemRows_isToggled(this.type); + this.showAll = this.$_openedItemRows_isToggled(this.type) || !this.foldButton; }, methods: { toggleItemsToShow () { diff --git a/website/client/src/components/ui/layoutSection.vue b/website/client/src/components/ui/layoutSection.vue index cabc28e630..956f06d384 100644 --- a/website/client/src/components/ui/layoutSection.vue +++ b/website/client/src/components/ui/layoutSection.vue @@ -1,5 +1,5 @@