finish linting client
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss", scoped>
|
||||
<style lang="scss" scoped>
|
||||
@import '~@/assets/scss/colors.scss';
|
||||
.claim-bottom-message {
|
||||
background-color: $gray-700;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
:hide-footer="true"
|
||||
>
|
||||
<div class="modal-body">
|
||||
<!-- eslint-disable-next-line vue/require-v-for-key -->
|
||||
<div
|
||||
v-for="(approval, index) in task.approvals"
|
||||
class="row approval"
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
class="modal-body"
|
||||
>
|
||||
<div
|
||||
v-if="brokenChallengeTask.challenge.broken === 'TASK_DELETED' || brokenChallengeTask.challenge.broken === 'CHALLENGE_TASK_NOT_FOUND'"
|
||||
v-if="brokenChallengeTask.challenge.broken === 'TASK_DELETED'
|
||||
|| brokenChallengeTask.challenge.broken === 'CHALLENGE_TASK_NOT_FOUND'"
|
||||
>
|
||||
<h2>{{ $t('brokenTask') }}</h2>
|
||||
<div>
|
||||
@@ -63,7 +64,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- @TODO: I ported this over, but do we use it anymore?-->
|
||||
<!--div(v-if='brokenChallengeTask.challenge.broken === "UNSUBSCRIBED"')p {{ $t('unsubChallenge') }}
|
||||
<!--div(v-if='brokenChallengeTask.challenge.broken
|
||||
=== "UNSUBSCRIBED"')p {{ $t('unsubChallenge') }}
|
||||
p
|
||||
a(@click="unlink('keep-all')") {{ $t('keepThem') }}
|
||||
| |
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<div class="filters d-flex justify-content-end">
|
||||
<div
|
||||
v-for="filter in typeFilters"
|
||||
:key="filter"
|
||||
class="filter small-text"
|
||||
:class="{active: activeFilter.label === filter}"
|
||||
@click="activateFilter(type, filter)"
|
||||
@@ -341,7 +342,7 @@ import {
|
||||
getTypeLabel,
|
||||
getFilterLabels,
|
||||
getActiveFilter,
|
||||
} from '@/libs/store/helpers/filterTasks.js';
|
||||
} from '@/libs/store/helpers/filterTasks';
|
||||
|
||||
import svgPin from '@/assets/svg/pin.svg';
|
||||
import habitIcon from '@/assets/svg/habit.svg';
|
||||
@@ -484,7 +485,11 @@ export default {
|
||||
return this.taskList.length;
|
||||
} if (this.activeFilter.label === 'all') {
|
||||
return this.taskList
|
||||
.reduce((count, t) => (!t.completed && shouldDo(new Date(), t, this.getUserPreferences) ? count + 1 : count), 0);
|
||||
.reduce(
|
||||
(count, t) => (!t.completed
|
||||
&& shouldDo(new Date(), t, this.getUserPreferences) ? count + 1 : count),
|
||||
0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -700,14 +705,15 @@ export default {
|
||||
filteredTaskList = taskList.filter(
|
||||
task =>
|
||||
// eslint rule disabled for block to allow nested binary expression
|
||||
/* eslint-disable no-extra-parens */
|
||||
/* eslint-disable no-extra-parens, implicit-arrow-linebreak, max-len */
|
||||
(
|
||||
task.text.toLowerCase().indexOf(searchTextLowerCase) > -1
|
||||
|| (task.notes && task.notes.toLowerCase().indexOf(searchTextLowerCase) > -1)
|
||||
|| (task.checklist && task.checklist.length > 0
|
||||
&& task.checklist.some(checkItem => checkItem.text.toLowerCase().indexOf(searchTextLowerCase) > -1))
|
||||
&& task.checklist
|
||||
.some(checkItem => checkItem.text.toLowerCase().indexOf(searchTextLowerCase) > -1))
|
||||
),
|
||||
/* eslint-enable no-extra-parens */
|
||||
/* eslint-enable no-extra-parens, implicit-arrow-linebreak, max-len */
|
||||
);
|
||||
}
|
||||
return filteredTaskList;
|
||||
|
||||
@@ -35,13 +35,16 @@
|
||||
<div slot="drawer-slider">
|
||||
<div class="container spell-container">
|
||||
<div class="row">
|
||||
<!-- eslint-disable vue/no-use-v-if-with-v-for -->
|
||||
<div
|
||||
v-for="(skill, key) in spells[user.stats.class]"
|
||||
v-if="user.stats.lvl >= skill.lvl"
|
||||
:key="key"
|
||||
v-b-popover.hover.auto="skill.notes()"
|
||||
class="col-12 col-md-3"
|
||||
@click="castStart(skill)"
|
||||
>
|
||||
<!-- eslint-enable vue/no-use-v-if-with-v-for -->
|
||||
<div class="spell col-12 row">
|
||||
<div class="col-8 details">
|
||||
<a :class="{'disabled': spellDisabled(key)}"></a>
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
<template>
|
||||
<div class="tags-popup">
|
||||
<!-- eslint-disable vue/no-use-v-if-with-v-for -->
|
||||
<div
|
||||
v-for="tagsType in tagsByType"
|
||||
v-if="tagsType.tags.length > 0 || tagsType.key === 'tags'"
|
||||
:key="tagsType.key"
|
||||
class="tags-category d-flex"
|
||||
>
|
||||
<!-- eslint-enable vue/no-use-v-if-with-v-for -->
|
||||
<div class="tags-header">
|
||||
<strong v-once>{{ $t(tagsType.key) }}</strong>
|
||||
</div>
|
||||
<div class="tags-list container">
|
||||
<div class="row">
|
||||
<div
|
||||
v-for="(tag, tagIndex) in tagsType.tags"
|
||||
v-for="(tag) in tagsType.tags"
|
||||
:key="tag.id"
|
||||
class="col-4"
|
||||
>
|
||||
<div class="custom-control custom-checkbox">
|
||||
|
||||
@@ -18,7 +18,10 @@
|
||||
<div
|
||||
v-if="task.type === 'habit'"
|
||||
class="left-control d-flex align-items-center justify-content-center"
|
||||
:class="[{'control-bottom-box': this.task.group.id, 'control-top-box': approvalsClass}, controlClass.up.bg]"
|
||||
:class="[{
|
||||
'control-bottom-box': task.group.id,
|
||||
'control-top-box': approvalsClass
|
||||
}, controlClass.up.bg]"
|
||||
>
|
||||
<div
|
||||
class="task-control habit-control"
|
||||
@@ -26,7 +29,7 @@
|
||||
@click="(isUser && task.up) ? score('up') : null"
|
||||
>
|
||||
<div
|
||||
v-if="this.task.group.id && !isUser"
|
||||
v-if="task.group.id && !isUser"
|
||||
class="svg-icon lock"
|
||||
:class="controlClass.up.icon"
|
||||
v-html="icons.lock"
|
||||
@@ -42,7 +45,9 @@
|
||||
<div
|
||||
v-if="task.type === 'daily' || task.type === 'todo'"
|
||||
class="left-control d-flex justify-content-center"
|
||||
:class="[{'control-bottom-box': this.task.group.id, 'control-top-box': approvalsClass}, controlClass.bg]"
|
||||
:class="[{
|
||||
'control-bottom-box': task.group.id,
|
||||
'control-top-box': approvalsClass}, controlClass.bg]"
|
||||
>
|
||||
<div
|
||||
class="task-control daily-todo-control"
|
||||
@@ -50,7 +55,7 @@
|
||||
@click="isUser ? score(task.completed ? 'down' : 'up') : null"
|
||||
>
|
||||
<div
|
||||
v-if="this.task.group.id && !isUser && !task.completed"
|
||||
v-if="task.group.id && !isUser && !task.completed"
|
||||
class="svg-icon lock"
|
||||
:class="controlClass.icon"
|
||||
v-html="icons.lock"
|
||||
@@ -161,7 +166,8 @@
|
||||
<div class="d-inline-flex">
|
||||
<div
|
||||
v-if="isUser"
|
||||
v-b-tooltip.hover.bottom="$t(`${task.collapseChecklist ? 'expand': 'collapse'}Checklist`)"
|
||||
v-b-tooltip.hover.bottom="$t(`${task.collapseChecklist
|
||||
? 'expand': 'collapse'}Checklist`)"
|
||||
class="collapse-checklist d-flex align-items-center expand-toggle"
|
||||
:class="{open: !task.collapseChecklist}"
|
||||
@click="collapseChecklist(task)"
|
||||
@@ -173,12 +179,15 @@
|
||||
<span>{{ checklistProgress }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- eslint-disable vue/no-use-v-if-with-v-for -->
|
||||
<div
|
||||
v-for="item in task.checklist"
|
||||
v-if="!task.collapseChecklist"
|
||||
:key="item.id"
|
||||
class="custom-control custom-checkbox checklist-item"
|
||||
:class="{'checklist-item-done': item.completed}"
|
||||
>
|
||||
<!-- eslint-enable vue/no-use-v-if-with-v-for -->
|
||||
<input
|
||||
:id="`checklist-${item.id}-${random}`"
|
||||
class="custom-control-input"
|
||||
@@ -277,6 +286,7 @@
|
||||
</div>
|
||||
<div
|
||||
v-for="tag in getTagsFor(task)"
|
||||
:key="tag"
|
||||
v-markdown="tag"
|
||||
class="tag-label"
|
||||
></div>
|
||||
@@ -290,7 +300,9 @@
|
||||
<div
|
||||
v-if="task.type === 'habit'"
|
||||
class="right-control d-flex align-items-center justify-content-center"
|
||||
:class="[{'control-bottom-box': this.task.group.id, 'control-top-box': approvalsClass}, controlClass.down.bg]"
|
||||
:class="[{
|
||||
'control-bottom-box': task.group.id,
|
||||
'control-top-box': approvalsClass}, controlClass.down.bg]"
|
||||
>
|
||||
<div
|
||||
class="task-control habit-control"
|
||||
@@ -298,7 +310,7 @@
|
||||
@click="(isUser && task.down) ? score('down') : null"
|
||||
>
|
||||
<div
|
||||
v-if="this.task.group.id && !isUser"
|
||||
v-if="task.group.id && !isUser"
|
||||
class="svg-icon lock"
|
||||
:class="controlClass.down.icon"
|
||||
v-html="icons.lock"
|
||||
@@ -335,6 +347,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- eslint-disable max-len -->
|
||||
<style lang="scss" scoped>
|
||||
@import '~@/assets/scss/colors.scss';
|
||||
|
||||
@@ -769,7 +782,7 @@
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- eslint-enable max-len -->
|
||||
|
||||
<script>
|
||||
import moment from 'moment';
|
||||
@@ -992,7 +1005,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (this.task.type) {
|
||||
switch (this.task.type) { // eslint-disable-line default-case
|
||||
case 'habit':
|
||||
this.$root.$emit('playSound', direction === 'up' ? 'Plus_Habit' : 'Minus_Habit');
|
||||
break;
|
||||
@@ -1010,7 +1023,8 @@ export default {
|
||||
|
||||
Analytics.updateUser();
|
||||
const response = await axios.post(`/api/v4/tasks/${task._id}/score/${direction}`);
|
||||
const tmp = response.data.data._tmp || {}; // used to notify drops, critical hits and other bonuses
|
||||
// used to notify drops, critical hits and other bonuses
|
||||
const tmp = response.data.data._tmp || {};
|
||||
const { crit } = tmp;
|
||||
const { drop } = tmp;
|
||||
const { quest } = tmp;
|
||||
@@ -1025,7 +1039,7 @@ export default {
|
||||
if (quest.progressDelta && userQuest.boss) {
|
||||
this.quest('questDamage', quest.progressDelta.toFixed(1));
|
||||
} else if (quest.collection && userQuest.collect) {
|
||||
user.party.quest.progress.collectedItems++;
|
||||
user.party.quest.progress.collectedItems += 1;
|
||||
this.quest('questCollection', quest.collection);
|
||||
}
|
||||
}
|
||||
@@ -1052,7 +1066,7 @@ export default {
|
||||
if (!user.items[type][drop.key]) {
|
||||
Vue.set(user, `items.${type}.${drop.key}`, 0);
|
||||
}
|
||||
user.items[type][drop.key]++;
|
||||
user.items[type][drop.key] += 1;
|
||||
}
|
||||
|
||||
if (drop.type === 'HatchingPotion') {
|
||||
|
||||
@@ -113,6 +113,7 @@
|
||||
>
|
||||
<div
|
||||
v-for="(item, $index) in checklist"
|
||||
:key="item.id"
|
||||
class="inline-edit-input-group checklist-group input-group"
|
||||
>
|
||||
<span class="grippy"></span>
|
||||
@@ -455,6 +456,7 @@
|
||||
>
|
||||
<div
|
||||
v-for="tagName in truncatedSelectedTags"
|
||||
:key="tagName"
|
||||
v-markdown="tagName"
|
||||
class="category-label"
|
||||
:title="tagName"
|
||||
@@ -512,7 +514,8 @@
|
||||
:text="$t(sharedCompletion)"
|
||||
>
|
||||
<b-dropdown-item
|
||||
v-for="completionOption in ['recurringCompletion', 'singleCompletion', 'allAssignedCompletion']"
|
||||
v-for="completionOption in [
|
||||
'recurringCompletion', 'singleCompletion', 'allAssignedCompletion']"
|
||||
:key="completionOption"
|
||||
:class="{active: sharedCompletion === completionOption}"
|
||||
@click="sharedCompletion = completionOption"
|
||||
@@ -541,6 +544,7 @@
|
||||
>
|
||||
<span
|
||||
v-for="memberId in assignedMembers"
|
||||
:key="memberId"
|
||||
class="mr-1"
|
||||
>{{ memberNamesById[memberId] }}</span>
|
||||
</span>
|
||||
@@ -640,7 +644,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="task.type === 'habit' && isUserTask && purpose === 'edit' && (task.up || task.down)"
|
||||
v-if="task.type === 'habit'
|
||||
&& isUserTask && purpose === 'edit' && (task.up || task.down)"
|
||||
class="option"
|
||||
>
|
||||
<div class="form-group">
|
||||
@@ -692,11 +697,17 @@
|
||||
<!--.option(v-if="isUserTask && task.type !== 'reward'").form-group
|
||||
label(v-once)
|
||||
span.float-left {{ $t('attributeAllocation') }}
|
||||
.svg-icon.info-icon(v-html="icons.information", v-b-tooltip.hover.righttop.html="$t('attributeAllocationHelp')")
|
||||
.svg-icon.info-icon(v-html="ic
|
||||
ons.information", v-b-tooltip.hover.righttop.html="$t('attributeAllocationHelp')")
|
||||
.attributes
|
||||
.custom-control.custom-radio.custom-control-inline(v-for="attr in ATTRIBUTES", :key="attr")
|
||||
input.custom-control-input(:id="`attribute-${attr}`", type="radio", :value="attr", v-model="task.attribute", :disabled="user.preferences.allocationMode !== 'taskbased'")
|
||||
label.custom-control-label.attr-description(:for="`attribute-${attr}`", v-once, v-b-popover.hover="$t(`${attr}Text`)") {{ $t(attributesStrings[attr]) }}-->
|
||||
.custom-control.custom-radio.custom-
|
||||
control-inline(v-for="attr in ATTRIBUTES", :key="attr")
|
||||
input.custom-control-input(:id="`attribute-${a
|
||||
ttr}`", type="radio", :value="attr", v-model="task.attribute", :disabled="us
|
||||
er.preferences.allocationMode !== 'taskbased'")
|
||||
label.custom-control-label.attr-
|
||||
description(:for="`attribute-${attr}`", v-once, v-b-pop
|
||||
over.hover="$t(`${attr}Text`)") {{ $t(attributesStrings[attr]) }}-->
|
||||
</div>
|
||||
</b-collapse>
|
||||
</div>
|
||||
|
||||
@@ -35,12 +35,14 @@
|
||||
class="filter-panel"
|
||||
@mouseleave="checkMouseOver"
|
||||
>
|
||||
<!-- eslint-disable vue/no-use-v-if-with-v-for -->
|
||||
<div
|
||||
v-for="tagsType in tagsByType"
|
||||
v-if="tagsType.tags.length > 0 || tagsType.key === 'tags'"
|
||||
:key="tagsType.key"
|
||||
class="tags-category d-flex"
|
||||
>
|
||||
<!-- eslint-enable vue/no-use-v-if-with-v-for -->
|
||||
<div class="tags-header">
|
||||
<strong v-once>{{ $t(tagsType.key) }}</strong>
|
||||
<a
|
||||
@@ -62,6 +64,7 @@
|
||||
>
|
||||
<div
|
||||
v-for="(tag, tagIndex) in tagsSnap[tagsType.key]"
|
||||
:key="tag.id"
|
||||
class="col-6"
|
||||
>
|
||||
<div class="inline-edit-input-group tag-edit-item input-group">
|
||||
@@ -99,6 +102,7 @@
|
||||
<template v-if="editingTags && tagsType.key === 'challenges'">
|
||||
<div
|
||||
v-for="(tag, tagIndex) in tagsSnap[tagsType.key]"
|
||||
:key="tag.id"
|
||||
class="col-6"
|
||||
>
|
||||
<div class="inline-edit-input-group tag-edit-item input-group">
|
||||
@@ -121,7 +125,8 @@
|
||||
</template>
|
||||
<template v-if="!editingTags || tagsType.key === 'groups'">
|
||||
<div
|
||||
v-for="(tag, tagIndex) in tagsType.tags"
|
||||
v-for="(tag) in tagsType.tags"
|
||||
:key="tag.id"
|
||||
class="col-6"
|
||||
>
|
||||
<div class="custom-control custom-checkbox">
|
||||
@@ -414,13 +419,10 @@ import { mapState, mapActions } from '@/libs/store';
|
||||
import taskDefaults from '@/../../common/script/libs/taskDefaults';
|
||||
import brokenTaskModal from './brokenTaskModal';
|
||||
|
||||
import Item from '@/components/inventory/item.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
TaskColumn,
|
||||
TaskModal,
|
||||
Item,
|
||||
spells,
|
||||
brokenTaskModal,
|
||||
draggable,
|
||||
|
||||
Reference in New Issue
Block a user