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