Skip to content

Commit

Permalink
common: imporving pinnedSets conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
italojs committed Nov 13, 2023
1 parent 87871ee commit 9569ca6
Show file tree
Hide file tree
Showing 42 changed files with 245 additions and 153 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"test:api-v4:integration": "gulp test:api-v4:integration",
"test:api-v4:integration:separate-server": "NODE_ENV=test gulp test:api-v4:integration:separate-server",
"test:sanity": "istanbul cover --dir coverage/sanity --report lcovonly node_modules/mocha/bin/_mocha -- test/sanity --recursive",
"test:common": "istanbul cover --dir coverage/common --report lcovonly node_modules/mocha/bin/_mocha -- test/common --recursive",
"test:common": "istanbul cover --dir coverage/common --report lcovonly node_modules/mocha/bin/_mocha -- test/common --recursive -g shops",
"test:content": "istanbul cover --dir coverage/content --report lcovonly node_modules/mocha/bin/_mocha -- test/content --recursive",
"test:nodemon": "gulp test:nodemon",
"coverage": "COVERAGE=true mocha --require register-handlers.js --reporter html-cov > coverage.html; open coverage.html",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ export default {
SubscriptionAndPerks,
},
mixins: [userStateMixin],
beforeRouteUpdate (to, from, next) {
this.userIdentifier = to.params.userIdentifier;
next();
},
data () {
return {
userIdentifier: '',
Expand Down Expand Up @@ -184,9 +188,5 @@ export default {
this.resetCounter += 1; // tell child components to reinstantiate from scratch
},
},
beforeRouteUpdate (to, from, next) {
this.userIdentifier = to.params.userIdentifier;
next();
},
};
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@
<div class="form-inline">
Perk month count:
<input
v-model="hero.purchased.plan.perkMonthCount"
class="form-control"
type="number"
min="0"
max="2"
step="1"
>
v-model="hero.purchased.plan.perkMonthCount"
class="form-control"
type="number"
min="0"
max="2"
step="1"
>
</div>
<div>
Next Mystic Hourglass:
Expand Down
2 changes: 1 addition & 1 deletion website/client/src/components/avatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ import foolPet from '../mixins/foolPet';
import ClassBadge from '@/components/members/classBadge';
export default {
mixins: [foolPet],
components: {
ClassBadge,
},
mixins: [foolPet],
props: {
member: {
type: Object,
Expand Down
2 changes: 1 addition & 1 deletion website/client/src/components/bugReportModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
rows="5"
:required="true"
:placeholder="question ? $t('questionPlaceholder') : $t('reportDescriptionPlaceholder')"
:class="{'input-invalid': messageInvalid && this.message.length === 0}"
:class="{'input-invalid': messageInvalid && message.length === 0}"
>

</textarea>
Expand Down
10 changes: 5 additions & 5 deletions website/client/src/components/challenges/challengeDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,11 @@ export default {
groupLink,
},
mixins: [challengeMemberSearchMixin, externalLinks, userStateMixin],
async beforeRouteUpdate (to, from, next) {
this.searchId = to.params.challengeId;
await this.loadChallenge();
next();
},
props: ['challengeId'],
data () {
return {
Expand Down Expand Up @@ -487,11 +492,6 @@ export default {
updated () {
this.handleExternalLinks();
},
async beforeRouteUpdate (to, from, next) {
this.searchId = to.params.challengeId;
await this.loadChallenge();
next();
},
methods: {
cleanUpTask (task) {
const cleansedTask = omit(task, TASK_KEYS_TO_REMOVE);
Expand Down
4 changes: 2 additions & 2 deletions website/client/src/components/challenges/findChallenges.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<div class="row">
<div
v-if="!loading &&
this.filteredChallenges.length === 0"
filteredChallenges.length === 0"
class="no-challenges text-center col-md-6 offset-3"
>
<h2 v-once>
Expand All @@ -42,7 +42,7 @@
</div>
<div class="row">
<div
v-for="challenge in this.filteredChallenges"
v-for="challenge in filteredChallenges"
:key="challenge._id"
class="col-12 col-md-6"
>
Expand Down
4 changes: 2 additions & 2 deletions website/client/src/components/challenges/myChallenges.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</div>
<div class="row">
<div
v-if="!loading && challenges.length > 0 && this.filteredChallenges.length === 0"
v-if="!loading && challenges.length > 0 && filteredChallenges.length === 0"
class="no-challenges text-center col-md-6 offset-3"
>
<h2 v-once>
Expand All @@ -61,7 +61,7 @@
</div>
<div class="row">
<div
v-for="challenge in this.filteredChallenges"
v-for="challenge in filteredChallenges"
:key="challenge._id"
class="col-12 col-md-6"
>
Expand Down
10 changes: 5 additions & 5 deletions website/client/src/components/creatorIntro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@
</div>
<div
v-for="bg in backgroundShopSets[0].items"
:key="bg.key"
:id="bg.key"
:key="bg.key"
class="col-2"
@click="unlock('background.' + bg.key)"
>
Expand Down Expand Up @@ -215,8 +215,8 @@
>
<div
v-for="bg in backgroundShopSets[2].items"
:key="bg.key"
:id="bg.key"
:key="bg.key"
class="col-4 text-center customize-option background-button"
@click="unlock('background.' + bg.key)"
>
Expand Down Expand Up @@ -245,8 +245,8 @@
>
<div
v-for="bg in backgroundShopSets[1].items"
:key="bg.key"
:id="bg.key"
:key="bg.key"
class="col-4 text-center customize-option background-button"
@click="!user.purchased.background[bg.key]
? backgroundSelected(bg) : unlock('background.' + bg.key)"
Expand Down Expand Up @@ -316,8 +316,8 @@
</div>
<div
v-for="bg in set.items"
:key="bg.key"
:id="bg.key"
:key="bg.key"
class="col-4 text-center customize-option background-button"
@click="!user.purchased.background[bg.key]
? backgroundSelected(bg) : unlock('background.' + bg.key)"
Expand Down Expand Up @@ -377,8 +377,8 @@
>
<div
v-for="(bg) in ownedBackgrounds"
:key="bg.key"
:id="bg.key"
:key="bg.key"
class="col-4 text-center customize-option background-button"
@click="unlock('background.' + bg.key)"
>
Expand Down
21 changes: 11 additions & 10 deletions website/client/src/components/group-plans/groupPlansUpdateModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
class="w-100 d-flex pt-2 justify-content-center"
>
<h2
class="mx-auto mt-4"
v-once
class="mx-auto mt-4"
>
{{ $t('newGroupsWelcome') }}
</h2>
Expand Down Expand Up @@ -43,8 +43,8 @@
>
</div>
<h3
class="my-auto"
v-once
class="my-auto"
>
{{ $t('newGroupsWhatsNew') }}
</h3>
Expand All @@ -66,7 +66,8 @@
<li>{{ $t('newGroupsBullet07') }}</li>
<li>{{ $t('newGroupsBullet08') }}</li>
<li>{{ $t('newGroupsBullet09') }}</li>
<li>{{ $t('newGroupsBullet10') }}
<li>
{{ $t('newGroupsBullet10') }}
<ul class="p-0">
<li v-html="$t('newGroupsBullet10a')"></li>
<li v-html="$t('newGroupsBullet10b')"></li>
Expand All @@ -83,13 +84,13 @@
>
{{ $t('newGroupsEnjoy') }}
</div>
<button
class="btn btn-primary mt-4 mb-1 mx-auto"
@click="close()"
@keypress.enter="close()"
>
{{ $t('getStarted') }}
</button>
<button
class="btn btn-primary mt-4 mb-1 mx-auto"
@click="close()"
@keypress.enter="close()"
>
{{ $t('getStarted') }}
</button>
</div>
</b-modal>
</template>
Expand Down
10 changes: 6 additions & 4 deletions website/client/src/components/group-plans/taskInformation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,21 @@
</div>
<div class="create-task-area ml-2">
<button
id="create-task-btn"
v-if="canCreateTasks"
id="create-task-btn"
class="btn btn-primary create-btn d-flex align-items-center"
:class="{open: openCreateBtn}"
tabindex="0"
@click.stop.prevent="openCreateBtn = !openCreateBtn"
@keypress.enter="openCreateBtn = !openCreateBtn"
tabindex="0"
>
<div
class="svg-icon icon-10 color"
v-html="icons.positive"
></div>
<div class="ml-75 mr-1"> {{ $t('addTask') }} </div>
<div class="ml-75 mr-1">
{{ $t('addTask') }}
</div>
</button>
<div
v-if="openCreateBtn"
Expand All @@ -68,8 +70,8 @@
<div
v-for="type in columns"
:key="type"
@click="createTask(type)"
class="dropdown-item d-flex px-2 py-1"
@click="createTask(type)"
>
<div class="d-flex align-items-center justify-content-center task-icon">
<div
Expand Down
34 changes: 26 additions & 8 deletions website/client/src/components/groups/groupPlan.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@
<group-plan-creation-modal />
<div>
<div class="header">
<h1 v-once class="text-center">
<h1
v-once
class="text-center"
>
{{ $t('groupPlanTitle') }}
</h1>
<div class="row">
<div class="col-8 offset-2 text-center">
<h2 v-once class="sub-text">
<h2
v-once
class="sub-text"
>
{{ $t('groupBenefitsDescription') }}
</h2>
</div>
Expand All @@ -24,8 +30,12 @@
src="~@/assets/images/group-plans/[email protected]"
>
<hr>
<h2 v-once> {{ $t('teamBasedTasks') }} </h2>
<p v-once> {{ $t('teamBasedTasksListDesc') }} </p>
<h2 v-once>
{{ $t('teamBasedTasks') }}
</h2>
<p v-once>
{{ $t('teamBasedTasksListDesc') }}
</p>
</div>
</div>
<div class="col-4">
Expand All @@ -35,8 +45,12 @@
src="~@/assets/images/group-plans/[email protected]"
>
<hr>
<h2 v-once> {{ $t('groupManagementControls') }} </h2>
<p v-once> {{ $t('groupManagementControlsDesc') }} </p>
<h2 v-once>
{{ $t('groupManagementControls') }}
</h2>
<p v-once>
{{ $t('groupManagementControlsDesc') }}
</p>
</div>
</div>
<div class="col-4">
Expand All @@ -46,8 +60,12 @@
src="~@/assets/images/group-plans/[email protected]"
>
<hr>
<h2 v-once> {{ $t('inGameBenefits') }} </h2>
<p v-once> {{ $t('inGameBenefitsDesc') }} </p>
<h2 v-once>
{{ $t('inGameBenefits') }}
</h2>
<p v-once>
{{ $t('inGameBenefitsDesc') }}
</p>
</div>
</div>
</div>
Expand Down

0 comments on commit 9569ca6

Please sign in to comment.