mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-15 13:47:33 +01:00
feat(content): Oddballs Bundle
Also includes one more tweak to @mention text highlighting
This commit is contained in:
@@ -41,9 +41,12 @@ div
|
||||
<style lang="scss">
|
||||
.at-highlight {
|
||||
background-color: rgba(213, 200, 255, 0.32);
|
||||
color: #6133b4;
|
||||
padding: 0.1rem;
|
||||
}
|
||||
|
||||
.at-text {
|
||||
color: #6133b4;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -294,9 +297,22 @@ export default {
|
||||
this.$emit('show-member-modal', memberId);
|
||||
},
|
||||
atHighlight (text) {
|
||||
return text.replace(new RegExp(`@(${this.user.auth.local.username}|${this.user.profile.name})(?:\\b)`, 'gi'), match => {
|
||||
return `<span class="at-highlight">${match}</span>`;
|
||||
});
|
||||
const userRegex = new RegExp(`@(${this.user.auth.local.username}|${this.user.profile.name})(?:\\b)`, 'gi');
|
||||
const atRegex = new RegExp(/(?!\b)@[\w-]+/g);
|
||||
|
||||
if (userRegex.test(text)) {
|
||||
text = text.replace(userRegex, match => {
|
||||
return `<span class="at-highlight at-text">${match}</span>`;
|
||||
});
|
||||
}
|
||||
|
||||
if (atRegex.test(text)) {
|
||||
text = text.replace(atRegex, match => {
|
||||
return `<span class="at-text">${match}</span>`;
|
||||
});
|
||||
}
|
||||
|
||||
return text;
|
||||
},
|
||||
parseMarkdown (text) {
|
||||
return habiticaMarkdown.render(text);
|
||||
|
||||
@@ -724,5 +724,8 @@
|
||||
"questAlligatorCompletion": "With your attention focused on what’s important and not the Insta-Gator’s distractions, the Insta-Gator flees. Victory! “Are those eggs? They look like gator eggs to me,” asks @mfonda. “If we care for them correctly, they’ll be loyal pets or faithful steeds,” answers @UncommonCriminal, handing you three to care for. Let’s hope so, or else the Insta-Gator might make a return…",
|
||||
"questAlligatorBoss": "Insta-Gator",
|
||||
"questAlligatorDropAlligatorEgg": "Alligator (Egg)",
|
||||
"questAlligatorUnlockText": "Unlocks purchasable Alligator eggs in the Market"
|
||||
"questAlligatorUnlockText": "Unlocks purchasable Alligator eggs in the Market",
|
||||
|
||||
"oddballsText": "Oddballs Quest Bundle",
|
||||
"oddballsNotes": "Contains 'The Jelly Regent,' 'Escape the Cave Creature,' and 'A Tangled Yarn.' Available until November 30."
|
||||
}
|
||||
|
||||
@@ -197,6 +197,21 @@ api.bundles = {
|
||||
type: 'quests',
|
||||
value: 7,
|
||||
},
|
||||
oddballs: {
|
||||
key: 'oddballs',
|
||||
text: t('oddballsText'),
|
||||
notes: t('oddballsNotes'),
|
||||
bundleKeys: [
|
||||
'slime',
|
||||
'rock',
|
||||
'yarn',
|
||||
],
|
||||
canBuy () {
|
||||
return moment().isBetween('2018-11-15', '2018-12-02');
|
||||
},
|
||||
type: 'quests',
|
||||
value: 7,
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -30,8 +30,8 @@ const featuredItems = {
|
||||
path: 'quests.taskwoodsTerror1',
|
||||
},
|
||||
{
|
||||
type: 'quests',
|
||||
path: 'quests.kangaroo',
|
||||
type: 'bundles',
|
||||
path: 'bundles.oddballs',
|
||||
},
|
||||
],
|
||||
seasonal: '',
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
BIN
website/raw_sprites/spritesmith_large/promo_oddballs_bundle.png
Normal file
BIN
website/raw_sprites/spritesmith_large/promo_oddballs_bundle.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 95 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 7.4 KiB |
BIN
website/raw_sprites/spritesmith_large/scene_sleep.png
Normal file
BIN
website/raw_sprites/spritesmith_large/scene_sleep.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB |
@@ -3,7 +3,7 @@ import { authWithHeaders } from '../../middlewares/auth';
|
||||
let api = {};
|
||||
|
||||
// @TODO export this const, cannot export it from here because only routes are exported from controllers
|
||||
const LAST_ANNOUNCEMENT_TITLE = 'UNIQUE USERNAMES ARE HERE!';
|
||||
const LAST_ANNOUNCEMENT_TITLE = 'ODDBALLS PET QUEST BUNDLE AND SPOTLIGHT ON SLEEP';
|
||||
const worldDmg = { // @TODO
|
||||
bailey: false,
|
||||
};
|
||||
@@ -30,16 +30,20 @@ api.getNews = {
|
||||
<div class="mr-3 ${baileyClass}"></div>
|
||||
<div class="media-body">
|
||||
<h1 class="align-self-center">${res.t('newStuff')}</h1>
|
||||
<h2>11/14/2018 - ${LAST_ANNOUNCEMENT_TITLE}</h2>
|
||||
<h2>11/15/2018 - ${LAST_ANNOUNCEMENT_TITLE}</h2>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
<p>Hello Habiticans! We're excited to announce the launch of our unique username system! We've made this change so it’s easier to find and invite your friends to Parties, Guilds, and Challenges, mention people in chat, and more. In the future we hope to use this functionality to introduce even more useful features, such as the option to receive notifications if you are mentioned in chat.</p>
|
||||
<p>You can check and change your current Username in <a href='/user/settings/site' target='_blank'>Settings</a>. If you've just confirmed, check your Stable to find the Veteran Pet you've been given as a reward!</p>
|
||||
<p>If you’d like to learn more about this change, this <a href='https://habitica.wikia.com/wiki/Player_Names' target='_blank'>Wiki page</a> has more detailed information.</p>
|
||||
<p>Thank you for being patient as we make these changes to improve Habitica!</p>
|
||||
<div class="small mb-3">by Beffymaroo, SabreCat, Apollo, Piyo, viirus, Paglias, and TheHollidayInn</div>
|
||||
<div class="promo_veteran_pets center-block"></div>
|
||||
<div class="promo_oddballs_bundle center-block"></div>
|
||||
<h3>New Discounted Pet Quest Bundle: Oddballs!</h3>
|
||||
<p>If you are looking to add some goofy offbeat pets to your Habitica stable, you're in luck! From now until November 30, you can purchase the Oddball Pet Quest Bundle and receive the Rock, Marshmallow Slime, and Yarn quests, all for only 7 Gems! That's a discount of 5 Gems from the price of purchasing them separately. Check it out in the <a href='/shops/quests'>Quest Shop</a> today!</p>
|
||||
<div class="small">Art by PainterProphet, Pfeffernusse, Zorelya, intune, starsystemic, Leephon, Arcosine, stefalupagus, Hachiseiko, TheMushroomKing, khdarkwolf, Vampitch, JinjooHat, UncommonCriminal, Oranges, Darkly, overomega, celticdragon, and Shaner</div>
|
||||
<div class="small mb-3">Writing by Bartelmy, Faelwyn the Rising Phoenix, Theothermeme, Bethany Woll, itokro, and Lemoness</div>
|
||||
<div class="scene_sleep center-block"></div>
|
||||
<h3>Use Case Spotlight and Guild Spotlight on Sleep and Rest</h3>
|
||||
<p>We've got new posts on the blog all about ways to use Habitica to help you with self-care related to sleep and rest! First, there's a <a href='https://habitica.wordpress.com/2018/11/15/taking-a-break-guild-spotlight/' target='_blank'>Guild Spotlight</a> that highlights the Guilds that can help you as you explore ways to use Habitica to help with sleep hygiene and taking breaks. We've also posted a <a href='https://habitica.wordpress.com/2018/11/15/use-case-spotlight-sleep-and-rest/' target='_blank'>Use Case Spotlight</a> featuring a number of great suggestions for using Habitica's task system to manage this as well! These suggestions were submitted by Habiticans in the <a href='/groups/guild/1d3a10bf-60aa-4806-a38b-82d1084a59e6' target='_blank'>Use Case Spotlights Guild</a>.</p>
|
||||
<p>Plus, we're collecting user submissions for the next Use Case Spotlight! How do you use Habitica for professionalization and "adulting" skills? We’ll be featuring player-submitted examples in Use Case Spotlights on the Habitica Blog next month, so post your suggestions in the Use Case Spotlight Guild now. We look forward to learning more about how you use Habitica to improve your life and get things done!</p>
|
||||
<div class="small mb-3">by shanaqui</div>
|
||||
</div>
|
||||
`,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user