Merge branch 'develop' into fix-antidotes-from-revert
This commit is contained in:
@@ -225,32 +225,30 @@ export default {
|
||||
classGear (heroClass) {
|
||||
if (heroClass === 'rogue') {
|
||||
return {
|
||||
armor: 'armor_special_fall2019Rogue',
|
||||
eyewear: 'eyewear_special_fall2019Rogue',
|
||||
head: 'head_special_fall2019Rogue',
|
||||
shield: 'shield_special_fall2019Rogue',
|
||||
weapon: 'weapon_special_fall2019Rogue',
|
||||
armor: 'armor_rogue_5',
|
||||
head: 'head_rogue_5',
|
||||
shield: 'shield_rogue_6',
|
||||
weapon: 'weapon_rogue_6',
|
||||
};
|
||||
} if (heroClass === 'wizard') {
|
||||
return {
|
||||
armor: 'armor_special_fall2019Mage',
|
||||
head: 'head_special_fall2019Mage',
|
||||
weapon: 'weapon_special_fall2019Mage',
|
||||
armor: 'armor_wizard_5',
|
||||
head: 'head_wizard_5',
|
||||
weapon: 'weapon_wizard_6',
|
||||
};
|
||||
} if (heroClass === 'healer') {
|
||||
return {
|
||||
armor: 'armor_special_fall2019Healer',
|
||||
eyewear: 'eyewear_special_fall2019Healer',
|
||||
head: 'head_special_fall2019Healer',
|
||||
shield: 'shield_special_fall2019Healer',
|
||||
weapon: 'weapon_special_fall2019Healer',
|
||||
armor: 'armor_healer_5',
|
||||
head: 'head_healer_5',
|
||||
shield: 'shield_healer_5',
|
||||
weapon: 'weapon_healer_6',
|
||||
};
|
||||
}
|
||||
return {
|
||||
armor: 'armor_special_fall2019Warrior',
|
||||
head: 'head_special_fall2019Warrior',
|
||||
shield: 'shield_special_fall2019Warrior',
|
||||
weapon: 'weapon_special_fall2019Warrior',
|
||||
armor: 'armor_warrior_5',
|
||||
head: 'head_warrior_5',
|
||||
shield: 'shield_warrior_5',
|
||||
weapon: 'weapon_warrior_6',
|
||||
};
|
||||
},
|
||||
selectionBox (selectedClass, heroClass) {
|
||||
|
||||
@@ -33,8 +33,9 @@
|
||||
v-model="user.preferences.suppressModals.streak"
|
||||
type="checkbox"
|
||||
@change="suppressModals"
|
||||
id="user-preferences-suppressModals-streak"
|
||||
>
|
||||
<label>{{ $t('dontShowAgain') }}</label>
|
||||
<label for="user-preferences-suppressModals-streak">{{ $t('dontShowAgain') }}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -256,12 +256,18 @@ export default {
|
||||
none: true,
|
||||
};
|
||||
|
||||
sets.push({
|
||||
options: [
|
||||
emptyHairBase,
|
||||
...this.baseHair1.map(key => this.mapKeysToFreeOption(key, 'hair', 'base')),
|
||||
],
|
||||
});
|
||||
|
||||
if (this.editing) {
|
||||
sets.push({
|
||||
fullSet: !this.userOwnsSet('hair', this.baseHair3Keys, 'base'),
|
||||
unlock: () => this.unlock(`hair.base.${this.baseHair3Keys.join(',hair.base.')}`),
|
||||
options: [
|
||||
emptyHairBase,
|
||||
...this.baseHair3,
|
||||
],
|
||||
});
|
||||
@@ -275,13 +281,6 @@ export default {
|
||||
});
|
||||
}
|
||||
|
||||
sets.push({
|
||||
options: [
|
||||
emptyHairBase,
|
||||
...this.baseHair1.map(key => this.mapKeysToFreeOption(key, 'hair', 'base')),
|
||||
],
|
||||
});
|
||||
|
||||
if (this.editing) {
|
||||
sets.push({
|
||||
fullSet: !this.userOwnsSet('hair', this.baseHair2Keys, 'base'),
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
class="svg-icon gem-icon"
|
||||
v-html="icons.gemIcon"
|
||||
></div>
|
||||
{{ challenge.prize }}
|
||||
{{ challenge.prize || 0 }}
|
||||
<div
|
||||
v-once
|
||||
class="details"
|
||||
@@ -123,7 +123,7 @@
|
||||
class="col-12 col-sm-6"
|
||||
:type="column"
|
||||
:task-list-override="tasksByType[column]"
|
||||
:show-options="showOptions"
|
||||
:challenge="challenge"
|
||||
@editTask="editTask"
|
||||
@taskDestroyed="taskDestroyed"
|
||||
/>
|
||||
@@ -386,9 +386,6 @@ export default {
|
||||
canJoin () {
|
||||
return !this.isMember;
|
||||
},
|
||||
showOptions () {
|
||||
return this.isLeader;
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
if (!this.searchId) this.searchId = this.challengeId;
|
||||
@@ -417,7 +414,12 @@ export default {
|
||||
return cleansedTask;
|
||||
},
|
||||
async loadChallenge () {
|
||||
this.challenge = await this.$store.dispatch('challenges:getChallenge', { challengeId: this.searchId });
|
||||
try {
|
||||
this.challenge = await this.$store.dispatch('challenges:getChallenge', { challengeId: this.searchId });
|
||||
} catch (e) {
|
||||
this.$router.push('/challenges/findChallenges');
|
||||
return;
|
||||
}
|
||||
this.members = await this
|
||||
.loadMembers({ challengeId: this.searchId, includeAllPublicFields: true });
|
||||
const tasks = await this.$store.dispatch('tasks:getChallengeTasks', { challengeId: this.searchId });
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
class="svg-icon"
|
||||
v-html="icons.gemIcon"
|
||||
></span>
|
||||
<span class="value">{{ challenge.prize }}</span>
|
||||
<span class="value">{{ challenge.prize || 0 }}</span>
|
||||
</div>
|
||||
<div class="label">
|
||||
{{ $t('prize') }}
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
<b-modal
|
||||
id="challenge-modal"
|
||||
:title="title"
|
||||
:no-close-on-esc="true"
|
||||
:no-close-on-backdrop="true"
|
||||
size="lg"
|
||||
@shown="shown"
|
||||
>
|
||||
|
||||
@@ -75,7 +75,6 @@
|
||||
class="col-12 col-md-3"
|
||||
:type="column"
|
||||
:task-list-override="tasksByType[column]"
|
||||
:show-options="showOptions"
|
||||
:group="group"
|
||||
:search-text="searchText"
|
||||
@editTask="editTask"
|
||||
@@ -199,9 +198,6 @@ export default {
|
||||
return (this.group.leader && this.group.leader._id === this.user._id)
|
||||
|| (this.group.managers && Boolean(this.group.managers[this.user._id]));
|
||||
},
|
||||
showOptions () {
|
||||
return this.canCreateTasks;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
// call again the method if the route changes (when this route is already active)
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="px-3 py-3">
|
||||
<quest-sidebar-section
|
||||
v-if="isParty"
|
||||
:group="group"
|
||||
@@ -255,11 +255,10 @@
|
||||
.sidebar {
|
||||
background-color: $gray-600;
|
||||
padding-bottom: 2em;
|
||||
|
||||
}
|
||||
|
||||
.buttons-wrapper {
|
||||
padding-top: 2.8em;
|
||||
padding: 2.8em 24px 0em 24px;
|
||||
}
|
||||
|
||||
.card {
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
-info-button(@click="showWorldBossInfo()") {{$t('whatIsWorldBoss') }}
|
||||
-->
|
||||
</div>
|
||||
<div class="sleep below-header-sections">
|
||||
<div class="sleep px-4 py-3">
|
||||
<strong v-once>{{ $t('sleepDescription') }}</strong>
|
||||
<ul>
|
||||
<li v-once>
|
||||
@@ -263,7 +263,7 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="px-3">
|
||||
<div class="px-4">
|
||||
<sidebar-section :title="$t('staffAndModerators')">
|
||||
<div class="row">
|
||||
<div
|
||||
@@ -511,10 +511,6 @@
|
||||
.sidebar {
|
||||
background-color: $gray-600;
|
||||
padding: 0em;
|
||||
|
||||
.below-header-sections {
|
||||
padding: 1em 1.75em 1em 1.75em;
|
||||
}
|
||||
}
|
||||
|
||||
.pause-button {
|
||||
|
||||
@@ -70,7 +70,8 @@
|
||||
}
|
||||
|
||||
.text {
|
||||
height: 60px;
|
||||
height: auto;
|
||||
min-height: 60px;
|
||||
font-size: 14px;
|
||||
line-height: 1.43;
|
||||
text-align: center;
|
||||
|
||||
@@ -767,7 +767,6 @@ export default {
|
||||
case 'sortByHatchable': {
|
||||
if (isPetList) {
|
||||
const sortFunc = i => (i.isHatchable() ? 0 : 1);
|
||||
|
||||
animals = _sortBy(animals, [sortFunc]);
|
||||
}
|
||||
break;
|
||||
@@ -800,6 +799,8 @@ export default {
|
||||
groupKey = 'potionKey';
|
||||
} else if (sortBy === 'AZ') {
|
||||
groupKey = '';
|
||||
} else if (sortBy === 'sortByHatchable') {
|
||||
groupKey = i => (i.isHatchable() ? 0 : 1);
|
||||
}
|
||||
|
||||
return groupBy(pets, groupKey);
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
:key="member._id"
|
||||
@click="selectMember(member)"
|
||||
>
|
||||
{{ member.profile.name }}
|
||||
@{{ member.auth.local.username }}
|
||||
</b-dropdown-item>
|
||||
</b-dropdown>
|
||||
</template>
|
||||
|
||||
@@ -184,11 +184,19 @@ const NOTIFICATIONS = {
|
||||
achievement: true,
|
||||
label: $t => `${$t('achievement')}: ${$t('achievementPartyUp')}`,
|
||||
modalId: 'generic-achievement',
|
||||
data: {
|
||||
message: $t => $t('achievement'),
|
||||
modalText: $t => $t('achievementPartyUp'),
|
||||
},
|
||||
},
|
||||
ACHIEVEMENT_PARTY_ON: {
|
||||
achievement: true,
|
||||
label: $t => `${$t('achievement')}: ${$t('achievementPartyOn')}`,
|
||||
modalId: 'generic-achievement',
|
||||
data: {
|
||||
message: $t => $t('achievement'),
|
||||
modalText: $t => $t('achievementPartyOn'),
|
||||
},
|
||||
},
|
||||
ACHIEVEMENT_BEAST_MASTER: {
|
||||
achievement: true,
|
||||
@@ -196,7 +204,7 @@ const NOTIFICATIONS = {
|
||||
modalId: 'generic-achievement',
|
||||
data: {
|
||||
message: $t => $t('achievement'),
|
||||
modalText: $t => $t('mountAchievement'),
|
||||
modalText: $t => $t('beastAchievement'),
|
||||
},
|
||||
},
|
||||
ACHIEVEMENT_MOUNT_MASTER: {
|
||||
@@ -445,10 +453,10 @@ export default {
|
||||
data = notification.data;
|
||||
}
|
||||
|
||||
if (!data.modalText && config.data.modalText) {
|
||||
if (!data.modalText && config && config.data && config.data.modalText) {
|
||||
data.modalText = config.data.modalText(this.$t);
|
||||
}
|
||||
if (!data.message && config.data.message) {
|
||||
if (!data.message && config && config.data && config.data.message) {
|
||||
data.message = config.data.message(this.$t);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,14 +32,8 @@
|
||||
<br>
|
||||
{{ $t('beeminderDesc') }}
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
target="_blank"
|
||||
href="https://chrome.google.com/webstore/detail/habitrpg-chat-client/hidkdfgonpoaiannijofifhjidbnilbb"
|
||||
>{{ $t('chromeChatExtension') }}</a>
|
||||
<br>
|
||||
{{ $t('chromeChatExtensionDesc') }}
|
||||
</li>
|
||||
<li v-html="$t('chatExtension')"></li>
|
||||
<span>{{ $t('chatExtensionDesc') }}</span>
|
||||
<li>
|
||||
<a
|
||||
target="_blank"
|
||||
@@ -48,10 +42,8 @@
|
||||
<br>
|
||||
{{ $t('dataToolDesc') }}
|
||||
</li>
|
||||
<li v-html="$t('otherExtensions')">
|
||||
<br>
|
||||
{{ $t('otherDesc') }}
|
||||
</li>
|
||||
<li v-html="$t('otherExtensions')"></li>
|
||||
<span>{{ $t('otherDesc') }}</span>
|
||||
</ul>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
@@ -215,8 +215,12 @@ export default {
|
||||
},
|
||||
},
|
||||
created () {
|
||||
const timeout = this.notification && this.notification.timeout
|
||||
? this.notification.timeout : true;
|
||||
const timeout = (
|
||||
this.notification
|
||||
&& this.notification.timeout !== undefined
|
||||
&& this.notification.timeout !== null
|
||||
) ? this.notification.timeout : true;
|
||||
|
||||
if (timeout) {
|
||||
let delay = this.notification.delay || 1500;
|
||||
delay += this.$store.state.notificationStore.length * 1000;
|
||||
|
||||
@@ -90,8 +90,8 @@
|
||||
:key="task.id"
|
||||
:task="task"
|
||||
:is-user="isUser"
|
||||
:show-options="showOptions"
|
||||
:group="group"
|
||||
:challenge="challenge"
|
||||
@editTask="editTask"
|
||||
@moveTo="moveTo"
|
||||
@taskDestroyed="taskDestroyed"
|
||||
@@ -371,10 +371,7 @@ export default {
|
||||
selectedTags: {},
|
||||
taskListOverride: {},
|
||||
group: {},
|
||||
showOptions: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
challenge: {},
|
||||
}, // @TODO: maybe we should store the group on state?
|
||||
data () {
|
||||
const icons = Object.freeze({
|
||||
|
||||
@@ -99,6 +99,7 @@
|
||||
</div>
|
||||
<div slot="dropdown-content">
|
||||
<div
|
||||
v-if="showEdit"
|
||||
ref="editTaskItem"
|
||||
class="dropdown-item edit-task-item"
|
||||
>
|
||||
@@ -137,7 +138,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
v-if="canDelete(task)"
|
||||
v-if="showDelete"
|
||||
class="dropdown-item"
|
||||
@click="destroy"
|
||||
>
|
||||
@@ -371,7 +372,7 @@
|
||||
|
||||
&:hover {
|
||||
box-shadow: 0 1px 8px 0 rgba($black, 0.12), 0 4px 4px 0 rgba($black, 0.16);
|
||||
z-index: 10;
|
||||
z-index: 11;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -789,6 +790,7 @@ import moment from 'moment';
|
||||
import axios from 'axios';
|
||||
import Vue from 'vue';
|
||||
import uuid from 'uuid';
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
import { mapState, mapGetters, mapActions } from '@/libs/store';
|
||||
import scoreTask from '@/../../common/script/ops/scoreTask';
|
||||
import * as Analytics from '@/libs/analytics';
|
||||
@@ -825,7 +827,7 @@ export default {
|
||||
markdown: markdownDirective,
|
||||
},
|
||||
mixins: [notifications],
|
||||
props: ['task', 'isUser', 'group', 'dueDate', 'showOptions'], // @TODO: maybe we should store the group on state?
|
||||
props: ['task', 'isUser', 'group', 'challenge', 'dueDate'], // @TODO: maybe we should store the group on state?
|
||||
data () {
|
||||
return {
|
||||
random: uuid.v4(), // used to avoid conflicts between checkboxes ids
|
||||
@@ -859,6 +861,7 @@ export default {
|
||||
getTagsFor: 'tasks:getTagsFor',
|
||||
getTaskClasses: 'tasks:getTaskClasses',
|
||||
canDelete: 'tasks:canDelete',
|
||||
canEdit: 'tasks:canEdit',
|
||||
}),
|
||||
hasChecklist () {
|
||||
return this.task.checklist && this.task.checklist.length > 0;
|
||||
@@ -937,6 +940,27 @@ export default {
|
||||
|
||||
return this.task.challenge.shortName ? this.task.challenge.shortName.toString() : '';
|
||||
},
|
||||
isChallangeTask () {
|
||||
return !isEmpty(this.task.challenge);
|
||||
},
|
||||
isGroupTask () {
|
||||
return this.task.group.taskId || this.task.group.id;
|
||||
},
|
||||
taskCategory () {
|
||||
let taskCategory = 'default';
|
||||
if (this.isGroupTask) taskCategory = 'group';
|
||||
else if (this.isChallangeTask) taskCategory = 'challenge';
|
||||
return taskCategory;
|
||||
},
|
||||
showDelete () {
|
||||
return this.canDelete(this.task, this.taskCategory, this.isUser, this.group, this.challenge);
|
||||
},
|
||||
showEdit () {
|
||||
return this.canEdit(this.task, this.taskCategory, this.isUser, this.group, this.challenge);
|
||||
},
|
||||
showOptions () {
|
||||
return this.showEdit || this.showDelete || this.isUser;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
...mapActions({
|
||||
@@ -950,7 +974,7 @@ export default {
|
||||
this.scoreChecklistItem({ taskId: this.task._id, itemId: item.id });
|
||||
},
|
||||
edit (e, task) {
|
||||
if (this.isRunningYesterdailies) return;
|
||||
if (this.isRunningYesterdailies || !this.showEdit) return;
|
||||
|
||||
// Prevent clicking on a link from opening the edit modal
|
||||
const target = e.target || e.srcElement;
|
||||
|
||||
@@ -246,6 +246,8 @@
|
||||
@import '~@/assets/scss/create-task.scss';
|
||||
|
||||
.user-tasks-page {
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
padding-top: 16px;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<span class="dropdown-label">{{ label }}</span>
|
||||
<b-dropdown right="right">
|
||||
<span
|
||||
slot="text"
|
||||
slot="button-content"
|
||||
:class="{'dropdown-icon-item': withIcon}"
|
||||
>
|
||||
<slot
|
||||
|
||||
@@ -756,6 +756,7 @@ export default {
|
||||
},
|
||||
mounted () {
|
||||
this.loadUser();
|
||||
this.selectPage(this.startingPage);
|
||||
},
|
||||
methods: {
|
||||
async loadUser () {
|
||||
|
||||
Reference in New Issue
Block a user