a8b58815b4
* move groups/sidebar to groupSidebar.vue * lint files * extract group/party sidebar to rightSidebar.vue * wip stories with example data * update stories - wip sidebar re-styling * message party / group leader + move items to the menu * update paddings /place for quest section * invite to party / guild * update labels (* Party / Guild ) * guild-background to group-background * correct menu order + missing a label based on the group type * no quest - styles / layout applied * quest owner / not started - styles applied + extracted questActions from questDetailsModal.vue to a mixin * no challenge style * hover with underlines * quest-pending area layout / margins * "Collection Quest/Quest Owner Participating" Styling Done * group sidebar menu with icons / background * remove most participate button styles * fix quest-invite panel * move "Start Quest" + add "Leave Quest" * Not Participating + Boss + Rage Quests restyling * party quest changes - invitedToQuest + button styles + no-items style + view details * fix icons + rage value + colors * fix duplicate key * hide items label if 0 items found + hide pending damage if there is none + sidebar section margin + fix percent calculation 0 => 0% * combine quest abandon / cancel to one call + hide begin if quest has already started + close modal if quest was canceled * remove unused translate string * allow leaving an accepted but inactive quest + disable leave when user is quest leader * update "are you sure" questions - remove "doubleSureAbort" - add "sureLeaveInactive" * sidebar margins + menu icon color * refactored css rules * improve some styles * fix button spacing * fix dropmenu with icon hover * hide leave quest for leaders + fix quest buttons spacing * add pending items label * remove "X items found" label * first round of fixes * last v-once * Update Quest Dialogs (#13112) * new quest rewards panel + extract questPopover and itemWithLabel * WIP: questInfo still not applying the row-height.. * split up start-quest-modal into select and detail modal - also rename the current quest-details to be the group-quest-details modal * remove start-quest-modal from modal-scss * update package-lock * WIP before using the quest sidebar branch as a base * move quest detail actions to the "new" details dialog * quest details layout for owner / participant * fix quest rewards - open details modal from sidebar * apply quest-details dialog styles to the buyQuestModal one * fix quest reward icons / popover / texts * WIP back to quest selection * fix lint * merge selectQuestModal.vue with questDetailModal.vue + UI for the select quest * fix margins / layout / labels * fix quest detail + wip invitationListModal.vue / participantListModal.vue * fix questmodal user label centered * fix centered reward items + grouping items and adding a count-badge * sort quests by AZ or quantity * invitations modal * remove console.info * complete participantListModal.vue + extracted getClassName * missed a file for getClassName extraction * fix invitations * select the actual quest on details * fix margins on invite to party / start quest buttons * replace buyQuestModal close button and title * fix recursion due to the same name * missing import * sort quantity by highest first * fix "Can't find a Quest to start" styles * fix "your balance" padding * fix quest collections / drop items * fix member details in participants list * fix quest info * remove nullable because the build doesn't like it (on this file..) * add questCompleted to the stories + fix getDropName * replace quest-rewards in questCompleted.vue * fix questCompleted.vue style * delete obsolete components * add missing spritesheets to storebook * requested pr changes * refactored fetchMember * revert optional chaining * fix merge conflicts * fix rightSidebar hover colors - $scss var to css var * overflow auto instead of scroll * prevent wrapping of quest collections * rollback to multi line quest items * use min-width for the quest popover
211 lines
5.0 KiB
Vue
211 lines
5.0 KiB
Vue
<template>
|
|
<div class="standard-sidebar d-none d-sm-block">
|
|
<filter-sidebar>
|
|
<div
|
|
slot="search"
|
|
class="form-group"
|
|
>
|
|
<input
|
|
v-model="searchTerm"
|
|
class="form-control input-search"
|
|
type="text"
|
|
:placeholder="$t('search')"
|
|
>
|
|
</div>
|
|
<filter-group :title="$t('category')">
|
|
<div
|
|
v-for="group in categoryOptions"
|
|
:key="group.key"
|
|
class="form-check"
|
|
>
|
|
<div class="custom-control custom-checkbox">
|
|
<input
|
|
:id="group.key"
|
|
v-model="categoryFilters"
|
|
class="custom-control-input"
|
|
type="checkbox"
|
|
:value="group.key"
|
|
>
|
|
<label
|
|
v-once
|
|
class="custom-control-label"
|
|
:for="group.key"
|
|
>{{ $t(group.label) }}</label>
|
|
</div>
|
|
</div>
|
|
</filter-group>
|
|
<filter-group :title="$t('role')">
|
|
<div
|
|
v-for="group in roleOptions"
|
|
:key="group.key"
|
|
class="form-check"
|
|
>
|
|
<div class="custom-control custom-checkbox">
|
|
<input
|
|
:id="group.key"
|
|
v-model="roleFilters"
|
|
class="custom-control-input"
|
|
type="checkbox"
|
|
:value="group.key"
|
|
>
|
|
<label
|
|
v-once
|
|
class="custom-control-label"
|
|
:for="group.key"
|
|
>{{ $t(group.label) }}</label>
|
|
</div>
|
|
</div>
|
|
</filter-group>
|
|
<filter-group :title="$t('guildSize')">
|
|
<div
|
|
v-for="group in guildSizeOptions"
|
|
:key="group.key"
|
|
class="form-check"
|
|
>
|
|
<div class="custom-control custom-checkbox">
|
|
<input
|
|
:id="group.key"
|
|
v-model="guildSizeFilters"
|
|
class="custom-control-input"
|
|
type="checkbox"
|
|
:value="group.key"
|
|
>
|
|
<label
|
|
v-once
|
|
class="custom-control-label"
|
|
:for="group.key"
|
|
>{{ $t(group.label) }}</label>
|
|
</div>
|
|
</div>
|
|
</filter-group>
|
|
</filter-sidebar>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import throttle from 'lodash/throttle';
|
|
import FilterSidebar from '@/components/ui/filterSidebar';
|
|
import FilterGroup from '@/components/ui/filterGroup';
|
|
|
|
// TODO use checkbox-component to add/remove entries to *Filters, but without the v-model binding
|
|
|
|
export default {
|
|
components: { FilterGroup, FilterSidebar },
|
|
data () {
|
|
return {
|
|
categoryFilters: [],
|
|
categoryOptions: [
|
|
{
|
|
label: 'habitica_official',
|
|
key: 'habitica_official',
|
|
},
|
|
{
|
|
label: 'academics',
|
|
key: 'academics',
|
|
},
|
|
{
|
|
label: 'advocacy_causes',
|
|
key: 'advocacy_causes',
|
|
},
|
|
{
|
|
label: 'creativity',
|
|
key: 'creativity',
|
|
},
|
|
{
|
|
label: 'entertainment',
|
|
key: 'entertainment',
|
|
},
|
|
{
|
|
label: 'finance',
|
|
key: 'finance',
|
|
},
|
|
{
|
|
label: 'health_fitness',
|
|
key: 'health_fitness',
|
|
},
|
|
{
|
|
label: 'hobbies_occupations',
|
|
key: 'hobbies_occupations',
|
|
},
|
|
{
|
|
label: 'location_based',
|
|
key: 'location_based',
|
|
},
|
|
{
|
|
label: 'mental_health',
|
|
key: 'mental_health',
|
|
},
|
|
{
|
|
label: 'getting_organized',
|
|
key: 'getting_organized',
|
|
},
|
|
{
|
|
label: 'recovery_support_groups',
|
|
key: 'recovery_support_groups',
|
|
},
|
|
{
|
|
label: 'spirituality',
|
|
key: 'spirituality',
|
|
},
|
|
{
|
|
label: 'time_management',
|
|
key: 'time_management',
|
|
},
|
|
],
|
|
roleFilters: [],
|
|
roleOptions: [
|
|
{
|
|
label: 'guildLeader',
|
|
key: 'guild_leader',
|
|
},
|
|
{
|
|
label: 'member',
|
|
key: 'member',
|
|
},
|
|
],
|
|
guildSizeFilters: [],
|
|
guildSizeOptions: [
|
|
{
|
|
label: 'goldTier',
|
|
key: 'gold_tier',
|
|
},
|
|
{
|
|
label: 'silverTier',
|
|
key: 'silver_tier',
|
|
},
|
|
{
|
|
label: 'bronzeTier',
|
|
key: 'bronze_tier',
|
|
},
|
|
],
|
|
searchTerm: '',
|
|
};
|
|
},
|
|
watch: {
|
|
categoryFilters: function categoryFilters () {
|
|
this.emitFilters();
|
|
},
|
|
roleFilters: function roleFilters () {
|
|
this.emitFilters();
|
|
},
|
|
guildSizeFilters: function guildSizeFilters () {
|
|
this.emitFilters();
|
|
},
|
|
searchTerm: throttle(function searchTerm (newSearch) {
|
|
this.$emit('search', {
|
|
searchTerm: newSearch,
|
|
});
|
|
}, 1000),
|
|
},
|
|
methods: {
|
|
emitFilters () {
|
|
this.$emit('filter', {
|
|
categories: this.categoryFilters,
|
|
roles: this.roleFilters,
|
|
guildSize: this.guildSizeFilters,
|
|
});
|
|
},
|
|
},
|
|
};
|
|
</script>
|