mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
* Change where members info is retrieved in Group component. In Group component, changes the place where members data is retrieved from the load function originally to within the watch group function, so that when group data has changed, the code will update the corresponding members data as well. * Moving the code for loading members data from watcher to inside fetchGuilds function * Complying with lint Co-authored-by: kazekunGb <eynsan@yahoo.co.uk> Co-authored-by: Matteo Pagliazzi <matteopagliazzi@gmail.com>
This commit is contained in:
@@ -21,7 +21,8 @@
|
|||||||
<span v-if="challenge.leader === null">
|
<span v-if="challenge.leader === null">
|
||||||
{{ $t('noChallengeOwner') }}
|
{{ $t('noChallengeOwner') }}
|
||||||
</span>
|
</span>
|
||||||
<user-link v-else
|
<user-link
|
||||||
|
v-else
|
||||||
class="mx-1"
|
class="mx-1"
|
||||||
:user="challenge.leader"
|
:user="challenge.leader"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -509,11 +509,7 @@ export default {
|
|||||||
// Load invites
|
// Load invites
|
||||||
}
|
}
|
||||||
await this.fetchGuild();
|
await this.fetchGuild();
|
||||||
// Fetch group members on load
|
|
||||||
this.members = await this.loadMembers({
|
|
||||||
groupId: this.group._id,
|
|
||||||
includeAllPublicFields: true,
|
|
||||||
});
|
|
||||||
this.$root.$on('updatedGroup', group => {
|
this.$root.$on('updatedGroup', group => {
|
||||||
const updatedGroup = extend(this.group, group);
|
const updatedGroup = extend(this.group, group);
|
||||||
this.$set(this.group, updatedGroup);
|
this.$set(this.group, updatedGroup);
|
||||||
@@ -576,6 +572,11 @@ export default {
|
|||||||
this.$delete(this.user.newMessages, groupId);
|
this.$delete(this.user.newMessages, groupId);
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.members = await this.loadMembers({
|
||||||
|
groupId: this.group._id,
|
||||||
|
includeAllPublicFields: true,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
hasUnreadMessages (groupId) {
|
hasUnreadMessages (groupId) {
|
||||||
if (this.user.newMessages[groupId]) return true;
|
if (this.user.newMessages[groupId]) return true;
|
||||||
|
|||||||
@@ -3,14 +3,14 @@
|
|||||||
class="notification d-flex flex-column justify-content-center text-center"
|
class="notification d-flex flex-column justify-content-center text-center"
|
||||||
>
|
>
|
||||||
<strong
|
<strong
|
||||||
class="mx-auto mb-2"
|
|
||||||
v-once
|
v-once
|
||||||
|
class="mx-auto mb-2"
|
||||||
>
|
>
|
||||||
{{ $t('g1g1Announcement') }}
|
{{ $t('g1g1Announcement') }}
|
||||||
</strong>
|
</strong>
|
||||||
<p
|
<p
|
||||||
class="mx-4"
|
|
||||||
v-once
|
v-once
|
||||||
|
class="mx-4"
|
||||||
>
|
>
|
||||||
{{ $t('g1g1Details') }}
|
{{ $t('g1g1Details') }}
|
||||||
</p>
|
</p>
|
||||||
@@ -19,8 +19,8 @@
|
|||||||
@click="showSelectUser()"
|
@click="showSelectUser()"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="m-auto"
|
|
||||||
v-once
|
v-once
|
||||||
|
class="m-auto"
|
||||||
>
|
>
|
||||||
{{ $t('sendGift') }}
|
{{ $t('sendGift') }}
|
||||||
</div>
|
</div>
|
||||||
@@ -30,9 +30,9 @@
|
|||||||
@click.stop="remove()"
|
@click.stop="remove()"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
v-once
|
||||||
class="svg-icon"
|
class="svg-icon"
|
||||||
v-html="icons.close"
|
v-html="icons.close"
|
||||||
v-once
|
|
||||||
></div>
|
></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,16 +5,21 @@
|
|||||||
:hide-footer="true"
|
:hide-footer="true"
|
||||||
@hide="onHide()"
|
@hide="onHide()"
|
||||||
>
|
>
|
||||||
<h2 class="ml-2"> {{ $t('sendGift')}} </h2>
|
<h2 class="ml-2">
|
||||||
|
{{ $t('sendGift') }}
|
||||||
|
</h2>
|
||||||
<div class="d-flex flex-column align-items-center">
|
<div class="d-flex flex-column align-items-center">
|
||||||
<div
|
<div
|
||||||
class="modal-close"
|
class="modal-close"
|
||||||
@click="close()"
|
@click="close()"
|
||||||
>
|
>
|
||||||
<div class="svg-icon" v-html="icons.close"></div>
|
<div
|
||||||
|
class="svg-icon"
|
||||||
|
v-html="icons.close"
|
||||||
|
></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ml-2 mr-auto">
|
<div class="ml-2 mr-auto">
|
||||||
<strong> {{ $t('sendGiftToWhom')}} </strong>
|
<strong> {{ $t('sendGiftToWhom') }} </strong>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="form"
|
class="form"
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
<div class="flex-spacer"></div>
|
<div class="flex-spacer"></div>
|
||||||
<div>
|
<div>
|
||||||
<div class="subscribe-card d-flex flex-column">
|
<div class="subscribe-card d-flex flex-column">
|
||||||
<subscription-options class="mb-4"/>
|
<subscription-options class="mb-4" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -87,7 +87,9 @@
|
|||||||
v-if="hasSubscription"
|
v-if="hasSubscription"
|
||||||
class="d-flex flex-column align-items-center"
|
class="d-flex flex-column align-items-center"
|
||||||
>
|
>
|
||||||
<h1 class="mt-4 mx-auto">{{ $t('subscription') }}</h1>
|
<h1 class="mt-4 mx-auto">
|
||||||
|
{{ $t('subscription') }}
|
||||||
|
</h1>
|
||||||
<div class="subscribe-card mx-auto">
|
<div class="subscribe-card mx-auto">
|
||||||
<div
|
<div
|
||||||
v-if="hasSubscription && !hasCanceledSubscription"
|
v-if="hasSubscription && !hasCanceledSubscription"
|
||||||
@@ -100,7 +102,9 @@
|
|||||||
v-html="icons.checkmarkIcon"
|
v-html="icons.checkmarkIcon"
|
||||||
></div>
|
></div>
|
||||||
</div>
|
</div>
|
||||||
<h2 class="green-10 mx-auto">{{ $t('youAreSubscribed') }}</h2>
|
<h2 class="green-10 mx-auto">
|
||||||
|
{{ $t('youAreSubscribed') }}
|
||||||
|
</h2>
|
||||||
<div
|
<div
|
||||||
v-if="hasGroupPlan"
|
v-if="hasGroupPlan"
|
||||||
class="mx-5 text-center"
|
class="mx-5 text-center"
|
||||||
@@ -121,7 +125,9 @@
|
|||||||
v-if="canEditCardDetails"
|
v-if="canEditCardDetails"
|
||||||
class="mt-4 text-center"
|
class="mt-4 text-center"
|
||||||
>
|
>
|
||||||
<div class="font-weight-bold gray-10 mb-2">{{ $t('needToUpdateCard') }}</div>
|
<div class="font-weight-bold gray-10 mb-2">
|
||||||
|
{{ $t('needToUpdateCard') }}
|
||||||
|
</div>
|
||||||
<button
|
<button
|
||||||
class="btn btn-primary btn-update-card
|
class="btn btn-primary btn-update-card
|
||||||
d-flex justify-content-center align-items-center"
|
d-flex justify-content-center align-items-center"
|
||||||
@@ -161,20 +167,24 @@
|
|||||||
v-html="icons.closeIcon"
|
v-html="icons.closeIcon"
|
||||||
></div>
|
></div>
|
||||||
</div>
|
</div>
|
||||||
<h2 class="gray-50">{{ $t('subscriptionCanceled') }}</h2>
|
<h2 class="gray-50">
|
||||||
|
{{ $t('subscriptionCanceled') }}
|
||||||
|
</h2>
|
||||||
<div
|
<div
|
||||||
class="w-75 text-center mb-4"
|
class="w-75 text-center mb-4"
|
||||||
v-html="$t('subscriptionInactiveDate', {date: subscriptionEndDate})"
|
v-html="$t('subscriptionInactiveDate', {date: subscriptionEndDate})"
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<h2>{{ $t('readyToResubscribe') }}</h2>
|
<h2>{{ $t('readyToResubscribe') }}</h2>
|
||||||
<subscription-options class="w-100 mb-2"/>
|
<subscription-options class="w-100 mb-2" />
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="hasSubscription"
|
v-if="hasSubscription"
|
||||||
class="bg-gray-700 p-2 text-center"
|
class="bg-gray-700 p-2 text-center"
|
||||||
>
|
>
|
||||||
<div class="header-mini mb-3">{{ $t('subscriptionStats') }}</div>
|
<div class="header-mini mb-3">
|
||||||
|
{{ $t('subscriptionStats') }}
|
||||||
|
</div>
|
||||||
<div class="d-flex justify-content-around">
|
<div class="d-flex justify-content-around">
|
||||||
<div class="ml-4 mr-3">
|
<div class="ml-4 mr-3">
|
||||||
<div class="d-flex justify-content-center align-items-center">
|
<div class="d-flex justify-content-center align-items-center">
|
||||||
@@ -189,7 +199,9 @@
|
|||||||
user.purchased.plan.consecutive.offset }}
|
user.purchased.plan.consecutive.offset }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stats-label">{{ $t('subMonths') }}</div>
|
<div class="stats-label">
|
||||||
|
{{ $t('subMonths') }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stats-spacer"></div>
|
<div class="stats-spacer"></div>
|
||||||
<div>
|
<div>
|
||||||
@@ -204,7 +216,9 @@
|
|||||||
{{ user.purchased.plan.consecutive.gemCapExtra }}
|
{{ user.purchased.plan.consecutive.gemCapExtra }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stats-label">{{ $t('gemCapExtra') }}</div>
|
<div class="stats-label">
|
||||||
|
{{ $t('gemCapExtra') }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stats-spacer"></div>
|
<div class="stats-spacer"></div>
|
||||||
<div>
|
<div>
|
||||||
@@ -219,7 +233,9 @@
|
|||||||
{{ user.purchased.plan.consecutive.trinkets }}
|
{{ user.purchased.plan.consecutive.trinkets }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stats-label">{{ $t('mysticHourglassesTooltip') }}</div>
|
<div class="stats-label">
|
||||||
|
{{ $t('mysticHourglassesTooltip') }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -230,7 +246,9 @@
|
|||||||
v-html="icons.heartIcon"
|
v-html="icons.heartIcon"
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="stats-label">{{ $t('giftSubscriptionText4') }}</div>
|
<div class="stats-label">
|
||||||
|
{{ $t('giftSubscriptionText4') }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -239,8 +257,12 @@
|
|||||||
class="d-flex flex-column align-items-center mt-3"
|
class="d-flex flex-column align-items-center mt-3"
|
||||||
>
|
>
|
||||||
<div class="cancel-card p-4 text-center">
|
<div class="cancel-card p-4 text-center">
|
||||||
<h2 class="maroon-50">{{ $t('cancelYourSubscription') }}</h2>
|
<h2 class="maroon-50">
|
||||||
<div v-if="hasGroupPlan">{{ $t('cancelSubInfoGroupPlan') }}</div>
|
{{ $t('cancelYourSubscription') }}
|
||||||
|
</h2>
|
||||||
|
<div v-if="hasGroupPlan">
|
||||||
|
{{ $t('cancelSubInfoGroupPlan') }}
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="!hasGroupPlan && !canCancelSubscription"
|
v-if="!hasGroupPlan && !canCancelSubscription"
|
||||||
v-html="$t(`cancelSubInfo${user.purchased.plan.paymentMethod}`)"
|
v-html="$t(`cancelSubInfo${user.purchased.plan.paymentMethod}`)"
|
||||||
|
|||||||
@@ -5,22 +5,22 @@
|
|||||||
<b-form-radio
|
<b-form-radio
|
||||||
v-for="block in subscriptionBlocksOrdered"
|
v-for="block in subscriptionBlocksOrdered"
|
||||||
v-if="block.target !== 'group' && block.canSubscribe === true"
|
v-if="block.target !== 'group' && block.canSubscribe === true"
|
||||||
:value="block.key"
|
|
||||||
:key="block.key"
|
:key="block.key"
|
||||||
v-model="subscription.key"
|
v-model="subscription.key"
|
||||||
|
:value="block.key"
|
||||||
class="subscribe-option pt-2 pl-5 pb-3 mb-0"
|
class="subscribe-option pt-2 pl-5 pb-3 mb-0"
|
||||||
:class="{selected: subscription.key === block.key}"
|
:class="{selected: subscription.key === block.key}"
|
||||||
@click.native="subscription.key = block.key"
|
@click.native="subscription.key = block.key"
|
||||||
>
|
>
|
||||||
<!-- eslint-enable vue/no-use-v-if-with-v-for -->
|
<!-- eslint-enable vue/no-use-v-if-with-v-for -->
|
||||||
<div
|
<div
|
||||||
v-html="$t('subscriptionRateText', {price: block.price, months: block.months})"
|
|
||||||
class="subscription-text ml-2 mb-1"
|
class="subscription-text ml-2 mb-1"
|
||||||
|
v-html="$t('subscriptionRateText', {price: block.price, months: block.months})"
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-html="subscriptionBubbles(block.key)"
|
|
||||||
class="ml-2"
|
class="ml-2"
|
||||||
|
v-html="subscriptionBubbles(block.key)"
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</b-form-radio>
|
</b-form-radio>
|
||||||
|
|||||||
@@ -97,7 +97,10 @@
|
|||||||
>{{ item.value }}</span>
|
>{{ item.value }}</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="d-flex align-items-middle">
|
<div
|
||||||
|
v-else
|
||||||
|
class="d-flex align-items-middle"
|
||||||
|
>
|
||||||
<span
|
<span
|
||||||
class="svg-icon inline icon-32 ml-auto my-auto"
|
class="svg-icon inline icon-32 ml-auto my-auto"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
@@ -119,7 +122,10 @@
|
|||||||
<div v-if="attemptingToPurchaseMoreGemsThanAreLeft">
|
<div v-if="attemptingToPurchaseMoreGemsThanAreLeft">
|
||||||
{{ $t('notEnoughGemsToBuy') }}
|
{{ $t('notEnoughGemsToBuy') }}
|
||||||
</div>
|
</div>
|
||||||
<div v-if="nonSubscriberHourglasses" class="hourglass-nonsub mt-3">
|
<div
|
||||||
|
v-if="nonSubscriberHourglasses"
|
||||||
|
class="hourglass-nonsub mt-3"
|
||||||
|
>
|
||||||
{{ $t('mysticHourglassNeededNoSub') }}
|
{{ $t('mysticHourglassNeededNoSub') }}
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
|
|||||||
Reference in New Issue
Block a user