mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-15 21:57:22 +01:00
* client: start working on Inventory/Items * i18n changes and fixes * initial displaying of eggs, food and potions + sorting * add missing files * remove comment * show food, eggs and potions * add label to dropdowns acting as select menus * popovers * move badge to slot and component if necessary, general refactor * fix quantity ordering * some special items, reorganize
49 lines
763 B
Vue
49 lines
763 B
Vue
<template lang="pug">
|
|
span.badge.badge-pill.badge-item.badge-star(
|
|
:class="{'item-selected-badge': selected === true}",
|
|
@click="click",
|
|
v-if="show",
|
|
) ★
|
|
</template>
|
|
|
|
<style lang="scss">
|
|
@import '~client/assets/scss/colors.scss';
|
|
|
|
.badge-star {
|
|
cursor: pointer;
|
|
display: none;
|
|
left: -9px;
|
|
color: $gray-400;
|
|
background: $white;
|
|
padding: 4.5px 6px;
|
|
|
|
&.item-selected-badge {
|
|
display: block;
|
|
background: $teal-50;
|
|
color: $white;
|
|
}
|
|
}
|
|
|
|
.item:hover > .badge-star {
|
|
display: block;
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
export default {
|
|
props: {
|
|
show: {
|
|
type: Boolean,
|
|
},
|
|
selected: {
|
|
type: Boolean,
|
|
},
|
|
},
|
|
methods: {
|
|
click () {
|
|
this.$emit('click');
|
|
},
|
|
},
|
|
};
|
|
</script>
|