Merge branch 'release' into develop
@@ -1,6 +1,5 @@
|
||||
import moment from 'moment';
|
||||
import {
|
||||
hasActiveOnboarding,
|
||||
hasCompletedOnboarding,
|
||||
onOnboardingComplete,
|
||||
checkOnboardingStatus,
|
||||
@@ -17,19 +16,6 @@ describe('onboarding', () => {
|
||||
user.auth.timestamps.created = moment('2019-12-20').toDate();
|
||||
});
|
||||
|
||||
describe('hasActiveOnboarding', () => {
|
||||
// The value of BEGIN DATE is available in common/script/libs/onboarding
|
||||
|
||||
it('returns true if the account is created after BEGIN_DATE', () => {
|
||||
expect(hasActiveOnboarding(user)).to.eql(true);
|
||||
});
|
||||
|
||||
it('returns false if the account is created before BEGIN_DATE', () => {
|
||||
user.auth.timestamps.created = moment('2019-12-01').toDate();
|
||||
expect(hasActiveOnboarding(user)).to.eql(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('hasCompletedOnboarding', () => {
|
||||
it('returns false if no achievement has been awarded', () => {
|
||||
const result = hasCompletedOnboarding(user);
|
||||
|
||||
@@ -544,6 +544,6 @@ export default {
|
||||
<style src="@/assets/css/sprites/spritesmith-main-27.css"></style>
|
||||
<style src="@/assets/css/sprites/spritesmith-main-28.css"></style>
|
||||
<style src="@/assets/css/sprites/spritesmith-main-29.css"></style>
|
||||
<!-- <style src="@/assets/css/sprites/spritesmith-main-30.css"></style> -->
|
||||
<style src="@/assets/css/sprites/spritesmith-main-30.css"></style>
|
||||
<style src="@/assets/css/sprites.css"></style>
|
||||
<style src="smartbanner.js/dist/smartbanner.min.css"></style>
|
||||
|
||||
@@ -0,0 +1,312 @@
|
||||
.Pet-Yarn-Shade {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: 0px 0px;
|
||||
width: 81px;
|
||||
height: 99px;
|
||||
}
|
||||
.Pet-Yarn-Skeleton {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -82px 0px;
|
||||
width: 81px;
|
||||
height: 99px;
|
||||
}
|
||||
.Pet-Yarn-White {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -164px 0px;
|
||||
width: 81px;
|
||||
height: 99px;
|
||||
}
|
||||
.Pet-Yarn-Zombie {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: 0px -100px;
|
||||
width: 81px;
|
||||
height: 99px;
|
||||
}
|
||||
.Pet_HatchingPotion_Amber {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -82px -100px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Aquatic {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -151px -100px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Aurora {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -246px 0px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_AutumnLeaf {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -246px -69px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Base {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: 0px -200px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_BirchBark {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -69px -200px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_BlackPearl {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -138px -200px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Bronze {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -207px -200px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Celestial {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -315px 0px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_CottonCandyBlue {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -315px -69px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_CottonCandyPink {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -315px -138px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Cupid {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: 0px -269px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Desert {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -69px -269px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Ember {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -138px -269px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Fairy {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -207px -269px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Floral {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -276px -269px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Fluorite {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -384px 0px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Frost {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -384px -69px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Ghost {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -384px -138px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Glass {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -384px -207px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Glow {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: 0px -338px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Golden {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -69px -338px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Holly {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -138px -338px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_IcySnow {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -207px -338px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Peppermint {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -276px -338px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_PolkaDot {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -345px -338px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Purple {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -453px 0px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Rainbow {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -453px -69px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Red {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -453px -138px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_RoseQuartz {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -453px -207px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_RoyalPurple {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -453px -276px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Ruby {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: 0px -407px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_SandSculpture {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -69px -407px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Shade {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -138px -407px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Shadow {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -207px -407px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Shimmer {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -276px -407px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Silver {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -345px -407px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Skeleton {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -414px -407px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Spooky {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -522px 0px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_StainedGlass {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -522px -69px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_StarryNight {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -522px -138px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Sunshine {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -522px -207px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Thunderstorm {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -522px -276px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Turquoise {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -522px -345px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Vampire {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: 0px -476px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Watery {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -69px -476px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_White {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -138px -476px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
.Pet_HatchingPotion_Zombie {
|
||||
background-image: url('~@/assets/images/sprites/spritesmith-main-30.png');
|
||||
background-position: -207px -476px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 156 KiB After Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 169 KiB After Width: | Height: | Size: 170 KiB |
|
Before Width: | Height: | Size: 141 KiB After Width: | Height: | Size: 142 KiB |
|
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 138 KiB |
|
Before Width: | Height: | Size: 180 KiB After Width: | Height: | Size: 174 KiB |
|
Before Width: | Height: | Size: 158 KiB After Width: | Height: | Size: 162 KiB |
|
Before Width: | Height: | Size: 153 KiB After Width: | Height: | Size: 149 KiB |
|
Before Width: | Height: | Size: 149 KiB After Width: | Height: | Size: 151 KiB |
|
Before Width: | Height: | Size: 161 KiB After Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 151 KiB |
|
Before Width: | Height: | Size: 182 KiB After Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 174 KiB After Width: | Height: | Size: 189 KiB |
|
Before Width: | Height: | Size: 162 KiB After Width: | Height: | Size: 166 KiB |
|
Before Width: | Height: | Size: 172 KiB After Width: | Height: | Size: 174 KiB |
|
After Width: | Height: | Size: 16 KiB |
@@ -114,10 +114,7 @@
|
||||
<script>
|
||||
import { mapState, mapActions } from '@/libs/store';
|
||||
import * as quests from '@/../../common/script/content/quests';
|
||||
import {
|
||||
hasCompletedOnboarding,
|
||||
hasActiveOnboarding,
|
||||
} from '@/../../common/script/libs/onboarding';
|
||||
import { hasCompletedOnboarding } from '@/../../common/script/libs/onboarding';
|
||||
import notificationsIcon from '@/assets/svg/notifications.svg';
|
||||
import MenuDropdown from '../ui/customMenuDropdown';
|
||||
import MessageCount from './messageCount';
|
||||
@@ -300,7 +297,7 @@ export default {
|
||||
return this.$store.getters['members:hasClass'](this.user);
|
||||
},
|
||||
showOnboardingGuide () {
|
||||
return hasActiveOnboarding(this.user) && !hasCompletedOnboarding(this.user);
|
||||
return !hasCompletedOnboarding(this.user);
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
|
||||
@@ -302,6 +302,7 @@
|
||||
"hatchingPotionAutumnLeaf": "Autumn Leaf",
|
||||
"hatchingPotionBlackPearl": "Black Pearl",
|
||||
"hatchingPotionStainedGlass": "Stained Glass",
|
||||
"hatchingPotionPolkaDot": "Polka Dot",
|
||||
|
||||
"hatchingPotionNotes": "Pour this on an egg, and it will hatch as a <%= potText(locale) %> pet.",
|
||||
"premiumPotionAddlNotes": "Not usable on quest pet eggs. Available for purchase until <%= date(locale) %>.",
|
||||
|
||||
@@ -729,7 +729,7 @@
|
||||
"questAlligatorUnlockText": "Unlocks Alligator Eggs for purchase in the Market",
|
||||
|
||||
"oddballsText": "Oddballs Quest Bundle",
|
||||
"oddballsNotes": "Contains 'The Jelly Regent,' 'Escape the Cave Creature,' and 'A Tangled Yarn.' Available until June 30.",
|
||||
"oddballsNotes": "Contains 'The Jelly Regent,' 'Escape the Cave Creature,' and 'A Tangled Yarn.' Available until April 30.",
|
||||
|
||||
"birdBuddiesText": "Bird Buddies Quest Bundle",
|
||||
"birdBuddiesNotes": "Contains 'The Fowl Frost,' 'Rooster Rampage,' and 'The Push-and-Pull Peacock.' Available until December 31.",
|
||||
|
||||
@@ -191,6 +191,14 @@ const premium = {
|
||||
value: 2,
|
||||
text: t('hatchingPotionRainbow'),
|
||||
limited: true,
|
||||
_addlNotes: t('eventAvailabilityReturning', {
|
||||
availableDate: t('dateEndMarch'),
|
||||
previousDate: t('marchYYYY', { year: 2019 }),
|
||||
}),
|
||||
event: EVENTS.spring2021,
|
||||
canBuy () {
|
||||
return moment().isBefore('2021-04-30T20:00-04:00');
|
||||
},
|
||||
},
|
||||
Glass: {
|
||||
value: 2,
|
||||
@@ -340,12 +348,13 @@ const premium = {
|
||||
text: t('hatchingPotionBirchBark'),
|
||||
limited: true,
|
||||
event: EVENTS.spring2020,
|
||||
canBuy () {
|
||||
return moment().isBefore('2020-05-02');
|
||||
},
|
||||
_addlNotes: t('premiumPotionAddlNotes', {
|
||||
date: t('dateEndMarch'),
|
||||
_addlNotes: t('eventAvailabilityReturning', {
|
||||
availableDate: t('dateEndMarch'),
|
||||
previousDate: t('marchYYYY', { year: 2020 }),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBefore('2021-04-30T20:00-04:00');
|
||||
},
|
||||
},
|
||||
Fluorite: {
|
||||
value: 2,
|
||||
@@ -422,6 +431,18 @@ const premium = {
|
||||
return moment().isBetween('2020-12-22T08:00-04:00', '2021-01-31T20:00-04:00');
|
||||
},
|
||||
},
|
||||
PolkaDot: {
|
||||
value: 2,
|
||||
text: t('hatchingPotionPolkaDot'),
|
||||
limited: true,
|
||||
event: EVENTS.spring2021,
|
||||
_addlNotes: t('premiumPotionAddlNotes', {
|
||||
date: t('dateEndMarch'),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBefore('2021-04-30T20:00-04:00');
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const wacky = {
|
||||
|
||||
@@ -1,12 +1,3 @@
|
||||
import moment from 'moment';
|
||||
|
||||
const BEGIN_DATE = moment('2019-12-18');
|
||||
|
||||
// Only users that signed up after the BEGIN DATE should see the onboarding
|
||||
export function hasActiveOnboarding (user) {
|
||||
return BEGIN_DATE.isBefore(user.auth.timestamps.created);
|
||||
}
|
||||
|
||||
export function hasCompletedOnboarding (user) {
|
||||
return (
|
||||
user.achievements.createdTask === true
|
||||
@@ -24,7 +15,7 @@ export function onOnboardingComplete (user) {
|
||||
|
||||
// Add notification and awards (server)
|
||||
export function checkOnboardingStatus (user, req, analytics) {
|
||||
if (hasActiveOnboarding(user) && hasCompletedOnboarding(user) && user.addNotification) {
|
||||
if (hasCompletedOnboarding(user) && user.addNotification) {
|
||||
user.addNotification('ONBOARDING_COMPLETE');
|
||||
if (analytics) {
|
||||
analytics.track('onboarding complete', {
|
||||
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 821 B |
|
After Width: | Height: | Size: 740 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 938 B |
|
After Width: | Height: | Size: 723 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 923 B |
|
After Width: | Height: | Size: 632 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 858 B |
|
After Width: | Height: | Size: 674 B |
|
After Width: | Height: | Size: 781 B |
|
After Width: | Height: | Size: 870 B |
|
After Width: | Height: | Size: 847 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 841 B |
|
After Width: | Height: | Size: 942 B |
|
After Width: | Height: | Size: 921 B |
|
After Width: | Height: | Size: 856 B |
|
After Width: | Height: | Size: 896 B |
|
After Width: | Height: | Size: 965 B |
|
After Width: | Height: | Size: 764 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 925 B |
|
After Width: | Height: | Size: 834 B |
|
After Width: | Height: | Size: 722 B |
|
After Width: | Height: | Size: 912 B |
|
After Width: | Height: | Size: 982 B |
|
After Width: | Height: | Size: 821 B |
|
After Width: | Height: | Size: 864 B |
|
After Width: | Height: | Size: 721 B |
|
After Width: | Height: | Size: 877 B |
|
After Width: | Height: | Size: 875 B |
|
After Width: | Height: | Size: 644 B |