mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
refactor(content): concatenate notes
This commit is contained in:
@@ -518,25 +518,25 @@ api.premiumHatchingPotions = {
|
||||
value: 2,
|
||||
text: t('hatchingPotionSpooky'),
|
||||
limited: true,
|
||||
season: 'fall',
|
||||
_season: 'fall',
|
||||
},
|
||||
Peppermint: {
|
||||
value: 2,
|
||||
text: t('hatchingPotionPeppermint'),
|
||||
limited: true,
|
||||
season: 'winter',
|
||||
_season: 'winter',
|
||||
},
|
||||
Floral: {
|
||||
value: 2,
|
||||
text: t('hatchingPotionFloral'),
|
||||
limited: true,
|
||||
season: 'spring',
|
||||
_season: 'spring',
|
||||
},
|
||||
Thunderstorm: {
|
||||
value: 2,
|
||||
text: t('hatchingPotionThunderstorm'),
|
||||
limited: true,
|
||||
season: 'summer',
|
||||
_season: 'summer',
|
||||
canBuy: (function() {
|
||||
return true;
|
||||
}),
|
||||
@@ -565,7 +565,7 @@ _.each(api.premiumHatchingPotions, function(pot, key) {
|
||||
notes: t('hatchingPotionNotes', {
|
||||
potText: pot.text
|
||||
}),
|
||||
addlNotes: t(`${pot.season}EventAvailability`),
|
||||
_addlNotes: t(`${pot._season}EventAvailability`),
|
||||
premium: true,
|
||||
limited: false,
|
||||
canBuy: (function() {
|
||||
|
||||
@@ -70,8 +70,7 @@ shops.getMarketCategories = function getMarket (user, language) {
|
||||
return {
|
||||
key: premiumHatchingPotion.key,
|
||||
text: premiumHatchingPotion.text(language),
|
||||
notes: premiumHatchingPotion.notes(language),
|
||||
addlNotes: premiumHatchingPotion.addlNotes(language),
|
||||
notes: `${premiumHatchingPotion.notes(language)} ${premiumHatchingPotion._addlNotes(language)}`,
|
||||
class: `Pet_HatchingPotion_${premiumHatchingPotion.key}`,
|
||||
value: premiumHatchingPotion.value,
|
||||
locked: false,
|
||||
|
||||
@@ -22,11 +22,7 @@ describe('shops', () => {
|
||||
it('items contain required fields', () => {
|
||||
_.each(shopCategories, (category) => {
|
||||
_.each(category.items, (item) => {
|
||||
if (item.addlNotes) {
|
||||
expect(item).to.have.all.keys(['key', 'text', 'notes', 'addlNotes', 'value', 'currency', 'locked', 'purchaseType', 'class']);
|
||||
} else {
|
||||
expect(item).to.have.all.keys(['key', 'text', 'notes', 'value', 'currency', 'locked', 'purchaseType', 'class']);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
|
||||
div(ng-repeat='item in category.items')
|
||||
button.customize-option(class='{{item.class}}',
|
||||
popover='{{item.notes}} {{item.addlNotes}}', popover-append-to-body='true',
|
||||
popover='{{item.notes}}', popover-append-to-body='true',
|
||||
popover-title!='{{item.text}}',
|
||||
popover-trigger='mouseenter', popover-placement='top',
|
||||
ng-click='purchase(category.identifier, item)')
|
||||
|
||||
Reference in New Issue
Block a user