Staging fixes (#9804)

* Fixed party member loading

* Fixed quest details

* Fixed party creating

* Fixed challenge habit restore streak permissions

* Fixed fetch recent messages for party

* Adjusted category box placement for challenges

* Fixed zindex for input on group

* Changed reset streak restriction and allowed for adjust streak
This commit is contained in:
Keith Holliday
2018-01-15 10:21:08 -07:00
committed by GitHub
parent 0ea91016f8
commit d87db40c52
9 changed files with 29 additions and 18 deletions

View File

@@ -124,7 +124,7 @@
}
.category-box {
top: -120px !important;
top: 20em !important;
z-index: 10;
}
}

View File

@@ -539,7 +539,7 @@ export default {
}
if (this.isParty) {
await this.$store.dispatch('party:getParty');
await this.$store.dispatch('party:getParty', true);
this.group = this.$store.state.party.data;
this.checkForAchievements();
} else {
@@ -599,10 +599,14 @@ export default {
if (this.isParty) {
data.type = 'party';
Analytics.updateUser({partySize: null, partyID: null});
this.$store.state.party.members = [];
this.$store.state.partyMembers = [];
}
await this.$store.dispatch('guilds:leave', data);
if (this.isParty) {
this.$router.push({name: 'tasks'});
}
},
upgradeGroup () {
this.$store.state.upgradingGroup = this.group;

View File

@@ -107,6 +107,10 @@
<style lang="scss" scoped>
@import '~client/assets/scss/colors.scss';
.custom-control-input {
z-index: 1 !important;
}
.svg-icon {
width: 16px;
}

View File

@@ -134,7 +134,7 @@
</style>
<script>
import { mapState } from 'client/libs/store';
import { mapState, mapGetters } from 'client/libs/store';
import quests from 'common/script/content/quests';
import copyIcon from 'assets/svg/copy.svg';
@@ -173,7 +173,9 @@ export default {
computed: {
...mapState({
user: 'user.data',
partyMembers: 'partyMembers.data',
}),
...mapGetters({
partyMembers: 'party:members',
}),
questData () {
return quests.quests[this.group.quest.key];

View File

@@ -125,16 +125,14 @@ export default {
data () {
return {
expandedMember: null,
currentWidth: 0,
};
},
computed: {
...mapGetters({
user: 'user:data',
partyMembers: 'partyMembers',
partyMembers: 'party:members',
}),
showHeader () {
if (this.$store.state.hideHeader) return false;
return true;
@@ -176,8 +174,10 @@ export default {
}
},
},
created () {
if (this.user.party && this.user.party._id) this.getPartyMembers();
async created () {
if (this.user.party && this.user.party._id) {
await this.getPartyMembers(true);
}
},
};
</script>

View File

@@ -16,9 +16,9 @@
:disabled="groupAccessRequiredAndOnPersonalPage || challengeAccessRequired"
)
.form-group
label.d-flex.align-items-center.justify-content-between(v-once)
label.d-flex.align-items-center.justify-content-between(v-once)
span {{ $t('notes') }}
small(v-once)
small(v-once)
a(target="_blank", href="http://habitica.wikia.com/wiki/Markdown_Cheat_Sheet") {{ $t('markdownHelpLink') }}
textarea.form-control(v-model="task.notes", rows="3")
@@ -30,7 +30,7 @@
.input-group-prepend.input-group-icon
.svg-icon.gold(v-html="icons.gold")
input.form-control(type="number", v-model="task.value", required, placeholder="1.0", step="0.01", min="0")
.option.mt-0(v-if="checklistEnabled")
label(v-once) {{ $t('checklist') }}
br
@@ -151,7 +151,7 @@
.option(v-if="task.type === 'habit'")
.form-group
label(v-once) {{ $t('resetStreak') }}
b-dropdown.inline-dropdown(:text="$t(task.frequency)")
b-dropdown.inline-dropdown(:text="$t(task.frequency)", :disabled='challengeAccessRequired')
b-dropdown-item(v-for="frequency in ['daily', 'weekly', 'monthly']", :key="frequency", @click="task.frequency = frequency", :class="{active: task.frequency === frequency}")
| {{ $t(frequency) }}
@@ -226,7 +226,7 @@
.option(v-if="isUserTask && task.type !== 'reward'")
.form-group
label(v-once)
label(v-once)
span.float-left {{ $t('attributeAllocation') }}
.svg-icon.info-icon(v-html="icons.information", v-b-tooltip.hover.righttop.html="$t('attributeAllocationHelp')")
.attributes

View File

@@ -78,7 +78,8 @@ export async function leave (store, payload) {
store.state.myGuilds.splice(guildIndex, 1);
} else if (payload.type === 'party') {
store.state.user.data.party._id = null;
store.state.party = {};
store.state.party.data = {};
store.state.party.status = 'NOT_LOADED';
}
return response.data.data;

View File

@@ -22,4 +22,4 @@ export function getParty (store, forceLoad = false) {
},
forceLoad,
});
}
}

View File

@@ -1,3 +1,3 @@
export function members (store) {
return store.state.partyMembers.data;
}
}