habitica-self-host/website/client/components/tasks/taskModal.vue

1024 lines
34 KiB
Vue
Raw Normal View History

<template lang="pug">
2018-07-24 00:45:50 +00:00
form(v-if="task", @submit.stop.prevent="submit()", @click="handleClick($event)")
b-modal#task-modal(v-bind:no-close-on-esc="showTagsSelect", v-bind:no-close-on-backdrop="showTagsSelect", size="sm", @hidden="onClose()", @show="handleOpen()", @shown="focusInput()")
2018-07-24 00:45:50 +00:00
.task-modal-header(slot="modal-header", :class="cssClass('bg')", @click="handleClick($event)")
.clearfix
h1.float-left {{ title }}
.float-right.d-flex.align-items-center
span.cancel-task-btn.mr-2(v-once, @click="cancel()") {{ $t('cancel') }}
button.btn.btn-secondary(type="submit", v-once) {{ $t('save') }}
.form-group
label(v-once) {{ `${$t('text')}*` }}
input.form-control.title-input(
type="text",
required, v-model="task.text",
ref="inputToFocus",
spellcheck="true",
:disabled="groupAccessRequiredAndOnPersonalPage || challengeAccessRequired"
)
.form-group
label.d-flex.align-items-center.justify-content-between(v-once)
span {{ $t('notes') }}
small(v-once)
a(target="_blank", href="http://habitica.fandom.com/wiki/Markdown_Cheat_Sheet") {{ $t('markdownHelpLink') }}
textarea.form-control(v-model="task.notes", rows="3")
2018-07-24 00:45:50 +00:00
.task-modal-content(@click="handleClick($event)")
.option.mt-0(v-if="task.type === 'reward'")
.form-group
label(v-once) {{ $t('cost') }}
.input-group
2018-01-25 15:53:53 +00:00
.input-group-prepend.input-group-icon.align-items-center
.svg-icon.gold(v-html="icons.gold")
input.form-control(type="number", v-model="task.value", required, placeholder="Enter a Value", step="0.01", min="0")
.option.mt-0(v-if="checklistEnabled")
label(v-once) {{ $t('checklist') }}
br
draggable(
v-model="checklist",
:options="{handle: '.grippy', filter: '.task-dropdown'}",
@update="sortedChecklist"
)
.inline-edit-input-group.checklist-group.input-group(v-for="(item, $index) in checklist")
span.grippy
input.inline-edit-input.checklist-item.form-control(type="text", v-model="item.text")
span.input-group-append(@click="removeChecklistItem($index)")
.svg-icon.destroy-icon(v-html="icons.destroy")
input.inline-edit-input.checklist-item.form-control(type="text", :placeholder="$t('newChecklistItem')", @keydown.enter="addChecklistItem($event)", v-model="newChecklistItem")
.d-flex.justify-content-center(v-if="task.type === 'habit'")
.option-item.habit-control(@click="toggleUpDirection()", :class="task.up ? 'habit-control-enabled' : cssClass('habit-control-disabled')")
.option-item-box(:class="task.up ? cssClass('bg') : ''")
.task-control.habit-control
.svg-icon.positive(v-html="icons.positive", :class="task.up ? cssClass('icon') : ''")
.option-item-label(:class="task.up ? cssClass('text') : ''") {{ $t('positive') }}
.option-item.habit-control(@click="toggleDownDirection()", :class="task.down ? 'habit-control-enabled' : cssClass('habit-control-disabled')")
.option-item-box(:class="task.down ? cssClass('bg') : ''")
.task-control.habit-control
.svg-icon.negative(v-html="icons.negative", :class="task.down ? cssClass('icon') : ''")
.option-item-label(:class="task.down ? cssClass('text') : ''") {{ $t('negative') }}
template(v-if="task.type !== 'reward'")
label(v-once)
span.float-left {{ $t('difficulty') }}
.svg-icon.info-icon(v-html="icons.information", v-b-tooltip.hover.righttop="$t('difficultyHelp')")
.d-flex.justify-content-center.difficulty-options
.option-item(:class="task.priority === 0.1 ? 'option-item-selected' : cssClass('option-disabled')", @click="setDifficulty(0.1)")
.option-item-box(:class="task.priority === 0.1 ? cssClass('bg') : ''")
.svg-icon.difficulty-trivial-icon(v-html="icons.difficultyTrivial")
.option-item-label(:class="task.priority === 0.1 ? cssClass('text') : ''") {{ $t('trivial') }}
.option-item(:class="task.priority === 1 ? 'option-item-selected' : cssClass('option-disabled')", @click="setDifficulty(1)")
.option-item-box(:class="task.priority === 1 ? cssClass('bg') : ''")
.svg-icon.difficulty-normal-icon(v-html="icons.difficultyNormal")
.option-item-label(:class="task.priority === 1 ? cssClass('text') : ''") {{ $t('easy') }}
.option-item(:class="task.priority === 1.5 ? 'option-item-selected' : cssClass('option-disabled')", @click="setDifficulty(1.5)")
.option-item-box(:class="task.priority === 1.5 ? cssClass('bg') : ''")
.svg-icon.difficulty-medium-icon(v-html="icons.difficultyMedium")
.option-item-label(:class="task.priority === 1.5 ? cssClass('text') : ''") {{ $t('medium') }}
.option-item(:class="task.priority === 2 ? 'option-item-selected' : cssClass('option-disabled')", @click="setDifficulty(2)")
.option-item-box(:class="task.priority === 2 ? cssClass('bg') : ''")
.svg-icon.difficulty-hard-icon(v-html="icons.difficultyHard")
.option-item-label(:class="task.priority === 2 ? cssClass('text') : ''") {{ $t('hard') }}
.option(v-if="task.type === 'todo'")
.form-group
label(v-once) {{ $t('dueDate') }}
datepicker(
v-model="task.date",
:calendarIcon="icons.calendar",
:clearButton='true',
:clearButtonText='$t("clear")',
:todayButton='!challengeAccessRequired',
:todayButtonText='$t("today")',
:disabled-picker='challengeAccessRequired',
:highlighted='calendarHighlights'
)
.option(v-if="task.type === 'daily'")
.form-group
label(v-once) {{ $t('startDate') }}
datepicker(
v-model="task.startDate",
:calendarIcon="icons.calendar",
:clearButton="false",
:todayButton="!challengeAccessRequired",
:todayButtonText="$t('today')",
:disabled-picker="challengeAccessRequired",
:highlighted='calendarHighlights'
)
.option(v-if="task.type === 'daily'")
.form-group
label(v-once) {{ $t('repeats') }}
b-dropdown.inline-dropdown(:text="$t(task.frequency)")
b-dropdown-item(v-for="frequency in ['daily', 'weekly', 'monthly', 'yearly']",
:key="frequency", @click="task.frequency = frequency",
:disabled='challengeAccessRequired',
:class="{active: task.frequency === frequency}")
| {{ $t(frequency) }}
.form-group
label(v-once) {{ $t('repeatEvery') }}
.input-group
input.form-control(type="number", v-model="task.everyX", min="0", max="9999", required, :disabled='challengeAccessRequired')
.input-group-append.input-group-text {{ repeatSuffix }}
template(v-if="task.frequency === 'weekly'")
.form-group
label.d-block(v-once) {{ $t('repeatOn') }}
.form-check-inline.weekday-check.mr-0(
v-for="(day, dayNumber) in ['su','m','t','w','th','f','s']",
:key="dayNumber",
)
.custom-control.custom-checkbox.custom-control-inline
input.custom-control-input(type="checkbox", v-model="task.repeat[day]", :disabled='challengeAccessRequired', :id="`weekday-${dayNumber}`")
label.custom-control-label(v-once, :for="`weekday-${dayNumber}`") {{ weekdaysMin(dayNumber) }}
template(v-if="task.frequency === 'monthly'")
label.d-block(v-once) {{ $t('repeatOn') }}
2018-01-08 17:47:59 +00:00
.form-radio
.custom-control.custom-radio.custom-control-inline
input.custom-control-input(type='radio', v-model="repeatsOn", value="dayOfMonth", id="repeat-dayOfMonth" name="repeatsOn")
label.custom-control-label(for="repeat-dayOfMonth") {{ $t('dayOfMonth') }}
.custom-control.custom-radio.custom-control-inline
input.custom-control-input(type='radio', v-model="repeatsOn", value="dayOfWeek", id="repeat-dayOfWeek" name="repeatsOn")
label.custom-control-label(for="repeat-dayOfWeek") {{ $t('dayOfWeek') }}
Release with develop (#9162) * Client: fix Apidoc and move email files (#9139) * fix apidoc * move emails files * quest leader can start/end quest; admins can edit challenges/guilds; reverse chat works; remove static/videos link; etc (#9140) * enable link to markdown info on group and challenge edit screen * allow admin (moderators and staff) to edit challenges * allow admin (moderators and staff) to edit guilds Also add some unrelated TODO comments. * allow any party member (not just leader) to start quest from party page * allow quest owner to cancel, begin, abort quest Previously only the party leader could see those buttons. The leader still can. This also hides those buttons from all other party members. * enable reverse chat in guilds and party * remove outdated videos from press kit * adjust various wordings * Be consistent with capitalization of Check-In. (#9118) * limit for inlined svg images and make home leaner by not bundling it with the rest of static pages * sep 27 fixes (#9088) * fix item paddings / drawer width * expand the width of item-rows by the margin of an item * fix hatchedPet-dialog * fix hatching-modal * remove min-height * Oct 3 fixes (#9148) * Only show level after yesterdailies modal * Fixed zindex * Added spcial spells to rewards column * Added single click buy for health and armoire * Prevented task scoring when casting a spell * Renamed generic purchase method * Updated nav for small screen * Hide checklist while casting * fix some text describing menu items (#9145) * 4.1.3 * use `selectGearToPin` instead of updateStore in migration-script (#9102) * Tags redesign in edit-task modal (#9122) * Truncate tags list to maximum number of tasks This commit truncates the list of tags in the edit task modal and displays the remaining selected tasks as a number. * Align tags-select dropdown with "Tags" label * Add tags popup component * Use solid purple for tags-select dropdown * Remove shadow when tags-select is active * Add border-radius to tags-select * Re-add previously disabled transitions * Remove unused template element * Add Clear Tags button to footer of tags popup * Decrease column size for tags to better match design * Truncate tag name to avoid overflows * Add tag name as title to show full name on hover * Grow inline tags select from left to right * Style none button * Add spacing to streak reset button to line up with tags select * Add top offset to tags dropdown toggle to line up with label * Ability to collapse checklists (#9158) * ability to collapse checklists * typo * show warning to use the mobile apps (#9152) * Oct 4 fixes (#9159) * Added gem purchase note * Added notification count * Added party reload * Added description when user can no longer purchase gems this month * Prevent modal from showing when pruchasing recently purchased items * Added progress bar * Prevented non leader from loading approvals * Added group billing * Release fix (#9161) * Merge Develop onto Release (#9123) * Some random quick (#9111) * Switch group button directions * Allowed admins to export challenges * Added scoping to some stable styles * Fixed challenge cloning * Tasks tags (#9112) * Added auto apply and exit * Add challenge tag editing * Fixed lint * Skill fixes (#9113) * Added local storage setting for spell drawer * Added new spell styles * Fixed typo * Reset local creds if access is denied (#9114) * various fixes: group leader's name at top of edit drop-down; Members List; etc (#9117) * fix text describing location of subscription/gem gift box * disable Copy As To-Do in Tavern, guilds, party because it's not working * change members label on group pages to Member List * remove outdated info about seeing number of Gems available to buy * allow Danger Zone to be seen by players without local authentication Also add an hr because the Danger Zone heading was crammed up against the button above it. * put current group leader's name at top of Leader change drop-down * Client Fixes (#9120) * unduplicate logout code * re-enable debug menu * fix pets badge and equipping mounts * close gift modal after sending gems * armoire notifications * Oct 1 fixes (#9121) * Added default tags to task * Added seasonal gear check and show spooky * Disabled spooky sparkles * Fixed challenge remove tasks modal * Hid checklist * Added group gems modal * Purchase with amazon * Added check for user health * Added missing notification file * 4.1.1 * 4.1.2 * Merge develop into release (#9154) * Client: fix Apidoc and move email files (#9139) * fix apidoc * move emails files * quest leader can start/end quest; admins can edit challenges/guilds; reverse chat works; remove static/videos link; etc (#9140) * enable link to markdown info on group and challenge edit screen * allow admin (moderators and staff) to edit challenges * allow admin (moderators and staff) to edit guilds Also add some unrelated TODO comments. * allow any party member (not just leader) to start quest from party page * allow quest owner to cancel, begin, abort quest Previously only the party leader could see those buttons. The leader still can. This also hides those buttons from all other party members. * enable reverse chat in guilds and party * remove outdated videos from press kit * adjust various wordings * Be consistent with capitalization of Check-In. (#9118) * limit for inlined svg images and make home leaner by not bundling it with the rest of static pages * sep 27 fixes (#9088) * fix item paddings / drawer width * expand the width of item-rows by the margin of an item * fix hatchedPet-dialog * fix hatching-modal * remove min-height * Oct 3 fixes (#9148) * Only show level after yesterdailies modal * Fixed zindex * Added spcial spells to rewards column * Added single click buy for health and armoire * Prevented task scoring when casting a spell * Renamed generic purchase method * Updated nav for small screen * Hide checklist while casting * fix some text describing menu items (#9145)
2017-10-04 23:26:05 +00:00
.tags-select.option(v-if="isUserTask")
.tags-inline.form-group.row
label.col-12(v-once) {{ $t('tags') }}
.col-12
.category-wrap(@click="toggleTagSelect()", v-bind:class="{ active: showTagsSelect }")
span.category-select(v-if='task.tags && task.tags.length === 0')
.tags-none {{$t('none')}}
.dropdown-toggle
span.category-select(v-else)
.category-label(v-for='tagName in truncatedSelectedTags', :title="tagName", v-markdown='tagName')
.tags-more(v-if='remainingSelectedTags.length > 0') +{{ $t('more', { count: remainingSelectedTags.length }) }}
.dropdown-toggle
2018-07-24 23:07:59 +00:00
tags-popup(ref="popup", v-if="showTagsSelect", :tags="user.tags", v-model="task.tags", @close='closeTagsPopup()')
.option(v-if="task.type === 'habit'")
.form-group
label(v-once) {{ $t('resetStreak') }}
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) }}
.option.group-options(v-if='groupId')
.form-group(v-if="task.type === 'todo'")
label(v-once) {{ $t('sharedCompletion') }}
b-dropdown.inline-dropdown(:text="$t(sharedCompletion)")
b-dropdown-item(
v-for="completionOption in ['recurringCompletion', 'singleCompletion', 'allAssignedCompletion']",
:key="completionOption",
@click="sharedCompletion = completionOption",
:class="{active: sharedCompletion === completionOption}"
) {{ $t(completionOption) }}
.form-group.row
label.col-12(v-once) {{ $t('assignedTo') }}
.col-12.mt-2
.category-wrap(@click="showAssignedSelect = !showAssignedSelect")
span.category-select(v-if='assignedMembers && assignedMembers.length === 0') {{$t('none')}}
span.category-select(v-else)
span.mr-1(v-for='memberId in assignedMembers') {{memberNamesById[memberId]}}
.category-box(v-if="showAssignedSelect")
.container
.row
.form-check.col-6(
v-for="member in members",
:key="member._id",
)
.custom-control.custom-checkbox
input.custom-control-input(type="checkbox", :value="member._id", v-model="assignedMembers", @change='toggleAssignment(member._id)', :id="`assigned-${member._id}`")
label.custom-control-label(v-once, :for="`assigned-${member._id}`") {{ member.profile.name }}
.row
button.btn.btn-primary(@click.stop.prevent="showAssignedSelect = !showAssignedSelect") {{$t('close')}}
.form-group
label(v-once) {{ $t('approvalRequired') }}
toggle-switch.d-inline-block(
:checked="requiresApproval",
@change="updateRequiresApproval"
)
.advanced-settings(v-if="task.type !== 'reward'")
2018-01-13 10:27:02 +00:00
.advanced-settings-toggle.d-flex.justify-content-between.align-items-center(@click = "showAdvancedOptions = !showAdvancedOptions")
h3 {{ $t('advancedSettings') }}
2018-01-13 10:27:02 +00:00
.toggle-up
.svg-icon(v-html="icons.down", :class="{'toggle-open': showAdvancedOptions}")
b-collapse#advancedOptionsCollapse(v-model="showAdvancedOptions")
.advanced-settings-body
.option(v-if="task.type === 'daily' && isUserTask && purpose === 'edit'")
.form-group
label(v-once) {{ $t('restoreStreak') }}
.input-group
.input-group-prepend.streak-addon.input-group-icon
.svg-icon(v-html="icons.streak")
input.form-control(type="number", v-model="task.streak", min="0", required)
.option(v-if="task.type === 'habit' && isUserTask && purpose === 'edit' && (task.up || task.down)")
.form-group
label(v-once) {{ $t('restoreStreak') }}
.row
.col-6(v-if="task.up")
.input-group
.input-group-prepend.positive-addon.input-group-icon
.svg-icon(v-html="icons.positive")
input.form-control(
2018-01-13 10:27:02 +00:00
type="number", v-model="task.counterUp", min="0", required,
)
.col-6(v-if="task.down")
.input-group
.input-group-prepend.negative-addon.input-group-icon
.svg-icon(v-html="icons.negative")
input.form-control(
2018-01-13 10:27:02 +00:00
type="number", v-model="task.counterDown", min="0", required,
)
//.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')")
.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]) }}
2018-01-17 18:33:21 +00:00
.delete-task-btn.d-flex.justify-content-center.align-items-middle(@click="destroy()", v-if="purpose !== 'create' && !challengeAccessRequired")
.svg-icon.d-inline-b(v-html="icons.destroy")
span {{ $t('deleteTask') }}
2018-07-24 00:45:50 +00:00
.task-modal-footer.d-flex.justify-content-center.align-items-center(slot="modal-footer", @click="handleClick($event)")
2018-01-17 18:33:21 +00:00
.cancel-task-btn(v-once, @click="cancel()") {{ $t('cancel') }}
button.btn.btn-primary(type="submit", v-once) {{ $t('save') }}
</template>
<style lang="scss">
@import '~client/assets/scss/colors.scss';
#task-modal {
.modal-dialog.modal-sm {
max-width: 448px;
}
label {
font-weight: bold;
}
merge negue-ui-fixes into develop Squashed commit of the following: commit d0628da7557e718b4d144283949f6572718d9b45 Author: negue <eugen.bolz@gmail.com> Date: Fri Mar 15 19:34:39 2019 +0100 fix quest-tooltip padding/sizes commit c16bc0fe4521e01520628ddc84af54930b15e066 Merge: 24e3fe2a6 163f31688 Author: negue <eugen.bolz@gmail.com> Date: Fri Mar 15 18:58:51 2019 +0100 Merge branch 'fix/quest-tooltip-cells' into negue-ui-fixes commit 24e3fe2a6c8e384722d95f7edd9ce9e4ce16960c Author: negue <eugen.bolz@gmail.com> Date: Fri Mar 15 18:49:47 2019 +0100 use item margin instead of container padding commit 03ab975193b2007e24fcbb971fc7d4169bfb3ac7 Author: negue <eugen.bolz@gmail.com> Date: Thu Mar 14 21:41:43 2019 +0100 fix input heights commit 3aa18f1105a02655066e10a82cf53be9340a6bf1 Author: negue <eugen.bolz@gmail.com> Date: Thu Mar 14 20:58:22 2019 +0100 revert margin-bottom on checklist commit d8f533fda1d3833ab2f4aeb3bd8001d4a7881e8b Merge: fbd01ab79 7d45dcfee Author: Sabe Jones <sabrecat@gmail.com> Date: Thu Mar 14 11:10:34 2019 -0500 Merge branch 'fix/shops-ui' into negue-ui-fixes commit fbd01ab79d5ea8144c191cd51a9c11216418493a Merge: 65517d259 546e260e3 Author: Sabe Jones <sabrecat@gmail.com> Date: Thu Mar 14 11:09:03 2019 -0500 Merge branch 'fix/more-ui' into negue-ui-fixes commit 65517d25947144f57b84fad84ce709ac7d008119 Merge: 5e935230a 2dcec78a4 Author: Sabe Jones <sabrecat@gmail.com> Date: Thu Mar 14 11:08:20 2019 -0500 Merge branch 'fix/tasks-ui' into negue-ui-fixes commit 546e260e36a99f1c73d36069f57d2bbc64633a0e Author: negue <eugen.bolz@gmail.com> Date: Sat Mar 9 23:13:54 2019 +0100 fix checkbox check mark commit 46ea2010f82d9549e3cc649376586517b8746306 Author: negue <eugen.bolz@gmail.com> Date: Sat Mar 9 22:48:20 2019 +0100 remove bottom margin on a collapsed checklist commit 7d45dcfee592a2f8cf8b1d6fe8d4a3502c520ec7 Author: negue <eugen.bolz@gmail.com> Date: Wed Mar 6 22:45:09 2019 +0100 fix star/empty colors - fix quest layout - countBadge z-index commit f9b9e75c18a63fb72c83e7c41a0f0c0cd61a84b0 Author: negue <eugen.bolz@gmail.com> Date: Mon Mar 4 20:14:49 2019 +0100 shops - timeTravelers: refactor filter logic commit 6d3e9e0de04cc92a3e5897c4e2508a67082f003f Author: negue <eugen.bolz@gmail.com> Date: Mon Mar 4 20:06:02 2019 +0100 shops-seasonal: refactor filter logic commit aa2949e9d1fc62de8d9b82e8f74b5bb7ad3d9fb7 Author: negue <eugen.bolz@gmail.com> Date: Mon Mar 4 19:54:23 2019 +0100 shops - quest: refactor filter logic + quest items margins commit ad62b7a358e51d25dce745a949a209c250ed16de Author: negue <eugen.bolz@gmail.com> Date: Mon Mar 4 19:50:51 2019 +0100 shop: equipment-cards background + market filter logic (as other pages) commit 2dcec78a4a14383fdf8576271da07a938e0bdf98 Author: negue <eugen.bolz@gmail.com> Date: Wed Feb 27 21:02:10 2019 +0100 remove space between notes and checklist commit 31fab9b66d98bbadd0761d0a382d3c7be43e7cd6 Author: negue <eugen.bolz@gmail.com> Date: Wed Feb 27 20:45:59 2019 +0100 remove margin of checklist items commit 28b134a19be650b8bc68e5a32996ffee478e720b Author: negue <eugen.bolz@gmail.com> Date: Wed Feb 27 20:33:43 2019 +0100 show `Options` instead of `Show More` commit cafcfb611264167d85bf23b7ff05037189315d23 Author: negue <eugen.bolz@gmail.com> Date: Wed Feb 27 20:30:22 2019 +0100 remove pointer on disabled task-controls commit 7acbcc424b5844d578642107c176a88d0b545bd2 Author: negue <eugen.bolz@gmail.com> Date: Wed Feb 27 20:25:36 2019 +0100 remove margin of task-title markdown-p-tag commit f667ab957bd19db4f096925293a3525cb4adff8b Author: negue <eugen.bolz@gmail.com> Date: Wed Feb 27 20:25:16 2019 +0100 40px height search + tags button commit 2080ecb7e8d8b75b8d730a2f252b1b52f68db437 Author: negue <eugen.bolz@gmail.com> Date: Wed Feb 27 20:24:35 2019 +0100 show grabbing cursor while dragging commit 163f31688926abe79f916810293e97f940105065 Author: negue <eugen.bolz@gmail.com> Date: Fri Feb 15 23:26:40 2019 +0100 replace the questInfo to use table-like behavior, expands to the content
2019-03-18 20:06:32 +00:00
.input-group > * {
height: 40px;
}
input, textarea {
border: none;
background: rgba(0, 0, 0, 0.24);
color: rgba($white, 0.64) !important;
transition-property: border-color, box-shadow, color, background;
&:focus, &:active {
color: $white !important;
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.32);
}
&:focus, &:active, &:hover {
background-color: rgba(0, 0, 0, 0.40);
}
}
.modal-content {
border-radius: 8px;
border: none;
}
.modal-header, .modal-body, .modal-footer {
padding: 0px;
border: none;
}
.task-modal-content, .task-modal-header {
padding-left: 23px;
padding-right: 23px;
}
.task-modal-header {
color: $white;
width: 100%;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
padding-top: 16px;
padding-bottom: 24px;
h1 {
color: $white;
}
}
.task-modal-content {
padding-top: 24px;
input {
background: $white;
border: 1px solid $gray-400;
color: $gray-200 !important;
&:focus {
color: $gray-50 !important;
}
}
}
.info-icon {
float: left;
height: 16px;
width: 16px;
margin-left: 8px;
margin-top: 2px;
}
.difficulty-trivial-icon {
width: 16px;
height: 16px;
color: $gray-300;
}
.difficulty-normal-icon {
width: 36px;
height: 16px;
color: $gray-300;
}
.difficulty-medium-icon {
width: 36px;
height: 32px;
color: $gray-300;
}
.difficulty-hard-icon {
width: 36px;
height: 36px;
color: $gray-300;
}
.option {
margin-bottom: 12px;
margin-top: 12px;
position: relative;
.custom-control-label p {
word-break: break-word;
}
}
.difficulty-options .option-item-selected .svg-icon {
color: $white !important;
}
.option-item {
margin-right: 48px;
cursor: pointer;
&:last-child {
margin-right: 0px;
}
&-box {
width: 64px;
height: 64px;
border-radius: 2px;
background: $gray-600;
margin-bottom: 8px;
display: flex;
align-items: center;
justify-content: center;
}
&-label {
color: $gray-50;
text-align: center;
transition-property: none;
}
}
.habit-control {
.option-item-box {
background: $white;
border: 2px solid $gray-600;
.habit-control { background: $gray-300; }
.svg-icon { color: $white; }
}
&-enabled {
.option-item-box {
border: 2px solid transparent;
transition-property: none;
.habit-control { background: $white !important; }
}
}
}
.category-wrap {
cursor: pointer;
margin-top: 0px;
width: 100%;
}
.category-box {
bottom: 0px;
left: 40px;
top: auto;
z-index: 11;
.container {
max-height: 90vh;
overflow: auto;
}
}
Release with develop (#9162) * Client: fix Apidoc and move email files (#9139) * fix apidoc * move emails files * quest leader can start/end quest; admins can edit challenges/guilds; reverse chat works; remove static/videos link; etc (#9140) * enable link to markdown info on group and challenge edit screen * allow admin (moderators and staff) to edit challenges * allow admin (moderators and staff) to edit guilds Also add some unrelated TODO comments. * allow any party member (not just leader) to start quest from party page * allow quest owner to cancel, begin, abort quest Previously only the party leader could see those buttons. The leader still can. This also hides those buttons from all other party members. * enable reverse chat in guilds and party * remove outdated videos from press kit * adjust various wordings * Be consistent with capitalization of Check-In. (#9118) * limit for inlined svg images and make home leaner by not bundling it with the rest of static pages * sep 27 fixes (#9088) * fix item paddings / drawer width * expand the width of item-rows by the margin of an item * fix hatchedPet-dialog * fix hatching-modal * remove min-height * Oct 3 fixes (#9148) * Only show level after yesterdailies modal * Fixed zindex * Added spcial spells to rewards column * Added single click buy for health and armoire * Prevented task scoring when casting a spell * Renamed generic purchase method * Updated nav for small screen * Hide checklist while casting * fix some text describing menu items (#9145) * 4.1.3 * use `selectGearToPin` instead of updateStore in migration-script (#9102) * Tags redesign in edit-task modal (#9122) * Truncate tags list to maximum number of tasks This commit truncates the list of tags in the edit task modal and displays the remaining selected tasks as a number. * Align tags-select dropdown with "Tags" label * Add tags popup component * Use solid purple for tags-select dropdown * Remove shadow when tags-select is active * Add border-radius to tags-select * Re-add previously disabled transitions * Remove unused template element * Add Clear Tags button to footer of tags popup * Decrease column size for tags to better match design * Truncate tag name to avoid overflows * Add tag name as title to show full name on hover * Grow inline tags select from left to right * Style none button * Add spacing to streak reset button to line up with tags select * Add top offset to tags dropdown toggle to line up with label * Ability to collapse checklists (#9158) * ability to collapse checklists * typo * show warning to use the mobile apps (#9152) * Oct 4 fixes (#9159) * Added gem purchase note * Added notification count * Added party reload * Added description when user can no longer purchase gems this month * Prevent modal from showing when pruchasing recently purchased items * Added progress bar * Prevented non leader from loading approvals * Added group billing * Release fix (#9161) * Merge Develop onto Release (#9123) * Some random quick (#9111) * Switch group button directions * Allowed admins to export challenges * Added scoping to some stable styles * Fixed challenge cloning * Tasks tags (#9112) * Added auto apply and exit * Add challenge tag editing * Fixed lint * Skill fixes (#9113) * Added local storage setting for spell drawer * Added new spell styles * Fixed typo * Reset local creds if access is denied (#9114) * various fixes: group leader's name at top of edit drop-down; Members List; etc (#9117) * fix text describing location of subscription/gem gift box * disable Copy As To-Do in Tavern, guilds, party because it's not working * change members label on group pages to Member List * remove outdated info about seeing number of Gems available to buy * allow Danger Zone to be seen by players without local authentication Also add an hr because the Danger Zone heading was crammed up against the button above it. * put current group leader's name at top of Leader change drop-down * Client Fixes (#9120) * unduplicate logout code * re-enable debug menu * fix pets badge and equipping mounts * close gift modal after sending gems * armoire notifications * Oct 1 fixes (#9121) * Added default tags to task * Added seasonal gear check and show spooky * Disabled spooky sparkles * Fixed challenge remove tasks modal * Hid checklist * Added group gems modal * Purchase with amazon * Added check for user health * Added missing notification file * 4.1.1 * 4.1.2 * Merge develop into release (#9154) * Client: fix Apidoc and move email files (#9139) * fix apidoc * move emails files * quest leader can start/end quest; admins can edit challenges/guilds; reverse chat works; remove static/videos link; etc (#9140) * enable link to markdown info on group and challenge edit screen * allow admin (moderators and staff) to edit challenges * allow admin (moderators and staff) to edit guilds Also add some unrelated TODO comments. * allow any party member (not just leader) to start quest from party page * allow quest owner to cancel, begin, abort quest Previously only the party leader could see those buttons. The leader still can. This also hides those buttons from all other party members. * enable reverse chat in guilds and party * remove outdated videos from press kit * adjust various wordings * Be consistent with capitalization of Check-In. (#9118) * limit for inlined svg images and make home leaner by not bundling it with the rest of static pages * sep 27 fixes (#9088) * fix item paddings / drawer width * expand the width of item-rows by the margin of an item * fix hatchedPet-dialog * fix hatching-modal * remove min-height * Oct 3 fixes (#9148) * Only show level after yesterdailies modal * Fixed zindex * Added spcial spells to rewards column * Added single click buy for health and armoire * Prevented task scoring when casting a spell * Renamed generic purchase method * Updated nav for small screen * Hide checklist while casting * fix some text describing menu items (#9145)
2017-10-04 23:26:05 +00:00
.tags-select {
position: relative;
.tags-inline {
.category-wrap {
cursor: inherit;
position: relative;
border: 1px solid transparent;
border-radius: 2px;
display: inline-block;
Release with develop (#9162) * Client: fix Apidoc and move email files (#9139) * fix apidoc * move emails files * quest leader can start/end quest; admins can edit challenges/guilds; reverse chat works; remove static/videos link; etc (#9140) * enable link to markdown info on group and challenge edit screen * allow admin (moderators and staff) to edit challenges * allow admin (moderators and staff) to edit guilds Also add some unrelated TODO comments. * allow any party member (not just leader) to start quest from party page * allow quest owner to cancel, begin, abort quest Previously only the party leader could see those buttons. The leader still can. This also hides those buttons from all other party members. * enable reverse chat in guilds and party * remove outdated videos from press kit * adjust various wordings * Be consistent with capitalization of Check-In. (#9118) * limit for inlined svg images and make home leaner by not bundling it with the rest of static pages * sep 27 fixes (#9088) * fix item paddings / drawer width * expand the width of item-rows by the margin of an item * fix hatchedPet-dialog * fix hatching-modal * remove min-height * Oct 3 fixes (#9148) * Only show level after yesterdailies modal * Fixed zindex * Added spcial spells to rewards column * Added single click buy for health and armoire * Prevented task scoring when casting a spell * Renamed generic purchase method * Updated nav for small screen * Hide checklist while casting * fix some text describing menu items (#9145) * 4.1.3 * use `selectGearToPin` instead of updateStore in migration-script (#9102) * Tags redesign in edit-task modal (#9122) * Truncate tags list to maximum number of tasks This commit truncates the list of tags in the edit task modal and displays the remaining selected tasks as a number. * Align tags-select dropdown with "Tags" label * Add tags popup component * Use solid purple for tags-select dropdown * Remove shadow when tags-select is active * Add border-radius to tags-select * Re-add previously disabled transitions * Remove unused template element * Add Clear Tags button to footer of tags popup * Decrease column size for tags to better match design * Truncate tag name to avoid overflows * Add tag name as title to show full name on hover * Grow inline tags select from left to right * Style none button * Add spacing to streak reset button to line up with tags select * Add top offset to tags dropdown toggle to line up with label * Ability to collapse checklists (#9158) * ability to collapse checklists * typo * show warning to use the mobile apps (#9152) * Oct 4 fixes (#9159) * Added gem purchase note * Added notification count * Added party reload * Added description when user can no longer purchase gems this month * Prevent modal from showing when pruchasing recently purchased items * Added progress bar * Prevented non leader from loading approvals * Added group billing * Release fix (#9161) * Merge Develop onto Release (#9123) * Some random quick (#9111) * Switch group button directions * Allowed admins to export challenges * Added scoping to some stable styles * Fixed challenge cloning * Tasks tags (#9112) * Added auto apply and exit * Add challenge tag editing * Fixed lint * Skill fixes (#9113) * Added local storage setting for spell drawer * Added new spell styles * Fixed typo * Reset local creds if access is denied (#9114) * various fixes: group leader's name at top of edit drop-down; Members List; etc (#9117) * fix text describing location of subscription/gem gift box * disable Copy As To-Do in Tavern, guilds, party because it's not working * change members label on group pages to Member List * remove outdated info about seeing number of Gems available to buy * allow Danger Zone to be seen by players without local authentication Also add an hr because the Danger Zone heading was crammed up against the button above it. * put current group leader's name at top of Leader change drop-down * Client Fixes (#9120) * unduplicate logout code * re-enable debug menu * fix pets badge and equipping mounts * close gift modal after sending gems * armoire notifications * Oct 1 fixes (#9121) * Added default tags to task * Added seasonal gear check and show spooky * Disabled spooky sparkles * Fixed challenge remove tasks modal * Hid checklist * Added group gems modal * Purchase with amazon * Added check for user health * Added missing notification file * 4.1.1 * 4.1.2 * Merge develop into release (#9154) * Client: fix Apidoc and move email files (#9139) * fix apidoc * move emails files * quest leader can start/end quest; admins can edit challenges/guilds; reverse chat works; remove static/videos link; etc (#9140) * enable link to markdown info on group and challenge edit screen * allow admin (moderators and staff) to edit challenges * allow admin (moderators and staff) to edit guilds Also add some unrelated TODO comments. * allow any party member (not just leader) to start quest from party page * allow quest owner to cancel, begin, abort quest Previously only the party leader could see those buttons. The leader still can. This also hides those buttons from all other party members. * enable reverse chat in guilds and party * remove outdated videos from press kit * adjust various wordings * Be consistent with capitalization of Check-In. (#9118) * limit for inlined svg images and make home leaner by not bundling it with the rest of static pages * sep 27 fixes (#9088) * fix item paddings / drawer width * expand the width of item-rows by the margin of an item * fix hatchedPet-dialog * fix hatching-modal * remove min-height * Oct 3 fixes (#9148) * Only show level after yesterdailies modal * Fixed zindex * Added spcial spells to rewards column * Added single click buy for health and armoire * Prevented task scoring when casting a spell * Renamed generic purchase method * Updated nav for small screen * Hide checklist while casting * fix some text describing menu items (#9145)
2017-10-04 23:26:05 +00:00
&.active {
border-color: $purple-500;
.category-select {
box-shadow: none;
}
}
.category-select {
align-items: center;
display: flex;
padding: .6em;
padding-right: 2.8em;
width: 100%;
.tags-none {
margin: .26em 0 .26em .6em;
& + .dropdown-toggle {
right: 1.3em;
}
}
.tags-more {
color: $gray-300;
Release with develop (#9162) * Client: fix Apidoc and move email files (#9139) * fix apidoc * move emails files * quest leader can start/end quest; admins can edit challenges/guilds; reverse chat works; remove static/videos link; etc (#9140) * enable link to markdown info on group and challenge edit screen * allow admin (moderators and staff) to edit challenges * allow admin (moderators and staff) to edit guilds Also add some unrelated TODO comments. * allow any party member (not just leader) to start quest from party page * allow quest owner to cancel, begin, abort quest Previously only the party leader could see those buttons. The leader still can. This also hides those buttons from all other party members. * enable reverse chat in guilds and party * remove outdated videos from press kit * adjust various wordings * Be consistent with capitalization of Check-In. (#9118) * limit for inlined svg images and make home leaner by not bundling it with the rest of static pages * sep 27 fixes (#9088) * fix item paddings / drawer width * expand the width of item-rows by the margin of an item * fix hatchedPet-dialog * fix hatching-modal * remove min-height * Oct 3 fixes (#9148) * Only show level after yesterdailies modal * Fixed zindex * Added spcial spells to rewards column * Added single click buy for health and armoire * Prevented task scoring when casting a spell * Renamed generic purchase method * Updated nav for small screen * Hide checklist while casting * fix some text describing menu items (#9145) * 4.1.3 * use `selectGearToPin` instead of updateStore in migration-script (#9102) * Tags redesign in edit-task modal (#9122) * Truncate tags list to maximum number of tasks This commit truncates the list of tags in the edit task modal and displays the remaining selected tasks as a number. * Align tags-select dropdown with "Tags" label * Add tags popup component * Use solid purple for tags-select dropdown * Remove shadow when tags-select is active * Add border-radius to tags-select * Re-add previously disabled transitions * Remove unused template element * Add Clear Tags button to footer of tags popup * Decrease column size for tags to better match design * Truncate tag name to avoid overflows * Add tag name as title to show full name on hover * Grow inline tags select from left to right * Style none button * Add spacing to streak reset button to line up with tags select * Add top offset to tags dropdown toggle to line up with label * Ability to collapse checklists (#9158) * ability to collapse checklists * typo * show warning to use the mobile apps (#9152) * Oct 4 fixes (#9159) * Added gem purchase note * Added notification count * Added party reload * Added description when user can no longer purchase gems this month * Prevent modal from showing when pruchasing recently purchased items * Added progress bar * Prevented non leader from loading approvals * Added group billing * Release fix (#9161) * Merge Develop onto Release (#9123) * Some random quick (#9111) * Switch group button directions * Allowed admins to export challenges * Added scoping to some stable styles * Fixed challenge cloning * Tasks tags (#9112) * Added auto apply and exit * Add challenge tag editing * Fixed lint * Skill fixes (#9113) * Added local storage setting for spell drawer * Added new spell styles * Fixed typo * Reset local creds if access is denied (#9114) * various fixes: group leader's name at top of edit drop-down; Members List; etc (#9117) * fix text describing location of subscription/gem gift box * disable Copy As To-Do in Tavern, guilds, party because it's not working * change members label on group pages to Member List * remove outdated info about seeing number of Gems available to buy * allow Danger Zone to be seen by players without local authentication Also add an hr because the Danger Zone heading was crammed up against the button above it. * put current group leader's name at top of Leader change drop-down * Client Fixes (#9120) * unduplicate logout code * re-enable debug menu * fix pets badge and equipping mounts * close gift modal after sending gems * armoire notifications * Oct 1 fixes (#9121) * Added default tags to task * Added seasonal gear check and show spooky * Disabled spooky sparkles * Fixed challenge remove tasks modal * Hid checklist * Added group gems modal * Purchase with amazon * Added check for user health * Added missing notification file * 4.1.1 * 4.1.2 * Merge develop into release (#9154) * Client: fix Apidoc and move email files (#9139) * fix apidoc * move emails files * quest leader can start/end quest; admins can edit challenges/guilds; reverse chat works; remove static/videos link; etc (#9140) * enable link to markdown info on group and challenge edit screen * allow admin (moderators and staff) to edit challenges * allow admin (moderators and staff) to edit guilds Also add some unrelated TODO comments. * allow any party member (not just leader) to start quest from party page * allow quest owner to cancel, begin, abort quest Previously only the party leader could see those buttons. The leader still can. This also hides those buttons from all other party members. * enable reverse chat in guilds and party * remove outdated videos from press kit * adjust various wordings * Be consistent with capitalization of Check-In. (#9118) * limit for inlined svg images and make home leaner by not bundling it with the rest of static pages * sep 27 fixes (#9088) * fix item paddings / drawer width * expand the width of item-rows by the margin of an item * fix hatchedPet-dialog * fix hatching-modal * remove min-height * Oct 3 fixes (#9148) * Only show level after yesterdailies modal * Fixed zindex * Added spcial spells to rewards column * Added single click buy for health and armoire * Prevented task scoring when casting a spell * Renamed generic purchase method * Updated nav for small screen * Hide checklist while casting * fix some text describing menu items (#9145)
2017-10-04 23:26:05 +00:00
flex: 0 1 auto;
font-size: 12px;
text-align: left;
position: relative;
left: .5em;
width: 100%;
}
.dropdown-toggle {
position: absolute;
right: 1em;
top: .8em;
}
.category-label {
min-width: 68px;
padding: .5em 1em;
width: 68px;
// Applies to v-markdown generated p tag.
p {
margin-bottom: 0px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-wrap: break-word;
}
Release with develop (#9162) * Client: fix Apidoc and move email files (#9139) * fix apidoc * move emails files * quest leader can start/end quest; admins can edit challenges/guilds; reverse chat works; remove static/videos link; etc (#9140) * enable link to markdown info on group and challenge edit screen * allow admin (moderators and staff) to edit challenges * allow admin (moderators and staff) to edit guilds Also add some unrelated TODO comments. * allow any party member (not just leader) to start quest from party page * allow quest owner to cancel, begin, abort quest Previously only the party leader could see those buttons. The leader still can. This also hides those buttons from all other party members. * enable reverse chat in guilds and party * remove outdated videos from press kit * adjust various wordings * Be consistent with capitalization of Check-In. (#9118) * limit for inlined svg images and make home leaner by not bundling it with the rest of static pages * sep 27 fixes (#9088) * fix item paddings / drawer width * expand the width of item-rows by the margin of an item * fix hatchedPet-dialog * fix hatching-modal * remove min-height * Oct 3 fixes (#9148) * Only show level after yesterdailies modal * Fixed zindex * Added spcial spells to rewards column * Added single click buy for health and armoire * Prevented task scoring when casting a spell * Renamed generic purchase method * Updated nav for small screen * Hide checklist while casting * fix some text describing menu items (#9145) * 4.1.3 * use `selectGearToPin` instead of updateStore in migration-script (#9102) * Tags redesign in edit-task modal (#9122) * Truncate tags list to maximum number of tasks This commit truncates the list of tags in the edit task modal and displays the remaining selected tasks as a number. * Align tags-select dropdown with "Tags" label * Add tags popup component * Use solid purple for tags-select dropdown * Remove shadow when tags-select is active * Add border-radius to tags-select * Re-add previously disabled transitions * Remove unused template element * Add Clear Tags button to footer of tags popup * Decrease column size for tags to better match design * Truncate tag name to avoid overflows * Add tag name as title to show full name on hover * Grow inline tags select from left to right * Style none button * Add spacing to streak reset button to line up with tags select * Add top offset to tags dropdown toggle to line up with label * Ability to collapse checklists (#9158) * ability to collapse checklists * typo * show warning to use the mobile apps (#9152) * Oct 4 fixes (#9159) * Added gem purchase note * Added notification count * Added party reload * Added description when user can no longer purchase gems this month * Prevent modal from showing when pruchasing recently purchased items * Added progress bar * Prevented non leader from loading approvals * Added group billing * Release fix (#9161) * Merge Develop onto Release (#9123) * Some random quick (#9111) * Switch group button directions * Allowed admins to export challenges * Added scoping to some stable styles * Fixed challenge cloning * Tasks tags (#9112) * Added auto apply and exit * Add challenge tag editing * Fixed lint * Skill fixes (#9113) * Added local storage setting for spell drawer * Added new spell styles * Fixed typo * Reset local creds if access is denied (#9114) * various fixes: group leader's name at top of edit drop-down; Members List; etc (#9117) * fix text describing location of subscription/gem gift box * disable Copy As To-Do in Tavern, guilds, party because it's not working * change members label on group pages to Member List * remove outdated info about seeing number of Gems available to buy * allow Danger Zone to be seen by players without local authentication Also add an hr because the Danger Zone heading was crammed up against the button above it. * put current group leader's name at top of Leader change drop-down * Client Fixes (#9120) * unduplicate logout code * re-enable debug menu * fix pets badge and equipping mounts * close gift modal after sending gems * armoire notifications * Oct 1 fixes (#9121) * Added default tags to task * Added seasonal gear check and show spooky * Disabled spooky sparkles * Fixed challenge remove tasks modal * Hid checklist * Added group gems modal * Purchase with amazon * Added check for user health * Added missing notification file * 4.1.1 * 4.1.2 * Merge develop into release (#9154) * Client: fix Apidoc and move email files (#9139) * fix apidoc * move emails files * quest leader can start/end quest; admins can edit challenges/guilds; reverse chat works; remove static/videos link; etc (#9140) * enable link to markdown info on group and challenge edit screen * allow admin (moderators and staff) to edit challenges * allow admin (moderators and staff) to edit guilds Also add some unrelated TODO comments. * allow any party member (not just leader) to start quest from party page * allow quest owner to cancel, begin, abort quest Previously only the party leader could see those buttons. The leader still can. This also hides those buttons from all other party members. * enable reverse chat in guilds and party * remove outdated videos from press kit * adjust various wordings * Be consistent with capitalization of Check-In. (#9118) * limit for inlined svg images and make home leaner by not bundling it with the rest of static pages * sep 27 fixes (#9088) * fix item paddings / drawer width * expand the width of item-rows by the margin of an item * fix hatchedPet-dialog * fix hatching-modal * remove min-height * Oct 3 fixes (#9148) * Only show level after yesterdailies modal * Fixed zindex * Added spcial spells to rewards column * Added single click buy for health and armoire * Prevented task scoring when casting a spell * Renamed generic purchase method * Updated nav for small screen * Hide checklist while casting * fix some text describing menu items (#9145)
2017-10-04 23:26:05 +00:00
}
}
}
}
.tags-popup {
position: absolute;
top: 100%;
Release with develop (#9162) * Client: fix Apidoc and move email files (#9139) * fix apidoc * move emails files * quest leader can start/end quest; admins can edit challenges/guilds; reverse chat works; remove static/videos link; etc (#9140) * enable link to markdown info on group and challenge edit screen * allow admin (moderators and staff) to edit challenges * allow admin (moderators and staff) to edit guilds Also add some unrelated TODO comments. * allow any party member (not just leader) to start quest from party page * allow quest owner to cancel, begin, abort quest Previously only the party leader could see those buttons. The leader still can. This also hides those buttons from all other party members. * enable reverse chat in guilds and party * remove outdated videos from press kit * adjust various wordings * Be consistent with capitalization of Check-In. (#9118) * limit for inlined svg images and make home leaner by not bundling it with the rest of static pages * sep 27 fixes (#9088) * fix item paddings / drawer width * expand the width of item-rows by the margin of an item * fix hatchedPet-dialog * fix hatching-modal * remove min-height * Oct 3 fixes (#9148) * Only show level after yesterdailies modal * Fixed zindex * Added spcial spells to rewards column * Added single click buy for health and armoire * Prevented task scoring when casting a spell * Renamed generic purchase method * Updated nav for small screen * Hide checklist while casting * fix some text describing menu items (#9145) * 4.1.3 * use `selectGearToPin` instead of updateStore in migration-script (#9102) * Tags redesign in edit-task modal (#9122) * Truncate tags list to maximum number of tasks This commit truncates the list of tags in the edit task modal and displays the remaining selected tasks as a number. * Align tags-select dropdown with "Tags" label * Add tags popup component * Use solid purple for tags-select dropdown * Remove shadow when tags-select is active * Add border-radius to tags-select * Re-add previously disabled transitions * Remove unused template element * Add Clear Tags button to footer of tags popup * Decrease column size for tags to better match design * Truncate tag name to avoid overflows * Add tag name as title to show full name on hover * Grow inline tags select from left to right * Style none button * Add spacing to streak reset button to line up with tags select * Add top offset to tags dropdown toggle to line up with label * Ability to collapse checklists (#9158) * ability to collapse checklists * typo * show warning to use the mobile apps (#9152) * Oct 4 fixes (#9159) * Added gem purchase note * Added notification count * Added party reload * Added description when user can no longer purchase gems this month * Prevent modal from showing when pruchasing recently purchased items * Added progress bar * Prevented non leader from loading approvals * Added group billing * Release fix (#9161) * Merge Develop onto Release (#9123) * Some random quick (#9111) * Switch group button directions * Allowed admins to export challenges * Added scoping to some stable styles * Fixed challenge cloning * Tasks tags (#9112) * Added auto apply and exit * Add challenge tag editing * Fixed lint * Skill fixes (#9113) * Added local storage setting for spell drawer * Added new spell styles * Fixed typo * Reset local creds if access is denied (#9114) * various fixes: group leader's name at top of edit drop-down; Members List; etc (#9117) * fix text describing location of subscription/gem gift box * disable Copy As To-Do in Tavern, guilds, party because it's not working * change members label on group pages to Member List * remove outdated info about seeing number of Gems available to buy * allow Danger Zone to be seen by players without local authentication Also add an hr because the Danger Zone heading was crammed up against the button above it. * put current group leader's name at top of Leader change drop-down * Client Fixes (#9120) * unduplicate logout code * re-enable debug menu * fix pets badge and equipping mounts * close gift modal after sending gems * armoire notifications * Oct 1 fixes (#9121) * Added default tags to task * Added seasonal gear check and show spooky * Disabled spooky sparkles * Fixed challenge remove tasks modal * Hid checklist * Added group gems modal * Purchase with amazon * Added check for user health * Added missing notification file * 4.1.1 * 4.1.2 * Merge develop into release (#9154) * Client: fix Apidoc and move email files (#9139) * fix apidoc * move emails files * quest leader can start/end quest; admins can edit challenges/guilds; reverse chat works; remove static/videos link; etc (#9140) * enable link to markdown info on group and challenge edit screen * allow admin (moderators and staff) to edit challenges * allow admin (moderators and staff) to edit guilds Also add some unrelated TODO comments. * allow any party member (not just leader) to start quest from party page * allow quest owner to cancel, begin, abort quest Previously only the party leader could see those buttons. The leader still can. This also hides those buttons from all other party members. * enable reverse chat in guilds and party * remove outdated videos from press kit * adjust various wordings * Be consistent with capitalization of Check-In. (#9118) * limit for inlined svg images and make home leaner by not bundling it with the rest of static pages * sep 27 fixes (#9088) * fix item paddings / drawer width * expand the width of item-rows by the margin of an item * fix hatchedPet-dialog * fix hatching-modal * remove min-height * Oct 3 fixes (#9148) * Only show level after yesterdailies modal * Fixed zindex * Added spcial spells to rewards column * Added single click buy for health and armoire * Prevented task scoring when casting a spell * Renamed generic purchase method * Updated nav for small screen * Hide checklist while casting * fix some text describing menu items (#9145)
2017-10-04 23:26:05 +00:00
}
}
.checklist-group {
border-top: 1px solid $gray-500;
.input-group-append {
background: inherit;
}
.checklist-item {
padding-left: 12px;
}
}
// From: https://codepen.io/zachariab/pen/wkrbc
span.grippy {
content: '....';
width: 20px;
height: 20px;
display: inline-block;
overflow: hidden;
line-height: 5px;
padding: 3px 4px;
cursor: move;
vertical-align: middle;
margin-top: .5em;
margin-right: .3em;
font-size: 12px;
letter-spacing: 2px;
color: $gray-300;
text-shadow: 1px 0 1px black;
}
span.grippy::after {
content: '.. .. .. ..';
}
.checklist-item {
margin-bottom: 0px;
border-radius: 0px;
border: none !important;
padding-left: 36px;
&:last-child {
background-repeat: no-repeat;
background-position: center left 10px;
border-top: 1px solid $gray-500 !important;
border-bottom: 1px solid $gray-500 !important;
background-size: 10px 10px;
background-image: url(~client/assets/svg/for-css/positive.svg);
}
2017-11-13 11:08:42 +00:00
}
.checklist-group {
.destroy-icon {
display: none;
}
&:hover {
cursor: text;
2017-11-13 11:08:42 +00:00
.destroy-icon {
display: inline-block;
color: $gray-200;
}
}
}
.delete-task-btn, .cancel-task-btn {
cursor: pointer;
&:hover, &:focus, &:active {
text-decoration: underline;
}
}
.delete-task-btn {
2018-01-17 18:33:21 +00:00
margin-top: 32px;
margin-bottom: 8px;
color: $red-50;
.svg-icon {
width: 14px;
height: 16px;
margin-right: 8.5px;
2017-12-20 16:33:21 +00:00
}
}
.task-modal-footer {
padding: 16px 24px;
width: 100%;
.cancel-task-btn {
margin-right: 16px;
color: $blue-10;
}
}
.weekday-check {
margin-left: 0px;
width: 57px;
}
.advanced-settings {
background: $gray-700;
margin-left: -23px;
margin-right: -23px;
padding: 16px 24px;
margin-bottom: -8px;
2018-01-13 10:27:02 +00:00
&-toggle {
cursor: pointer;
}
&-body {
margin-top: 17px;
}
h3 {
color: $gray-10;
margin-bottom: 0px;
}
.attributes .custom-control {
margin-right: 40px;
}
.toggle-open {
transform: rotate(180deg);
}
.attr-description {
border-bottom: 1px dashed;
}
}
}
2017-12-26 23:31:00 +00:00
@media only screen and (max-width: 768px) {
.option-item {
margin-right: 12px !important;
}
}
</style>
<style lang="scss" scoped>
.gold {
width: 24px;
margin: 0 7px;
}
</style>
<script>
Release with develop (#9162) * Client: fix Apidoc and move email files (#9139) * fix apidoc * move emails files * quest leader can start/end quest; admins can edit challenges/guilds; reverse chat works; remove static/videos link; etc (#9140) * enable link to markdown info on group and challenge edit screen * allow admin (moderators and staff) to edit challenges * allow admin (moderators and staff) to edit guilds Also add some unrelated TODO comments. * allow any party member (not just leader) to start quest from party page * allow quest owner to cancel, begin, abort quest Previously only the party leader could see those buttons. The leader still can. This also hides those buttons from all other party members. * enable reverse chat in guilds and party * remove outdated videos from press kit * adjust various wordings * Be consistent with capitalization of Check-In. (#9118) * limit for inlined svg images and make home leaner by not bundling it with the rest of static pages * sep 27 fixes (#9088) * fix item paddings / drawer width * expand the width of item-rows by the margin of an item * fix hatchedPet-dialog * fix hatching-modal * remove min-height * Oct 3 fixes (#9148) * Only show level after yesterdailies modal * Fixed zindex * Added spcial spells to rewards column * Added single click buy for health and armoire * Prevented task scoring when casting a spell * Renamed generic purchase method * Updated nav for small screen * Hide checklist while casting * fix some text describing menu items (#9145) * 4.1.3 * use `selectGearToPin` instead of updateStore in migration-script (#9102) * Tags redesign in edit-task modal (#9122) * Truncate tags list to maximum number of tasks This commit truncates the list of tags in the edit task modal and displays the remaining selected tasks as a number. * Align tags-select dropdown with "Tags" label * Add tags popup component * Use solid purple for tags-select dropdown * Remove shadow when tags-select is active * Add border-radius to tags-select * Re-add previously disabled transitions * Remove unused template element * Add Clear Tags button to footer of tags popup * Decrease column size for tags to better match design * Truncate tag name to avoid overflows * Add tag name as title to show full name on hover * Grow inline tags select from left to right * Style none button * Add spacing to streak reset button to line up with tags select * Add top offset to tags dropdown toggle to line up with label * Ability to collapse checklists (#9158) * ability to collapse checklists * typo * show warning to use the mobile apps (#9152) * Oct 4 fixes (#9159) * Added gem purchase note * Added notification count * Added party reload * Added description when user can no longer purchase gems this month * Prevent modal from showing when pruchasing recently purchased items * Added progress bar * Prevented non leader from loading approvals * Added group billing * Release fix (#9161) * Merge Develop onto Release (#9123) * Some random quick (#9111) * Switch group button directions * Allowed admins to export challenges * Added scoping to some stable styles * Fixed challenge cloning * Tasks tags (#9112) * Added auto apply and exit * Add challenge tag editing * Fixed lint * Skill fixes (#9113) * Added local storage setting for spell drawer * Added new spell styles * Fixed typo * Reset local creds if access is denied (#9114) * various fixes: group leader's name at top of edit drop-down; Members List; etc (#9117) * fix text describing location of subscription/gem gift box * disable Copy As To-Do in Tavern, guilds, party because it's not working * change members label on group pages to Member List * remove outdated info about seeing number of Gems available to buy * allow Danger Zone to be seen by players without local authentication Also add an hr because the Danger Zone heading was crammed up against the button above it. * put current group leader's name at top of Leader change drop-down * Client Fixes (#9120) * unduplicate logout code * re-enable debug menu * fix pets badge and equipping mounts * close gift modal after sending gems * armoire notifications * Oct 1 fixes (#9121) * Added default tags to task * Added seasonal gear check and show spooky * Disabled spooky sparkles * Fixed challenge remove tasks modal * Hid checklist * Added group gems modal * Purchase with amazon * Added check for user health * Added missing notification file * 4.1.1 * 4.1.2 * Merge develop into release (#9154) * Client: fix Apidoc and move email files (#9139) * fix apidoc * move emails files * quest leader can start/end quest; admins can edit challenges/guilds; reverse chat works; remove static/videos link; etc (#9140) * enable link to markdown info on group and challenge edit screen * allow admin (moderators and staff) to edit challenges * allow admin (moderators and staff) to edit guilds Also add some unrelated TODO comments. * allow any party member (not just leader) to start quest from party page * allow quest owner to cancel, begin, abort quest Previously only the party leader could see those buttons. The leader still can. This also hides those buttons from all other party members. * enable reverse chat in guilds and party * remove outdated videos from press kit * adjust various wordings * Be consistent with capitalization of Check-In. (#9118) * limit for inlined svg images and make home leaner by not bundling it with the rest of static pages * sep 27 fixes (#9088) * fix item paddings / drawer width * expand the width of item-rows by the margin of an item * fix hatchedPet-dialog * fix hatching-modal * remove min-height * Oct 3 fixes (#9148) * Only show level after yesterdailies modal * Fixed zindex * Added spcial spells to rewards column * Added single click buy for health and armoire * Prevented task scoring when casting a spell * Renamed generic purchase method * Updated nav for small screen * Hide checklist while casting * fix some text describing menu items (#9145)
2017-10-04 23:26:05 +00:00
import TagsPopup from './tagsPopup';
import { mapGetters, mapActions, mapState } from 'client/libs/store';
import markdownDirective from 'client/directives/markdown';
import toggleSwitch from 'client/components/ui/toggleSwitch';
import clone from 'lodash/clone';
import Datepicker from 'vuejs-datepicker';
import moment from 'moment';
import uuid from 'uuid';
import draggable from 'vuedraggable';
import informationIcon from 'assets/svg/information.svg';
import difficultyTrivialIcon from 'assets/svg/difficulty-trivial.svg';
import difficultyMediumIcon from 'assets/svg/difficulty-medium.svg';
import difficultyHardIcon from 'assets/svg/difficulty-hard.svg';
import difficultyNormalIcon from 'assets/svg/difficulty-normal.svg';
import positiveIcon from 'assets/svg/positive.svg';
import negativeIcon from 'assets/svg/negative.svg';
import streakIcon from 'assets/svg/streak.svg';
import deleteIcon from 'assets/svg/delete.svg';
import goldIcon from 'assets/svg/gold.svg';
import downIcon from 'assets/svg/down.svg';
import calendarIcon from 'assets/svg/calendar.svg';
export default {
components: {
Release with develop (#9162) * Client: fix Apidoc and move email files (#9139) * fix apidoc * move emails files * quest leader can start/end quest; admins can edit challenges/guilds; reverse chat works; remove static/videos link; etc (#9140) * enable link to markdown info on group and challenge edit screen * allow admin (moderators and staff) to edit challenges * allow admin (moderators and staff) to edit guilds Also add some unrelated TODO comments. * allow any party member (not just leader) to start quest from party page * allow quest owner to cancel, begin, abort quest Previously only the party leader could see those buttons. The leader still can. This also hides those buttons from all other party members. * enable reverse chat in guilds and party * remove outdated videos from press kit * adjust various wordings * Be consistent with capitalization of Check-In. (#9118) * limit for inlined svg images and make home leaner by not bundling it with the rest of static pages * sep 27 fixes (#9088) * fix item paddings / drawer width * expand the width of item-rows by the margin of an item * fix hatchedPet-dialog * fix hatching-modal * remove min-height * Oct 3 fixes (#9148) * Only show level after yesterdailies modal * Fixed zindex * Added spcial spells to rewards column * Added single click buy for health and armoire * Prevented task scoring when casting a spell * Renamed generic purchase method * Updated nav for small screen * Hide checklist while casting * fix some text describing menu items (#9145) * 4.1.3 * use `selectGearToPin` instead of updateStore in migration-script (#9102) * Tags redesign in edit-task modal (#9122) * Truncate tags list to maximum number of tasks This commit truncates the list of tags in the edit task modal and displays the remaining selected tasks as a number. * Align tags-select dropdown with "Tags" label * Add tags popup component * Use solid purple for tags-select dropdown * Remove shadow when tags-select is active * Add border-radius to tags-select * Re-add previously disabled transitions * Remove unused template element * Add Clear Tags button to footer of tags popup * Decrease column size for tags to better match design * Truncate tag name to avoid overflows * Add tag name as title to show full name on hover * Grow inline tags select from left to right * Style none button * Add spacing to streak reset button to line up with tags select * Add top offset to tags dropdown toggle to line up with label * Ability to collapse checklists (#9158) * ability to collapse checklists * typo * show warning to use the mobile apps (#9152) * Oct 4 fixes (#9159) * Added gem purchase note * Added notification count * Added party reload * Added description when user can no longer purchase gems this month * Prevent modal from showing when pruchasing recently purchased items * Added progress bar * Prevented non leader from loading approvals * Added group billing * Release fix (#9161) * Merge Develop onto Release (#9123) * Some random quick (#9111) * Switch group button directions * Allowed admins to export challenges * Added scoping to some stable styles * Fixed challenge cloning * Tasks tags (#9112) * Added auto apply and exit * Add challenge tag editing * Fixed lint * Skill fixes (#9113) * Added local storage setting for spell drawer * Added new spell styles * Fixed typo * Reset local creds if access is denied (#9114) * various fixes: group leader's name at top of edit drop-down; Members List; etc (#9117) * fix text describing location of subscription/gem gift box * disable Copy As To-Do in Tavern, guilds, party because it's not working * change members label on group pages to Member List * remove outdated info about seeing number of Gems available to buy * allow Danger Zone to be seen by players without local authentication Also add an hr because the Danger Zone heading was crammed up against the button above it. * put current group leader's name at top of Leader change drop-down * Client Fixes (#9120) * unduplicate logout code * re-enable debug menu * fix pets badge and equipping mounts * close gift modal after sending gems * armoire notifications * Oct 1 fixes (#9121) * Added default tags to task * Added seasonal gear check and show spooky * Disabled spooky sparkles * Fixed challenge remove tasks modal * Hid checklist * Added group gems modal * Purchase with amazon * Added check for user health * Added missing notification file * 4.1.1 * 4.1.2 * Merge develop into release (#9154) * Client: fix Apidoc and move email files (#9139) * fix apidoc * move emails files * quest leader can start/end quest; admins can edit challenges/guilds; reverse chat works; remove static/videos link; etc (#9140) * enable link to markdown info on group and challenge edit screen * allow admin (moderators and staff) to edit challenges * allow admin (moderators and staff) to edit guilds Also add some unrelated TODO comments. * allow any party member (not just leader) to start quest from party page * allow quest owner to cancel, begin, abort quest Previously only the party leader could see those buttons. The leader still can. This also hides those buttons from all other party members. * enable reverse chat in guilds and party * remove outdated videos from press kit * adjust various wordings * Be consistent with capitalization of Check-In. (#9118) * limit for inlined svg images and make home leaner by not bundling it with the rest of static pages * sep 27 fixes (#9088) * fix item paddings / drawer width * expand the width of item-rows by the margin of an item * fix hatchedPet-dialog * fix hatching-modal * remove min-height * Oct 3 fixes (#9148) * Only show level after yesterdailies modal * Fixed zindex * Added spcial spells to rewards column * Added single click buy for health and armoire * Prevented task scoring when casting a spell * Renamed generic purchase method * Updated nav for small screen * Hide checklist while casting * fix some text describing menu items (#9145)
2017-10-04 23:26:05 +00:00
TagsPopup,
Datepicker,
toggleSwitch,
draggable,
},
directives: {
markdown: markdownDirective,
},
// purpose is either create or edit, task is the task created or edited
props: ['task', 'purpose', 'challengeId', 'groupId'],
data () {
return {
Release with develop (#9162) * Client: fix Apidoc and move email files (#9139) * fix apidoc * move emails files * quest leader can start/end quest; admins can edit challenges/guilds; reverse chat works; remove static/videos link; etc (#9140) * enable link to markdown info on group and challenge edit screen * allow admin (moderators and staff) to edit challenges * allow admin (moderators and staff) to edit guilds Also add some unrelated TODO comments. * allow any party member (not just leader) to start quest from party page * allow quest owner to cancel, begin, abort quest Previously only the party leader could see those buttons. The leader still can. This also hides those buttons from all other party members. * enable reverse chat in guilds and party * remove outdated videos from press kit * adjust various wordings * Be consistent with capitalization of Check-In. (#9118) * limit for inlined svg images and make home leaner by not bundling it with the rest of static pages * sep 27 fixes (#9088) * fix item paddings / drawer width * expand the width of item-rows by the margin of an item * fix hatchedPet-dialog * fix hatching-modal * remove min-height * Oct 3 fixes (#9148) * Only show level after yesterdailies modal * Fixed zindex * Added spcial spells to rewards column * Added single click buy for health and armoire * Prevented task scoring when casting a spell * Renamed generic purchase method * Updated nav for small screen * Hide checklist while casting * fix some text describing menu items (#9145) * 4.1.3 * use `selectGearToPin` instead of updateStore in migration-script (#9102) * Tags redesign in edit-task modal (#9122) * Truncate tags list to maximum number of tasks This commit truncates the list of tags in the edit task modal and displays the remaining selected tasks as a number. * Align tags-select dropdown with "Tags" label * Add tags popup component * Use solid purple for tags-select dropdown * Remove shadow when tags-select is active * Add border-radius to tags-select * Re-add previously disabled transitions * Remove unused template element * Add Clear Tags button to footer of tags popup * Decrease column size for tags to better match design * Truncate tag name to avoid overflows * Add tag name as title to show full name on hover * Grow inline tags select from left to right * Style none button * Add spacing to streak reset button to line up with tags select * Add top offset to tags dropdown toggle to line up with label * Ability to collapse checklists (#9158) * ability to collapse checklists * typo * show warning to use the mobile apps (#9152) * Oct 4 fixes (#9159) * Added gem purchase note * Added notification count * Added party reload * Added description when user can no longer purchase gems this month * Prevent modal from showing when pruchasing recently purchased items * Added progress bar * Prevented non leader from loading approvals * Added group billing * Release fix (#9161) * Merge Develop onto Release (#9123) * Some random quick (#9111) * Switch group button directions * Allowed admins to export challenges * Added scoping to some stable styles * Fixed challenge cloning * Tasks tags (#9112) * Added auto apply and exit * Add challenge tag editing * Fixed lint * Skill fixes (#9113) * Added local storage setting for spell drawer * Added new spell styles * Fixed typo * Reset local creds if access is denied (#9114) * various fixes: group leader's name at top of edit drop-down; Members List; etc (#9117) * fix text describing location of subscription/gem gift box * disable Copy As To-Do in Tavern, guilds, party because it's not working * change members label on group pages to Member List * remove outdated info about seeing number of Gems available to buy * allow Danger Zone to be seen by players without local authentication Also add an hr because the Danger Zone heading was crammed up against the button above it. * put current group leader's name at top of Leader change drop-down * Client Fixes (#9120) * unduplicate logout code * re-enable debug menu * fix pets badge and equipping mounts * close gift modal after sending gems * armoire notifications * Oct 1 fixes (#9121) * Added default tags to task * Added seasonal gear check and show spooky * Disabled spooky sparkles * Fixed challenge remove tasks modal * Hid checklist * Added group gems modal * Purchase with amazon * Added check for user health * Added missing notification file * 4.1.1 * 4.1.2 * Merge develop into release (#9154) * Client: fix Apidoc and move email files (#9139) * fix apidoc * move emails files * quest leader can start/end quest; admins can edit challenges/guilds; reverse chat works; remove static/videos link; etc (#9140) * enable link to markdown info on group and challenge edit screen * allow admin (moderators and staff) to edit challenges * allow admin (moderators and staff) to edit guilds Also add some unrelated TODO comments. * allow any party member (not just leader) to start quest from party page * allow quest owner to cancel, begin, abort quest Previously only the party leader could see those buttons. The leader still can. This also hides those buttons from all other party members. * enable reverse chat in guilds and party * remove outdated videos from press kit * adjust various wordings * Be consistent with capitalization of Check-In. (#9118) * limit for inlined svg images and make home leaner by not bundling it with the rest of static pages * sep 27 fixes (#9088) * fix item paddings / drawer width * expand the width of item-rows by the margin of an item * fix hatchedPet-dialog * fix hatching-modal * remove min-height * Oct 3 fixes (#9148) * Only show level after yesterdailies modal * Fixed zindex * Added spcial spells to rewards column * Added single click buy for health and armoire * Prevented task scoring when casting a spell * Renamed generic purchase method * Updated nav for small screen * Hide checklist while casting * fix some text describing menu items (#9145)
2017-10-04 23:26:05 +00:00
maxTags: 3,
showTagsSelect: false,
showAssignedSelect: false,
newChecklistItem: null,
icons: Object.freeze({
information: informationIcon,
difficultyNormal: difficultyNormalIcon,
difficultyTrivial: difficultyTrivialIcon,
difficultyMedium: difficultyMediumIcon,
difficultyHard: difficultyHardIcon,
negative: negativeIcon,
positive: positiveIcon,
destroy: deleteIcon,
gold: goldIcon,
down: downIcon,
streak: streakIcon,
calendar: calendarIcon,
}),
requiresApproval: false, // We can't set task.group fields so we use this field to toggle
sharedCompletion: 'singleCompletion',
members: [],
memberNamesById: {},
assignedMembers: [],
checklist: [],
showAdvancedOptions: false,
attributesStrings: {
str: 'strength',
int: 'intelligence',
con: 'constitution',
per: 'perception',
},
calendarHighlights: { dates: [new Date()]},
};
},
mounted () {
this.showAdvancedOptions = !this.user.preferences.advancedCollapsed;
},
watch: {
task () {
this.syncTask();
},
'task.startDate' () {
this.calculateMonthlyRepeatDays();
},
'task.frequency' () {
this.calculateMonthlyRepeatDays();
},
},
computed: {
...mapGetters({
getTaskClasses: 'tasks:getTaskClasses',
getTagsFor: 'tasks:getTagsFor',
canDeleteTask: 'tasks:canDelete',
}),
...mapState({
user: 'user.data',
dayMapping: 'constants.DAY_MAPPING',
ATTRIBUTES: 'constants.ATTRIBUTES',
}),
groupAccessRequiredAndOnPersonalPage () {
if (!this.groupId && this.task.group && this.task.group.id) return true;
return false;
},
checklistEnabled () {
return ['daily', 'todo'].indexOf(this.task.type) > -1 && !this.isOriginalChallengeTask;
},
isChallengeTask () {
return Boolean(this.task.challenge && this.task.challenge.id);
},
onUserPage () {
return !this.challengeId && !this.groupId;
},
challengeAccessRequired () {
return this.onUserPage && this.isChallengeTask;
},
isOriginalChallengeTask () {
let isUserChallenge = Boolean(this.task.userId);
return !isUserChallenge && (this.challengeId || this.task.challenge && this.task.challenge.id);
},
canDelete () {
return this.purpose !== 'create' && this.canDeleteTask(this.task);
},
title () {
const type = this.$t(this.task.type);
return this.$t(this.purpose === 'edit' ? 'editATask' : 'createTask', {type});
},
isUserTask () {
return !this.challengeId && !this.groupId;
},
repeatSuffix () {
const task = this.task;
if (task.frequency === 'daily') {
return task.everyX === 1 ? this.$t('day') : this.$t('days');
} else if (task.frequency === 'weekly') {
return task.everyX === 1 ? this.$t('week') : this.$t('weeks');
} else if (task.frequency === 'monthly') {
return task.everyX === 1 ? this.$t('month') : this.$t('months');
} else if (task.frequency === 'yearly') {
return task.everyX === 1 ? this.$t('year') : this.$t('years');
}
},
repeatsOn: {
get () {
let repeatsOn = 'dayOfMonth';
if (this.task.type === 'daily' && this.task.weeksOfMonth && this.task.weeksOfMonth.length > 0) {
repeatsOn = 'dayOfWeek';
}
return repeatsOn;
},
set (newRepeatsOn) {
this.calculateMonthlyRepeatDays(newRepeatsOn);
},
},
Release with develop (#9162) * Client: fix Apidoc and move email files (#9139) * fix apidoc * move emails files * quest leader can start/end quest; admins can edit challenges/guilds; reverse chat works; remove static/videos link; etc (#9140) * enable link to markdown info on group and challenge edit screen * allow admin (moderators and staff) to edit challenges * allow admin (moderators and staff) to edit guilds Also add some unrelated TODO comments. * allow any party member (not just leader) to start quest from party page * allow quest owner to cancel, begin, abort quest Previously only the party leader could see those buttons. The leader still can. This also hides those buttons from all other party members. * enable reverse chat in guilds and party * remove outdated videos from press kit * adjust various wordings * Be consistent with capitalization of Check-In. (#9118) * limit for inlined svg images and make home leaner by not bundling it with the rest of static pages * sep 27 fixes (#9088) * fix item paddings / drawer width * expand the width of item-rows by the margin of an item * fix hatchedPet-dialog * fix hatching-modal * remove min-height * Oct 3 fixes (#9148) * Only show level after yesterdailies modal * Fixed zindex * Added spcial spells to rewards column * Added single click buy for health and armoire * Prevented task scoring when casting a spell * Renamed generic purchase method * Updated nav for small screen * Hide checklist while casting * fix some text describing menu items (#9145) * 4.1.3 * use `selectGearToPin` instead of updateStore in migration-script (#9102) * Tags redesign in edit-task modal (#9122) * Truncate tags list to maximum number of tasks This commit truncates the list of tags in the edit task modal and displays the remaining selected tasks as a number. * Align tags-select dropdown with "Tags" label * Add tags popup component * Use solid purple for tags-select dropdown * Remove shadow when tags-select is active * Add border-radius to tags-select * Re-add previously disabled transitions * Remove unused template element * Add Clear Tags button to footer of tags popup * Decrease column size for tags to better match design * Truncate tag name to avoid overflows * Add tag name as title to show full name on hover * Grow inline tags select from left to right * Style none button * Add spacing to streak reset button to line up with tags select * Add top offset to tags dropdown toggle to line up with label * Ability to collapse checklists (#9158) * ability to collapse checklists * typo * show warning to use the mobile apps (#9152) * Oct 4 fixes (#9159) * Added gem purchase note * Added notification count * Added party reload * Added description when user can no longer purchase gems this month * Prevent modal from showing when pruchasing recently purchased items * Added progress bar * Prevented non leader from loading approvals * Added group billing * Release fix (#9161) * Merge Develop onto Release (#9123) * Some random quick (#9111) * Switch group button directions * Allowed admins to export challenges * Added scoping to some stable styles * Fixed challenge cloning * Tasks tags (#9112) * Added auto apply and exit * Add challenge tag editing * Fixed lint * Skill fixes (#9113) * Added local storage setting for spell drawer * Added new spell styles * Fixed typo * Reset local creds if access is denied (#9114) * various fixes: group leader's name at top of edit drop-down; Members List; etc (#9117) * fix text describing location of subscription/gem gift box * disable Copy As To-Do in Tavern, guilds, party because it's not working * change members label on group pages to Member List * remove outdated info about seeing number of Gems available to buy * allow Danger Zone to be seen by players without local authentication Also add an hr because the Danger Zone heading was crammed up against the button above it. * put current group leader's name at top of Leader change drop-down * Client Fixes (#9120) * unduplicate logout code * re-enable debug menu * fix pets badge and equipping mounts * close gift modal after sending gems * armoire notifications * Oct 1 fixes (#9121) * Added default tags to task * Added seasonal gear check and show spooky * Disabled spooky sparkles * Fixed challenge remove tasks modal * Hid checklist * Added group gems modal * Purchase with amazon * Added check for user health * Added missing notification file * 4.1.1 * 4.1.2 * Merge develop into release (#9154) * Client: fix Apidoc and move email files (#9139) * fix apidoc * move emails files * quest leader can start/end quest; admins can edit challenges/guilds; reverse chat works; remove static/videos link; etc (#9140) * enable link to markdown info on group and challenge edit screen * allow admin (moderators and staff) to edit challenges * allow admin (moderators and staff) to edit guilds Also add some unrelated TODO comments. * allow any party member (not just leader) to start quest from party page * allow quest owner to cancel, begin, abort quest Previously only the party leader could see those buttons. The leader still can. This also hides those buttons from all other party members. * enable reverse chat in guilds and party * remove outdated videos from press kit * adjust various wordings * Be consistent with capitalization of Check-In. (#9118) * limit for inlined svg images and make home leaner by not bundling it with the rest of static pages * sep 27 fixes (#9088) * fix item paddings / drawer width * expand the width of item-rows by the margin of an item * fix hatchedPet-dialog * fix hatching-modal * remove min-height * Oct 3 fixes (#9148) * Only show level after yesterdailies modal * Fixed zindex * Added spcial spells to rewards column * Added single click buy for health and armoire * Prevented task scoring when casting a spell * Renamed generic purchase method * Updated nav for small screen * Hide checklist while casting * fix some text describing menu items (#9145)
2017-10-04 23:26:05 +00:00
selectedTags () {
return this.getTagsFor(this.task);
},
truncatedSelectedTags () {
return this.selectedTags.slice(0, this.maxTags);
},
remainingSelectedTags () {
return this.selectedTags.slice(this.maxTags);
},
},
created () {
document.addEventListener('keyup', this.handleEsc);
},
destroyed () {
document.removeEventListener('keyup', this.handleEsc);
},
methods: {
...mapActions({saveTask: 'tasks:save', destroyTask: 'tasks:destroy', createTask: 'tasks:create'}),
async syncTask () {
if (this.groupId && this.task.group && this.task.group.approval) {
this.requiresApproval = this.task.group.approval.required;
}
if (this.groupId) {
let members = await this.$store.dispatch('members:getGroupMembers', {
groupId: this.groupId,
includeAllPublicFields: true,
});
this.members = members;
this.members.forEach(member => {
this.memberNamesById[member._id] = member.profile.name;
});
this.assignedMembers = [];
if (this.task.group && this.task.group.assignedUsers) this.assignedMembers = this.task.group.assignedUsers;
if (this.task.group) this.sharedCompletion = this.task.group.sharedCompletion || 'singleCompletion';
}
// @TODO: This whole component is mutating a prop and that causes issues. We need to not copy the prop similar to group modals
if (this.task) this.checklist = clone(this.task.checklist);
},
async handleOpen () {
this.syncTask();
},
cssClass (suffix) {
return this.getTaskClasses(this.task, `${this.purpose === 'edit' ? 'edit' : 'create'}-modal-${suffix}`);
},
2017-11-02 20:25:37 +00:00
closeTagsPopup () {
this.showTagsSelect = false;
},
setDifficulty (level) {
if (this.challengeAccessRequired) return;
this.task.priority = level;
},
toggleUpDirection () {
if (this.challengeAccessRequired) return;
this.task.up = !this.task.up;
},
toggleDownDirection () {
if (this.challengeAccessRequired) return;
this.task.down = !this.task.down;
},
toggleTagSelect () {
this.showTagsSelect = !this.showTagsSelect;
},
sortedChecklist (data) {
let sorting = clone(this.task.checklist);
let movingItem = sorting[data.oldIndex];
sorting.splice(data.oldIndex, 1);
sorting.splice(data.newIndex, 0, movingItem);
this.task.checklist = sorting;
},
addChecklistItem (e) {
let checkListItem = {
id: uuid.v4(),
text: this.newChecklistItem,
completed: false,
};
this.task.checklist.push(checkListItem);
// @TODO: managing checklist separately to help with sorting on the UI
this.checklist.push(checkListItem);
this.newChecklistItem = null;
if (e) e.preventDefault();
},
removeChecklistItem (i) {
this.task.checklist.splice(i, 1);
this.checklist = clone(this.task.checklist);
},
weekdaysMin (dayNumber) {
return moment.weekdaysMin(dayNumber);
},
calculateMonthlyRepeatDays (newRepeatsOn) {
if (!this.task) return;
const task = this.task;
const repeatsOn = newRepeatsOn || this.repeatsOn;
if (task.frequency === 'monthly') {
if (repeatsOn === 'dayOfMonth') {
const date = moment(task.startDate).date();
task.weeksOfMonth = [];
task.daysOfMonth = [date];
} else if (repeatsOn === 'dayOfWeek') {
const week = Math.ceil(moment(task.startDate).date() / 7) - 1;
const dayOfWeek = moment(task.startDate).day();
const shortDay = this.dayMapping[dayOfWeek];
task.daysOfMonth = [];
task.weeksOfMonth = [week];
for (let key in task.repeat) {
task.repeat[key] = false;
}
task.repeat[shortDay] = true;
}
}
},
async submit () {
if (this.newChecklistItem) this.addChecklistItem();
// TODO Fix up permissions on task.group so we don't have to keep doing these hacks
if (this.groupId) {
this.task.requiresApproval = this.requiresApproval;
this.task.group.approval.required = this.requiresApproval;
this.task.sharedCompletion = this.sharedCompletion;
this.task.group.sharedCompletion = this.sharedCompletion;
}
if (this.purpose === 'create') {
if (this.challengeId) {
const response = await this.$store.dispatch('tasks:createChallengeTasks', {
challengeId: this.challengeId,
tasks: [this.task],
});
Object.assign(this.task, response);
this.$emit('taskCreated', this.task);
} else if (this.groupId) {
const response = await this.$store.dispatch('tasks:createGroupTasks', {
groupId: this.groupId,
tasks: [this.task],
});
Object.assign(this.task, response);
let promises = this.assignedMembers.map(memberId => {
return this.$store.dispatch('tasks:assignTask', {
taskId: this.task._id,
userId: memberId,
});
});
Promise.all(promises);
this.task.group.assignedUsers = this.assignedMembers;
this.$emit('taskCreated', this.task);
} else {
this.createTask(this.task);
}
} else {
this.saveTask(this.task);
this.$emit('taskEdited', this.task);
}
this.$root.$emit('bv::hide::modal', 'task-modal');
},
destroy () {
if (!confirm(this.$t('sureDelete'))) return;
this.destroyTask(this.task);
this.$emit('taskDestroyed', this.task);
this.$root.$emit('bv::hide::modal', 'task-modal');
},
cancel () {
this.$root.$emit('bv::hide::modal', 'task-modal');
},
onClose () {
this.showTagsSelect = false;
this.newChecklistItem = '';
this.$emit('cancel');
},
updateRequiresApproval (newValue) {
let truthy = true;
if (!newValue) truthy = false; // This return undefined instad of false
this.requiresApproval = truthy;
},
async toggleAssignment (memberId) {
let assignedIndex = this.assignedMembers.indexOf(memberId);
if (assignedIndex === -1) {
if (this.purpose === 'create') {
return;
}
await this.$store.dispatch('tasks:unassignTask', {
taskId: this.task._id,
userId: memberId,
});
return;
}
if (this.purpose === 'create') {
return;
}
await this.$store.dispatch('tasks:assignTask', {
taskId: this.task._id,
userId: memberId,
});
},
focusInput () {
this.$refs.inputToFocus.focus();
},
handleEsc (e) {
if (e.keyCode === 27 && this.showTagsSelect) {
2018-07-31 07:47:17 +00:00
this.closeTagsPopup();
}
},
2018-07-24 00:45:50 +00:00
handleClick (e) {
if (this.$refs.popup && !this.$refs.popup.$el.parentNode.contains(e.target)) {
this.closeTagsPopup();
}
},
},
};
</script>