mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Merge branch 'issue9334' of https://github.com/CSE2410-TeamZero/habitica into CSE2410-TeamZero-issue9334
This commit is contained in:
@@ -58,11 +58,19 @@
|
||||
@click="openBuyDialog(reward)",
|
||||
:popoverPosition="'left'"
|
||||
)
|
||||
template(slot="itemBadge", slot-scope="ctx")
|
||||
span.badge.badge-pill.badge-item.badge-svg(
|
||||
:class="{'item-selected-badge': ctx.item.pinned, 'hide': !ctx.highlightBorder}",
|
||||
@click.prevent.stop="togglePinned(ctx.item)"
|
||||
)
|
||||
span.svg-icon.inline.icon-12.color(v-html="icons.pin")
|
||||
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '~client/assets/scss/colors.scss';
|
||||
|
||||
|
||||
.tasks-column {
|
||||
min-height: 556px;
|
||||
}
|
||||
@@ -71,6 +79,7 @@
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
|
||||
.reward-items {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@@ -232,18 +241,20 @@ import { mapState, mapActions } from 'client/libs/store';
|
||||
import shopItem from '../shops/shopItem';
|
||||
import BuyQuestModal from 'client/components/shops/quests/buyQuestModal.vue';
|
||||
|
||||
import notifications from 'client/mixins/notifications';
|
||||
import { shouldDo } from 'common/script/cron';
|
||||
import inAppRewards from 'common/script/libs/inAppRewards';
|
||||
import spells from 'common/script/content/spells';
|
||||
import taskDefaults from 'common/script/libs/taskDefaults';
|
||||
|
||||
import svgPin from 'assets/svg/pin.svg';
|
||||
import habitIcon from 'assets/svg/habit.svg';
|
||||
import dailyIcon from 'assets/svg/daily.svg';
|
||||
import todoIcon from 'assets/svg/todo.svg';
|
||||
import rewardIcon from 'assets/svg/reward.svg';
|
||||
|
||||
export default {
|
||||
mixins: [buyMixin],
|
||||
mixins: [buyMixin, notifications],
|
||||
components: {
|
||||
Task,
|
||||
BuyQuestModal,
|
||||
@@ -295,6 +306,7 @@ export default {
|
||||
daily: dailyIcon,
|
||||
todo: todoIcon,
|
||||
reward: rewardIcon,
|
||||
pin: svgPin,
|
||||
});
|
||||
|
||||
let activeFilters = {};
|
||||
@@ -598,6 +610,15 @@ export default {
|
||||
this.selectedItemToBuy = null;
|
||||
}
|
||||
},
|
||||
togglePinned (item) {
|
||||
try {
|
||||
if (!this.$store.dispatch('user:togglePinnedItem', {type: item.pinType, path: item.path})) {
|
||||
this.text(this.$t('unpinnedItem', {item: item.text}));
|
||||
}
|
||||
} catch (e) {
|
||||
this.error(e.message);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user