Skip to content

Commit

Permalink
Merge branch 'develop' into client/seasonal-shop
Browse files Browse the repository at this point in the history
  • Loading branch information
negue committed Sep 20, 2017
2 parents 55b6d37 + 7812e14 commit e8cc35e
Show file tree
Hide file tree
Showing 20 changed files with 249 additions and 151 deletions.
82 changes: 41 additions & 41 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions website/client/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ export default {
},
data () {
return {
isUserLoaded: false,
selectedItemToBuy: null,
selectedCardToBuy: null,
Expand All @@ -101,7 +100,7 @@ export default {
};
},
computed: {
...mapState(['isUserLoggedIn', 'browserTimezoneOffset']),
...mapState(['isUserLoggedIn', 'browserTimezoneOffset', 'isUserLoaded']),
...mapState({user: 'user.data'}),
isStaticPage () {
return this.$route.meta.requiresLogin === false ? true : false;
Expand Down Expand Up @@ -194,7 +193,7 @@ export default {
this.$store.dispatch('user:fetch'),
this.$store.dispatch('tasks:fetchUserTasks'),
]).then(() => {
this.isUserLoaded = true;
this.$store.state.isUserLoaded = true;
Analytics.setUser();
Analytics.updateUser();
Expand Down
45 changes: 23 additions & 22 deletions website/client/components/appFooter.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template lang="pug">
.row
buy-gems-modal
modify-inventory
buy-gems-modal(v-if="isUserLoaded")
modify-inventory(v-if="isUserLoaded")
footer.container-fluid
.row
.col-2
Expand Down Expand Up @@ -74,32 +74,32 @@
.row
.col-10 {{ $t('donateText3') }}
.col-2
button.btn.btn-donate(@click='donate()')
.svg-icon.heart(v-html='icons.heart')
button.btn.btn-donate(@click="donate()")
.svg-icon.heart(v-html="icons.heart")
.text {{ $t('companyDonate') }}
.row
hr.col-12
.row
.col-4
| © 2017 Habitica. All rights reserved.
.debug.float-left(v-if='!IS_PRODUCTION')
button.btn.btn-primary(@click='debugMenuShown = !debugMenuShown') Toggle Debug Menu
.debug-group(v-if='debugMenuShown')
a.btn.btn-default(@click='setHealthLow()') Health = 1
a.btn.btn-default(@click='addMissedDay(1)') +1 Missed Day
a.btn.btn-default(@click='addMissedDay(2)') +2 Missed Days
a.btn.btn-default(@click='addMissedDay(8)') +8 Missed Days
a.btn.btn-default(@click='addMissedDay(32)') +32 Missed Days
a.btn.btn-default(@click='addTenGems()') +10 Gems
a.btn.btn-default(@click='addHourglass()') +1 Mystic Hourglass
a.btn.btn-default(@click='addGold()') +500GP
a.btn.btn-default(@click='plusTenHealth()') + 10HP
a.btn.btn-default(@click='addMana()') +MP
a.btn.btn-default(@click='addLevelsAndGold()') +Exp +GP +MP
a.btn.btn-default(@click='addOneLevel()') +1 Level
a.btn.btn-default(@click='addQuestProgress()' tooltip="+1000 to boss quests. 300 items to collection quests") Quest Progress Up
a.btn.btn-default(@click='makeAdmin()') Make Admin
a.btn.btn-default(@click='openModifyInventoryModal()') Modify Inventory
.debug.float-left(v-if="!IS_PRODUCTION && isUserLoaded")
button.btn.btn-primary(@click="debugMenuShown = !debugMenuShown") Toggle Debug Menu
.debug-group(v-if="debugMenuShown")
a.btn.btn-default(@click="setHealthLow()") Health = 1
a.btn.btn-default(@click="addMissedDay(1)") +1 Missed Day
a.btn.btn-default(@click="addMissedDay(2)") +2 Missed Days
a.btn.btn-default(@click="addMissedDay(8)") +8 Missed Days
a.btn.btn-default(@click="addMissedDay(32)") +32 Missed Days
a.btn.btn-default(@click="addTenGems()") +10 Gems
a.btn.btn-default(@click="addHourglass()") +1 Mystic Hourglass
a.btn.btn-default(@click="addGold()") +500GP
a.btn.btn-default(@click="plusTenHealth()") + 10HP
a.btn.btn-default(@click="addMana()") +MP
a.btn.btn-default(@click="addLevelsAndGold()") +Exp +GP +MP
a.btn.btn-default(@click="addOneLevel()") +1 Level
a.btn.btn-default(@click="addQuestProgress()", tooltip="+1000 to boss quests. 300 items to collection quests") Quest Progress Up
a.btn.btn-default(@click="makeAdmin()") Make Admin
a.btn.btn-default(@click="openModifyInventoryModal()") Modify Inventory
.col-4.text-center
.logo
.col-4.text-right
Expand Down Expand Up @@ -252,6 +252,7 @@ export default {
},
computed: {
...mapState({user: 'user.data'}),
...mapState(['isUserLoaded']),
},
methods: {
plusTenHealth () {
Expand Down
2 changes: 2 additions & 0 deletions website/client/components/auth/registerLogin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ export default {
// @TODO do not reload entire page
// problem is that app.vue created hook should be called again
// after user is logged in / just signed up
// ALSO it's the only way to make sure language data is reloaded and correct for the logged in user
window.location.href = '/';
},
async login () {
Expand All @@ -318,6 +319,7 @@ export default {
// @TODO do not reload entire page
// problem is that app.vue created hook should be called again
// after user is logged in / just signed up
// ALSO it's the only way to make sure language data is reloaded and correct for the logged in user
window.location.href = '/';
},
async socialAuth (network) {
Expand Down
13 changes: 5 additions & 8 deletions website/client/components/groups/startQuestModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
}
}
.quest-details {
margin: 0 auto;
text-align: left;
Expand Down Expand Up @@ -112,8 +110,6 @@ import twitterIcon from 'assets/svg/twitter.svg';
import starIcon from 'assets/svg/star.svg';
import goldIcon from 'assets/svg/gold.svg';
import difficultyStarIcon from 'assets/svg/difficulty-star.svg';
import questDialogDrops from '../shops/quests/questDialogDrops';
import questDialogContent from '../shops/quests/questDialogContent';
Expand Down Expand Up @@ -165,13 +161,14 @@ export default {
partyID: this.group._id,
partySize: this.group.memberCount,
});
let groupId = this.group._id || this.user.party._id;
const key = this.selectedQuest;
const response = await this.$store.dispatch('guilds:inviteToQuest', {groupId: this.group._id, key});
const response = await this.$store.dispatch('guilds:inviteToQuest', {groupId, key});
const quest = response.data.data;
if (this.$store.state.party) {
this.$store.state.party.data.quest = quest;
}
if (this.$store.state.party.data) this.$store.state.party.data.quest = quest;
this.$root.$emit('hide::modal', 'start-quest-modal');
},
Expand Down
4 changes: 3 additions & 1 deletion website/client/components/notifications.vue
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ export default {
}
}, 1000),
scheduleNextCron () {
// Reset the yesterDailies array
this.yesterDailies = [];
// Open yesterdailies modal the next time cron runs
const dayStart = this.user.preferences.dayStart;
let nextCron = moment().hours(dayStart).minutes(0).seconds(0).milliseconds(0);
Expand Down Expand Up @@ -391,7 +394,6 @@ export default {
this.handleUserNotifications(this.user.notifications);
this.scheduleNextCron();
},
transferGroupNotification (notification) {
if (!this.user.groupNotifications) this.user.groupNotifications = [];
this.user.groupNotifications.push(notification);
Expand Down
9 changes: 3 additions & 6 deletions website/client/components/payments/amazonModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,10 @@ export default {
mounted () {
window.onAmazonLoginReady = () => {
window.amazon.Login.setClientId(AMAZON_PAYMENTS.CLIENT_ID);
this.OffAmazonPayments = window.OffAmazonPayments;
this.isAmazonReady = true;
this.showButton();
};
this.OffAmazonPayments = window.OffAmazonPayments;
this.isAmazonReady = true;
this.showButton();
// window.onAmazonPaymentsReady = () => {
// };
},
methods: {
showButton () {
Expand Down

0 comments on commit e8cc35e

Please sign in to comment.