mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-14 18:22:21 +00:00
Merge branch 'release' into develop
This commit is contained in:
commit
638259b885
9 changed files with 23 additions and 13 deletions
2
package-lock.json
generated
2
package-lock.json
generated
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "habitica",
|
||||
"version": "4.6.0",
|
||||
"version": "4.6.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "habitica",
|
||||
"description": "A habit tracker app which treats your goals like a Role Playing Game.",
|
||||
"version": "4.6.0",
|
||||
"version": "4.6.1",
|
||||
"main": "./website/server/index.js",
|
||||
"dependencies": {
|
||||
"@slack/client": "^3.8.1",
|
||||
|
|
|
|||
|
|
@ -32,13 +32,20 @@ export default {
|
|||
user: 'user.data',
|
||||
groupPlans: 'groupPlans',
|
||||
}),
|
||||
isLeader () {
|
||||
currentGroup () {
|
||||
let groupFound = this.groupPlans.find(group => {
|
||||
return group._id === this.groupId;
|
||||
});
|
||||
|
||||
if (!groupFound) return false;
|
||||
return groupFound.leader === this.user._id;
|
||||
return groupFound;
|
||||
},
|
||||
isLeader () {
|
||||
if (!this.currentGroup) return false;
|
||||
return this.currentGroup.leader === this.user._id;
|
||||
},
|
||||
isManager () {
|
||||
if (!this.currentGroup) return false;
|
||||
return Boolean(this.currentGroup.managers[this.user._id]);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -40,11 +40,11 @@ div
|
|||
span.dropdown-icon-item
|
||||
.svg-icon.inline(v-html="icons.starIcon")
|
||||
span.text {{$t('promoteToLeader')}}
|
||||
b-dropdown-item(@click='addManager(member)', v-if='isLeader && groupIsSubscribed')
|
||||
b-dropdown-item(@click='addManager(member._id)', v-if='isLeader && groupIsSubscribed')
|
||||
span.dropdown-icon-item
|
||||
.svg-icon.inline(v-html="icons.starIcon")
|
||||
span.text {{$t('addManager')}}
|
||||
b-dropdown-item(@click='removeManager(member)', v-if='isLeader && groupIsSubscribed')
|
||||
b-dropdown-item(@click='removeManager(member._id)', v-if='isLeader && groupIsSubscribed')
|
||||
span.dropdown-icon-item
|
||||
.svg-icon.inline(v-html="icons.removeIcon")
|
||||
span.text {{$t('removeManager2')}}
|
||||
|
|
|
|||
|
|
@ -23,8 +23,10 @@
|
|||
<script>
|
||||
import axios from 'axios';
|
||||
import { mapState } from 'client/libs/store';
|
||||
import notifications from 'client/mixins/notifications';
|
||||
|
||||
export default {
|
||||
mixins: [notifications],
|
||||
data () {
|
||||
return {
|
||||
codes: {
|
||||
|
|
@ -51,10 +53,12 @@ export default {
|
|||
// })
|
||||
},
|
||||
async enterCoupon () {
|
||||
let code = await axios.get(`/api/v3/coupons/enter/${this.couponCode}`);
|
||||
let code = await axios.post(`/api/v3/coupons/enter/${this.couponCode}`);
|
||||
if (!code) return;
|
||||
// @TODO: what needs to be updated? User.sync();
|
||||
// @TODO: mixin Notification.text(env.t('promoCodeApplied'));
|
||||
|
||||
this.$store.state.user.data = code.data.data;
|
||||
|
||||
this.text(this.$t('promoCodeApplied'));
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@
|
|||
}
|
||||
|
||||
.text {
|
||||
max-height: 220px;
|
||||
margin-bottom: 8px;
|
||||
overflow-y: scroll;
|
||||
text-overflow: ellipsis;
|
||||
|
|
|
|||
|
|
@ -83,7 +83,6 @@
|
|||
@click.prevent.stop="togglePinned(ctx.item)"
|
||||
)
|
||||
span.svg-icon.inline.icon-12.color(v-html="icons.pin")
|
||||
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
|
|
|
|||
|
|
@ -219,6 +219,7 @@ module.exports = function getItemInfo (user, type, item, officialPinnedItems, la
|
|||
break;
|
||||
case 'mystery_set':
|
||||
itemInfo = {
|
||||
items: item.items,
|
||||
key: item.key,
|
||||
text: item.text(language),
|
||||
value: 1,
|
||||
|
|
|
|||
|
|
@ -1287,7 +1287,7 @@ api.getGroupPlans = {
|
|||
.find({
|
||||
_id: {$in: userGroups},
|
||||
})
|
||||
.select('leaderOnly leader purchased name')
|
||||
.select('leaderOnly leader purchased name managers')
|
||||
.exec();
|
||||
|
||||
let groupPlans = groups.filter(group => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue