diff --git a/website/client/components/appHeader.vue b/website/client/components/appHeader.vue index 82ffa4736f..3c1035883d 100644 --- a/website/client/components/appHeader.vue +++ b/website/client/components/appHeader.vue @@ -27,7 +27,7 @@ div span.small-text(v-html="$t('inviteFriendsParty')") br // TODO link to party creation or party page if partying solo - button.btn.btn-primary(@click='openPartyModal()') {{ $t('startAParty') }} + button.btn.btn-primary(@click='openPartyModal()') {{ partyMembers && partyMembers.length > 1 ? $t('startAParty') : $t('inviteFriends') }} diff --git a/website/client/components/groups/publicGuildItem.vue b/website/client/components/groups/publicGuildItem.vue index 40dcd7c85f..c27c6f2d11 100644 --- a/website/client/components/groups/publicGuildItem.vue +++ b/website/client/components/groups/publicGuildItem.vue @@ -4,11 +4,11 @@ router-link.card-link(:to="{ name: 'guild', params: { groupId: guild._id } }") .card-block .row .col-md-2.badge-column - .shield-wrap + .shield-wrap(:class="{gold: guild.memberCount > 1000, silver: guild.memberCount > 100 && guild.memberCount < 999}") .svg-icon.shield(v-html="icons.goldGuildBadge", v-if='guild.memberCount > 1000') .svg-icon.shield(v-html="icons.silverGuildBadgeIcon", v-if='guild.memberCount > 100 && guild.memberCount < 999') .svg-icon.shield(v-html="icons.bronzeGuildBadgeIcon", v-if='guild.memberCount < 100') - .member-count {{guild.memberCount}} + .member-count {{ guild.memberCount | abbrNum }} .col-md-10 .row .col-md-8 @@ -76,6 +76,14 @@ router-link.card-link(:to="{ name: 'guild', params: { groupId: guild._id } }") width: 70px; } + .gold { + color: #fdbb5a; + } + + .silver { + color: #c2c2c2; + } + .badge-column { display: flex; align-items: center; diff --git a/website/client/components/groups/startQuestModal.vue b/website/client/components/groups/startQuestModal.vue index e55844ae21..2f48d519bc 100644 --- a/website/client/components/groups/startQuestModal.vue +++ b/website/client/components/groups/startQuestModal.vue @@ -12,7 +12,7 @@ div(v-if='questData') questDialogContent(:item="questData") div.text-center - button.btn.btn-primary(@click='questInit()', :disabled="!Boolean(selectedQuest)") {{$t('inviteToPartyOrQuest')}} + button.btn.btn-primary(@click='questInit()', :disabled="!Boolean(selectedQuest) || loading") {{$t('inviteToPartyOrQuest')}} div.text-center p {{$t('inviteInformation')}} .side-panel(v-if='questData') @@ -122,6 +122,7 @@ export default { }, data () { return { + loading: false, selectedQuest: {}, icons: Object.freeze({ copy: copyIcon, @@ -157,6 +158,8 @@ export default { }, async questInit () { + this.loading = true; + Analytics.updateUser({ partyID: this.group._id, partySize: this.group.memberCount, @@ -170,6 +173,8 @@ export default { if (this.$store.state.party.data) this.$store.state.party.data.quest = quest; + this.loading = false; + this.$root.$emit('hide::modal', 'start-quest-modal'); }, }, diff --git a/website/client/components/groups/tavern.vue b/website/client/components/groups/tavern.vue index 5e482d9a3a..213841d546 100644 --- a/website/client/components/groups/tavern.vue +++ b/website/client/components/groups/tavern.vue @@ -12,8 +12,13 @@ .row textarea(:placeholder="$t('tavernCommunityGuidelinesPlaceholder')", v-model='newMessage', :class='{"user-entry": newMessage}', @keydown='updateCarretPosition') autocomplete(:text='newMessage', v-on:select="selectedAutocomplete", :coords='coords', :chat='group.chat') - button.btn.btn-secondary.send-chat.float-right(v-once, @click='sendMessage()') {{ $t('send') }} - button.btn.btn-secondary.float-left(v-once, @click='fetchRecentMessages()') {{ $t('fetchRecentMessages') }} + + .row + .col-6 + button.btn.btn-secondary.send-chat.float-left(v-once, @click='sendMessage()') {{ $t('send') }} + .col-6 + button.btn.btn-secondary.float-right.fetch(v-once, @click='fetchRecentMessages()') {{ $t('fetchRecentMessages') }} + button.btn.btn-secondary.float-right(v-once, @click='reverseChat()') {{ $t('reverseChat') }} .row.community-guidelines(v-if='!communityGuidelinesAccepted') div.col-8(v-once, v-html="$t('communityGuidelinesIntro')") @@ -523,6 +528,11 @@ export default { document.body.removeChild(div); }, updateCarretPosition (eventUpdate) { + if (eventUpdate.metaKey && eventUpdate.keyCode === 13) { + this.sendMessage(); + return; + } + let text = eventUpdate.target; this.getCoord(eventUpdate, text); }, @@ -551,6 +561,9 @@ export default { async fetchRecentMessages () { this.group = await this.$store.dispatch('guilds:getGroup', {groupId: TAVERN_ID}); }, + reverseChat () { + this.group.chat.reverse(); + }, }, }; diff --git a/website/client/components/hall/heroes.vue b/website/client/components/hall/heroes.vue index 0545a90f09..d0054c1d74 100644 --- a/website/client/components/hall/heroes.vue +++ b/website/client/components/hall/heroes.vue @@ -186,8 +186,9 @@ export default { window.scrollTo(0, 200); this.loadHero(id, index); }, - clickMember (hero) { - this.$store.state.profileUser = hero; + async clickMember (hero) { + let heroDetails = await this.$store.dispatch('members:fetchMember', { memberId: hero._id }); + this.$store.state.profileUser = heroDetails.data.data; this.$store.state.profileOptions.startingPage = 'profile'; this.$root.$emit('show::modal', 'profile'); }, diff --git a/website/client/components/members/removeMemberModal.vue b/website/client/components/members/removeMemberModal.vue new file mode 100644 index 0000000000..fbdaa37206 --- /dev/null +++ b/website/client/components/members/removeMemberModal.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/website/client/components/settings/site.vue b/website/client/components/settings/site.vue index 76f704d9b8..24957203d6 100644 --- a/website/client/components/settings/site.vue +++ b/website/client/components/settings/site.vue @@ -34,7 +34,8 @@ .form-horizontal(v-if='user.flags.classSelected && !user.preferences.disableClasses') h5 {{ $t('characterBuild') }} h6(v-once) {{ $t('class') + ': ' }} - span {{ classText }}  + // @TODO: what is classText + span(v-if='classText') {{ classText }}  button.btn.btn-danger.btn-xs(@click='changeClass(null)', v-once) {{ $t('changeClass') }} small.cost 3 span.Pet_Currency_Gem1x.inline-gems @@ -117,21 +118,20 @@ button.btn.btn-primary(v-if='!user.auth[network.key].id', @click='socialLogin(network.key, user)') {{ $t('registerWithSocial', {network: network.name}) }} button.btn.btn-primary(disabled='disabled', v-if='!hasBackupAuthOption(network.key) && user.auth[network.key].id') {{ $t('registeredWithSocial', {network: network.name}) }} button.btn.btn-danger(@click='deleteSocialAuth(network.key)', v-if='hasBackupAuthOption(network.key) && user.auth[network.key].id') {{ $t('detachSocial', {network: network.name}) }} - // hr - // TODO - // div(v-if='!user.auth.local.username') + hr + div(v-if='!user.auth.local.username') p {{ $t('addLocalAuth') }} - form(ng-submit='http("post", "/api/v3/user/auth/local/register", localAuth, "addedLocalAuth")', name='localAuth', novalidate) + .form(name='localAuth', novalidate) //-.alert.alert-danger(ng-messages='changeUsername.$error && changeUsername.submitted') {{ $t('fillAll') }} .form-group - input.form-control(type='text', placeholder="$t('username')", v-model='localAuth.username', required) + input.form-control(type='text', :placeholder="$t('username')", v-model='localAuth.username', required) .form-group - input.form-control(type='text', placeholder="$t('email')", v-model='localAuth.email', required) + input.form-control(type='text', :placeholder="$t('email')", v-model='localAuth.email', required) .form-group - input.form-control(type='password', placeholder="$t('password')", v-model='localAuth.password', required) + input.form-control(type='password', :placeholder="$t('password')", v-model='localAuth.password', required) .form-group - input.form-control(type='password', placeholder="$t('confirmPass')", v-model='localAuth.confirmPassword', required) - button.btn.btn-primary(type='submit', ng-disabled='localAuth.$invalid', value="$t('submit')") + input.form-control(type='password', :placeholder="$t('confirmPass')", v-model='localAuth.confirmPassword', required) + button.btn.btn-primary(type='submit', @click='addLocalAuth()') {{ $t('submit') }} .usersettings(v-if='user.auth.local.username') p {{ $t('username') }} @@ -231,6 +231,12 @@ export default { usernameUpdates: {}, emailUpdates: {}, passwordUpdates: {}, + localAuth: { + username: '', + email: '', + password: '', + confirmPassword: '', + }, }; }, mounted () { @@ -290,6 +296,7 @@ export default { // Guide.goto('intro', 0, true); }, showBailey () { + this.user.flags.newStuff = true; this.$root.$emit('show::modal', 'new-stuff'); }, hasBackupAuthOption (networkKeyToCheck) { @@ -380,6 +387,9 @@ export default { alert(e.message); } }, + addLocalAuth () { + axios.post('/api/v3/user/auth/local/register', this.localAuth, 'addedLocalAuth'); + }, }, }; diff --git a/website/client/components/settings/subscription.vue b/website/client/components/settings/subscription.vue index 1e8db4b84e..538f57dcda 100644 --- a/website/client/components/settings/subscription.vue +++ b/website/client/components/settings/subscription.vue @@ -163,6 +163,16 @@ export default { }]); }, purchasedPlanIdInfo () { + if (!this.subscriptionBlocks[this.user.purchased.plan.planId]) { + // @TODO: find which subs are in the common + console.log(this.subscriptionBlocks[this.user.purchased.plan.planId]); // eslint-disable-line + return { + price: 0, + months: 0, + plan: '', + }; + } + return { price: this.subscriptionBlocks[this.user.purchased.plan.planId].price, months: this.subscriptionBlocks[this.user.purchased.plan.planId].months, diff --git a/website/client/components/static/header.vue b/website/client/components/static/header.vue index d003629a4e..05011d6f90 100644 --- a/website/client/components/static/header.vue +++ b/website/client/components/static/header.vue @@ -1,9 +1,7 @@