diff --git a/website/client/components/userMenu/profile.vue b/website/client/components/userMenu/profile.vue
index e00f7b3dfb..0d6aa3b1cd 100644
--- a/website/client/components/userMenu/profile.vue
+++ b/website/client/components/userMenu/profile.vue
@@ -134,146 +134,11 @@ div
h2.text-center {{$t('questsCompleted')}}
div(v-for='(value, key) in user.achievements.quests')
span {{ content.quests[key].text() }} ({{ value }})
- #stats.standard-page(v-show='selectedPage === "stats"', v-if='user.preferences')
- .row
- .col-12.col-md-6
- h2.text-center {{$t('equipment')}}
- .well
- .col-12.col-md-4.item-wrapper(v-for="(label, key) in equipTypes")
- .box(
- :id="key",
- v-if="label !== 'skip'",
- :class='{white: equippedItems[key] && equippedItems[key].indexOf("base_0") === -1}'
- )
- div(:class="`shop_${equippedItems[key]}`")
- b-popover(
- v-if="label !== 'skip' && equippedItems[key] && equippedItems[key].indexOf('base_0') === -1",
- :target="key",
- triggers="hover",
- :placement="'bottom'",
- :preventOverflow="false",
- )
- h4.gearTitle {{ getGearTitle(equippedItems[key]) }}
- attributesGrid.attributesGrid(
- :item="content.gear.flat[equippedItems[key]]",
- )
-
- h3(v-if="label !== 'skip'") {{ label }}
- .col-12.col-md-6
- h2.text-center {{$t('costume')}}
- .well
- // Use similar for loop for costume items, except show background if label is 'skip'.
- .col-12.col-md-4.item-wrapper(v-for="(label, key) in equipTypes")
- // Append a "C" to the key name since HTML IDs have to be unique.
- .box(
- :id="key + 'C'",
- v-if="label !== 'skip'",
- :class='{white: costumeItems[key] && costumeItems[key].indexOf("base_0") === -1}'
- )
- div(:class="`shop_${costumeItems[key]}`")
- // Show background on 8th tile rather than a piece of equipment.
- .box(v-if="label === 'skip'",
- :class='{white: user.preferences.background}', style="overflow:hidden"
- )
- div(:class="'icon_background_' + user.preferences.background")
- b-popover(
- v-if="label !== 'skip' && costumeItems[key] && costumeItems[key].indexOf('base_0') === -1",
- :target="key + 'C'",
- triggers="hover",
- :placement="'bottom'",
- :preventOverflow="false",
- )
- h4.gearTitle {{ getGearTitle(costumeItems[key]) }}
- attributesGrid.attributesGrid(
- :item="content.gear.flat[costumeItems[key]]",
- )
-
- h3(v-if="label !== 'skip'") {{ label }}
- h3(v-else) {{ $t('background') }}
-
- .row.pet-mount-row
- .col-12.col-md-6
- h2.text-center(v-once) {{ $t('pets') }}
- .well.pet-mount-well
- .row.col-12
- .col-12.col-md-4
- .box(:class='{white: user.items.currentPet}')
- .Pet(:class="`Pet-${user.items.currentPet}`")
- .col-12.col-md-8
- div
- | {{ formatAnimal(user.items.currentPet, 'pet') }}
- div
- strong {{ $t('petsFound') }}:
- | {{ totalCount(user.items.pets) }}
- div
- strong {{ $t('beastMasterProgress') }}:
- | {{ beastMasterProgress(user.items.pets) }}
- .col-12.col-md-6
- h2.text-center(v-once) {{ $t('mounts') }}
- .well.pet-mount-well
- .row.col-12
- .col-12.col-md-4
- .box(:class='{white: user.items.currentMount}')
- .mount(:class="`Mount_Icon_${user.items.currentMount}`")
- .col-12.col-md-8
- div
- | {{ formatAnimal(user.items.currentMount, 'mount') }}
- div
- strong {{ $t('mountsTamed') }}:
- span {{ totalCount(user.items.mounts) }}
- div
- strong {{ $t('mountMasterProgress') }}:
- span {{ mountMasterProgress(user.items.mounts) }}
- #attributes.row
- hr.col-12
- h2.col-12 {{$t('attributes')}}
- .col-12.col-md-6(v-for="(statInfo, stat) in stats")
- .row.col-12.stats-column
- .col-12.col-md-4.attribute-label
- span.hint(:popover-title='$t(statInfo.title)', popover-placement='right',
- :popover='$t(statInfo.popover)', popover-trigger='mouseenter')
- .stat-title(:class='stat') {{ $t(statInfo.title) }}
- strong.number {{ statsComputed[stat] | floorWholeNumber }}
- .col-12.col-md-6
- ul.bonus-stats
- li
- strong {{$t('level')}}:
- | {{statsComputed.levelBonus[stat]}}
- li
- strong {{$t('equipment')}}:
- | {{statsComputed.gearBonus[stat]}}
- li
- strong {{$t('class')}}:
- | {{statsComputed.classBonus[stat]}}
- li
- strong {{$t('allocated')}}:
- | {{user.stats[stat]}}
- li
- strong {{$t('buffs')}}:
- | {{user.stats.buffs[stat]}}
- #allocation(v-if='user._id === userLoggedIn._id && hasClass')
- .row.title-row
- .col-12.col-md-6
- h3(v-if='userLevel100Plus', v-once, v-html="$t('noMoreAllocate')")
- h3(v-if='user.stats.points || userLevel100Plus')
- | {{$t('pointsAvailable')}}
- .counter.badge(v-if='user.stats.points || userLevel100Plus')
- | {{user.stats.points}}
- .col-12.col-md-6
- .float-right
- toggle-switch(:label="$t('autoAllocation')",
- v-model='user.preferences.automaticAllocation',
- @change='userset({"preferences.automaticAllocation": Boolean(user.preferences.automaticAllocation), "preferences.allocationMode": "taskbased"})')
-
- .row
- .col-12.col-md-3(v-for='(statInfo, stat) in allocateStatsList')
- .box.white.row.col-12
- .col-12
- div(:class='stat') {{ $t(stats[stat].title) }}
- .number {{ user.stats[stat] }}
- .points {{$t('pts')}}
- .col-12.col-md-4
- .up(v-if='user.stats.points', @click='allocate(stat)')
+ profileStats(
+ :user='user',
+ v-show='selectedPage === "stats"',
+ :showAllocation='showAllocation()',
+ v-if='user.preferences')
send-gems-modal(:userReceivingGems='userReceivingGems')
@@ -345,15 +210,6 @@ div
color: #686274;
}
- .pet-mount-row {
- margin-top: 2em;
- margin-bottom: 2em;
- }
-
- .mount {
- margin-top: -0.2em !important;
- }
-
.photo img {
max-width: 100%;
}
@@ -385,33 +241,6 @@ div
cursor: pointer;
}
- #attributes {
- .number {
- font-size: 64px;
- font-weight: bold;
- color: #686274;
- }
-
- .attribute-label {
- text-align: center;
- }
- }
-
- .well {
- background-color: #edecee;
- border-radius: 2px;
- padding: 0.4em;
- padding-top: 1em;
- }
-
- .well.pet-mount-well {
- padding-bottom: 1em;
-
- strong {
- margin-right: .2em;
- }
- }
-
#achievements {
.box {
margin: 0 auto;
@@ -470,107 +299,7 @@ div
}
}
- #stats {
- .box div {
- margin: 0 auto;
- margin-top: 1em;
- }
- }
- .stats-column {
- border-radius: 2px;
- background-color: #ffffff;
- padding: .5em;
- margin-bottom: 1em;
-
- ul {
- list-style-type: none;
-
- li strong {
- margin-right: .3em;
- }
- }
- }
-
- .stat-title {
- text-transform: uppercase;
- }
-
- .str {
- color: #f74e52;
- }
-
- .int {
- color: #2995cd;
- }
-
- .con {
- color: #ffa623;
- }
-
- .per {
- color: #4f2a93;
- }
-
- #allocation {
- .title-row {
- margin-top: 1em;
- margin-bottom: 1em;
- }
-
- .counter.badge {
- position: relative;
- top: -0.25em;
- left: 0.5em;
- color: #fff;
- background-color: #ff944c;
- box-shadow: 0 1px 1px 0 rgba(26, 24, 29, 0.12);
- width: 24px;
- height: 24px;
- border-radius: 50%;
- }
-
- .box {
- width: 148px;
- height: 84px;
- padding: .5em;
- margin: 0 auto;
-
- div {
- margin-top: 0;
- }
-
- .number {
- font-size: 40px;
- text-align: left;
- color: #686274;
- display: inline-block;
- }
-
- .points {
- display: inline-block;
- font-weight: bold;
- line-height: 1.67;
- text-align: left;
- color: #878190;
- margin-left: .5em;
- }
-
- .up {
- border: solid #a5a1ac;
- border-width: 0 3px 3px 0;
- display: inline-block;
- padding: 3px;
- transform: rotate(-135deg);
- -webkit-transform: rotate(-135deg);
- margin-top: 1em;
- }
-
- .up:hover {
- cursor: pointer;
- }
- }
- }
diff --git a/website/client/components/userMenu/profileStats.vue b/website/client/components/userMenu/profileStats.vue
new file mode 100644
index 0000000000..3327904110
--- /dev/null
+++ b/website/client/components/userMenu/profileStats.vue
@@ -0,0 +1,460 @@
+
+ #stats.standard-page
+ .row
+ .col-12.col-md-6
+ h2.text-center {{$t('equipment')}}
+ .well
+ .col-12.col-md-4.item-wrapper(v-for="(label, key) in equipTypes")
+ .box(
+ :id="key",
+ v-if="label !== 'skip'",
+ :class='{white: equippedItems[key] && equippedItems[key].indexOf("base_0") === -1}'
+ )
+ div(:class="`shop_${equippedItems[key]}`")
+ b-popover(
+ v-if="label !== 'skip' && equippedItems[key] && equippedItems[key].indexOf('base_0') === -1",
+ :target="key",
+ triggers="hover",
+ :placement="'bottom'",
+ :preventOverflow="false",
+ )
+ h4.gearTitle {{ getGearTitle(equippedItems[key]) }}
+ attributesGrid.attributesGrid(
+ :item="content.gear.flat[equippedItems[key]]",
+ )
+
+ h3(v-if="label !== 'skip'") {{ label }}
+ .col-12.col-md-6
+ h2.text-center {{$t('costume')}}
+ .well
+ // Use similar for loop for costume items, except show background if label is 'skip'.
+ .col-12.col-md-4.item-wrapper(v-for="(label, key) in equipTypes")
+ // Append a "C" to the key name since HTML IDs have to be unique.
+ .box(
+ :id="key + 'C'",
+ v-if="label !== 'skip'",
+ :class='{white: costumeItems[key] && costumeItems[key].indexOf("base_0") === -1}'
+ )
+ div(:class="`shop_${costumeItems[key]}`")
+ // Show background on 8th tile rather than a piece of equipment.
+ .box(v-if="label === 'skip'",
+ :class='{white: user.preferences.background}', style="overflow:hidden"
+ )
+ div(:class="'icon_background_' + user.preferences.background")
+ b-popover(
+ v-if="label !== 'skip' && costumeItems[key] && costumeItems[key].indexOf('base_0') === -1",
+ :target="key + 'C'",
+ triggers="hover",
+ :placement="'bottom'",
+ :preventOverflow="false",
+ )
+ h4.gearTitle {{ getGearTitle(costumeItems[key]) }}
+ attributesGrid.attributesGrid(
+ :item="content.gear.flat[costumeItems[key]]",
+ )
+
+ h3(v-if="label !== 'skip'") {{ label }}
+ h3(v-else) {{ $t('background') }}
+
+ .row.pet-mount-row
+ .col-12.col-md-6
+ h2.text-center(v-once) {{ $t('pets') }}
+ .well.pet-mount-well
+ .row.col-12
+ .col-12.col-md-4
+ .box(:class='{white: user.items.currentPet}')
+ .Pet(:class="`Pet-${user.items.currentPet}`")
+ .col-12.col-md-8
+ div
+ | {{ formatAnimal(user.items.currentPet, 'pet') }}
+ div
+ strong {{ $t('petsFound') }}:
+ | {{ totalCount(user.items.pets) }}
+ div
+ strong {{ $t('beastMasterProgress') }}:
+ | {{ beastMasterProgress(user.items.pets) }}
+ .col-12.col-md-6
+ h2.text-center(v-once) {{ $t('mounts') }}
+ .well.pet-mount-well
+ .row.col-12
+ .col-12.col-md-4
+ .box(:class='{white: user.items.currentMount}')
+ .mount(:class="`Mount_Icon_${user.items.currentMount}`")
+ .col-12.col-md-8
+ div
+ | {{ formatAnimal(user.items.currentMount, 'mount') }}
+ div
+ strong {{ $t('mountsTamed') }}:
+ span {{ totalCount(user.items.mounts) }}
+ div
+ strong {{ $t('mountMasterProgress') }}:
+ span {{ mountMasterProgress(user.items.mounts) }}
+ #attributes.row
+ hr.col-12
+ h2.col-12 {{$t('attributes')}}
+ .col-12.col-md-6(v-for="(statInfo, stat) in stats")
+ .row.col-12.stats-column
+ .col-12.col-md-4.attribute-label
+ span.hint(:popover-title='$t(statInfo.title)', popover-placement='right',
+ :popover='$t(statInfo.popover)', popover-trigger='mouseenter')
+ .stat-title(:class='stat') {{ $t(statInfo.title) }}
+ strong.number {{ statsComputed[stat] | floorWholeNumber }}
+ .col-12.col-md-6
+ ul.bonus-stats
+ li
+ strong {{$t('level')}}:
+ | {{statsComputed.levelBonus[stat]}}
+ li
+ strong {{$t('equipment')}}:
+ | {{statsComputed.gearBonus[stat]}}
+ li
+ strong {{$t('class')}}:
+ | {{statsComputed.classBonus[stat]}}
+ li
+ strong {{$t('allocated')}}:
+ | {{user.stats[stat]}}
+ li
+ strong {{$t('buffs')}}:
+ | {{user.stats.buffs[stat]}}
+ #allocation(v-if='showAllocation')
+ .row.title-row
+ .col-12.col-md-6
+ h3(v-if='userLevel100Plus', v-once, v-html="$t('noMoreAllocate')")
+ h3(v-if='user.stats.points || userLevel100Plus')
+ | {{$t('pointsAvailable')}}
+ .counter.badge(v-if='user.stats.points || userLevel100Plus')
+ | {{user.stats.points}}
+ .col-12.col-md-6
+ .float-right
+ toggle-switch(
+ :label="$t('autoAllocation')",
+ v-model='user.preferences.automaticAllocation',
+ @change='setAutoAllocate()'
+ )
+
+ .row
+ .col-12.col-md-3(v-for='(statInfo, stat) in allocateStatsList')
+ .box.white.row.col-12
+ .col-12
+ div(:class='stat') {{ $t(stats[stat].title) }}
+ .number {{ user.stats[stat] }}
+ .points {{$t('pts')}}
+ .col-12.col-md-4
+ .up(v-if='user.stats.points', @click='allocate(stat)')
+
+
+
+
+