mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
fix(profile): revert accidental changes
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
|
||||||
<div
|
<div
|
||||||
v-if="!user && userLoaded"
|
v-if="!user && userLoaded"
|
||||||
>
|
>
|
||||||
@@ -9,21 +8,124 @@
|
|||||||
v-else-if="userLoaded"
|
v-else-if="userLoaded"
|
||||||
class="profile"
|
class="profile"
|
||||||
>
|
>
|
||||||
<!-- HEADER -->
|
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="profile-actions d-flex">
|
<div class="profile-actions d-flex">
|
||||||
|
<router-link
|
||||||
|
:to="{ path: '/private-messages', query: { uuid: user._id } }"
|
||||||
|
replace
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
v-b-tooltip.hover.left="$t('sendMessage')"
|
||||||
|
class="btn btn-secondary message-icon"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
v-once
|
||||||
|
class="svg-icon message-icon"
|
||||||
|
v-html="icons.message"
|
||||||
|
></div>
|
||||||
|
</button>
|
||||||
|
</router-link>
|
||||||
|
<button
|
||||||
|
v-b-tooltip.hover.bottom="$t('sendGems')"
|
||||||
|
class="btn btn-secondary gift-icon"
|
||||||
|
@click="openSendGemsModal()"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="svg-icon gift-icon"
|
||||||
|
v-html="icons.gift"
|
||||||
|
></div>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
v-if="user._id !== userLoggedIn._id && userLoggedIn.inbox.blocks.indexOf(user._id) === -1"
|
||||||
|
v-b-tooltip.hover.right="$t('blockWarning')"
|
||||||
|
class="btn btn-secondary block-icon d-flex justify-content-center align-items-center"
|
||||||
|
@click="blockUser()"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
v-once
|
||||||
|
class="svg-icon block-icon"
|
||||||
|
v-html="icons.block"
|
||||||
|
></div>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
v-if="user._id !== userLoggedIn._id && userLoggedIn.inbox.blocks.indexOf(user._id) !== -1"
|
||||||
|
v-b-tooltip.hover.right="$t('unblock')"
|
||||||
|
class="btn btn-secondary positive-icon"
|
||||||
|
@click="unblockUser()"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="svg-icon positive-icon"
|
||||||
|
v-html="icons.positive"
|
||||||
|
></div>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
v-if="hasPermission(userLoggedIn, 'moderator')"
|
||||||
|
v-b-tooltip.hover.right="'Admin - Toggle Tools'"
|
||||||
|
class="btn btn-secondary positive-icon d-flex justify-content-center align-items-center"
|
||||||
|
@click="toggleAdminTools()"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="svg-icon positive-icon"
|
||||||
|
v-html="icons.staff"
|
||||||
|
></div>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
v-if="hasPermission(userLoggedIn, 'moderator') && adminToolsLoaded"
|
||||||
|
class="row admin-profile-actions"
|
||||||
|
>
|
||||||
|
<div class="col-12 text-right">
|
||||||
|
<span
|
||||||
|
v-if="!hero.flags || (hero.flags && !hero.flags.chatShadowMuted)"
|
||||||
|
v-b-tooltip.hover.bottom="'Turn on Shadow Muting'"
|
||||||
|
class="admin-action"
|
||||||
|
@click="adminTurnOnShadowMuting()"
|
||||||
|
>shadow-mute</span>
|
||||||
|
<span
|
||||||
|
v-if="hero.flags && hero.flags.chatShadowMuted"
|
||||||
|
v-b-tooltip.hover.bottom="'Turn off Shadow Muting'"
|
||||||
|
class="admin-action"
|
||||||
|
@click="adminTurnOffShadowMuting()"
|
||||||
|
>un-shadow-mute</span>
|
||||||
|
<span
|
||||||
|
v-if="!hero.flags || (hero.flags && !hero.flags.chatRevoked)"
|
||||||
|
v-b-tooltip.hover.bottom="'Revoke Chat Privileges'"
|
||||||
|
class="admin-action"
|
||||||
|
@click="adminRevokeChat()"
|
||||||
|
>mute</span>
|
||||||
|
<span
|
||||||
|
v-if="hero.flags && hero.flags.chatRevoked"
|
||||||
|
v-b-tooltip.hover.bottom="'Reinstate Chat Privileges'"
|
||||||
|
class="admin-action"
|
||||||
|
@click="adminReinstateChat()"
|
||||||
|
>un-mute</span>
|
||||||
|
<span
|
||||||
|
v-if="!hero.auth.blocked"
|
||||||
|
v-b-tooltip.hover.bottom="'Ban User'"
|
||||||
|
class="admin-action"
|
||||||
|
@click="adminBlockUser()"
|
||||||
|
>ban</span>
|
||||||
|
<span
|
||||||
|
v-if="hero.auth.blocked"
|
||||||
|
v-b-tooltip.hover.bottom="'Un-Ban User'"
|
||||||
|
class="admin-action"
|
||||||
|
@click="adminUnblockUser()"
|
||||||
|
>un-ban</span>
|
||||||
|
<router-link
|
||||||
|
:to="{ name: 'adminPanelUser', params: { userIdentifier: userId } }"
|
||||||
|
replace
|
||||||
|
>
|
||||||
|
Admin Panel
|
||||||
|
</router-link>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="">
|
<div class="col-12">
|
||||||
<member-details
|
<member-details :member="user" />
|
||||||
:member="user"
|
|
||||||
:class-badge-position="'hidden'"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- STATE CHANGES -->
|
<div class="row">
|
||||||
<div class="row state-pages">
|
|
||||||
<div class="text-center nav">
|
<div class="text-center nav">
|
||||||
<div
|
<div
|
||||||
class="nav-item"
|
class="nav-item"
|
||||||
@@ -48,8 +150,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<!-- SHOW PROFILE -->
|
|
||||||
<div
|
<div
|
||||||
v-show="selectedPage === 'profile'"
|
v-show="selectedPage === 'profile'"
|
||||||
v-if="user.profile"
|
v-if="user.profile"
|
||||||
@@ -57,12 +157,17 @@
|
|||||||
class="standard-page"
|
class="standard-page"
|
||||||
>
|
>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="">
|
<div class="col-12 col-md-8">
|
||||||
<div class="header mb-3">
|
<div class="header mb-3">
|
||||||
<h1>{{ $t('about') }}</h1>
|
<h1>{{ user.profile.name }}</h1>
|
||||||
|
<div
|
||||||
|
v-if="user.auth && user.auth.local && user.auth.local.username"
|
||||||
|
class="name"
|
||||||
|
>
|
||||||
|
@{{ user.auth.local.username }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- EDIT BUTTON REPURPOSE FOR SEND MESSAGE/OTHER ACTIONS-->
|
|
||||||
<div class="col-12 col-md-4">
|
<div class="col-12 col-md-4">
|
||||||
<button
|
<button
|
||||||
v-if="user._id === userLoggedIn._id"
|
v-if="user._id === userLoggedIn._id"
|
||||||
@@ -74,13 +179,13 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- PROFILE STUFF -->
|
|
||||||
<div
|
<div
|
||||||
v-if="!editing"
|
v-if="!editing"
|
||||||
class="row"
|
class="row"
|
||||||
>
|
>
|
||||||
<div class="">
|
<div class="col-12 col-md-8">
|
||||||
<div class="about profile-section">
|
<div class="about profile-section">
|
||||||
|
<h2>{{ $t('about') }}</h2>
|
||||||
<p
|
<p
|
||||||
v-if="user.profile.blurb"
|
v-if="user.profile.blurb"
|
||||||
v-markdown="user.profile.blurb"
|
v-markdown="user.profile.blurb"
|
||||||
@@ -101,8 +206,9 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="">
|
<div class="col-12 col-md-4">
|
||||||
<div class="info profile-section">
|
<div class="info profile-section">
|
||||||
|
<h2>{{ $t('info') }}</h2>
|
||||||
<div class="info-item">
|
<div class="info-item">
|
||||||
<div class="info-item-label">
|
<div class="info-item-label">
|
||||||
{{ $t('joined') }}:
|
{{ $t('joined') }}:
|
||||||
@@ -146,13 +252,12 @@
|
|||||||
<!-- @TODO: Implement in V2 .social-->
|
<!-- @TODO: Implement in V2 .social-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- EDITING PROFILE -->
|
|
||||||
<div
|
<div
|
||||||
v-if="editing"
|
v-if="editing"
|
||||||
class="row"
|
class="row"
|
||||||
>
|
>
|
||||||
<h1>{{ $t('editProfile') }}</h1>
|
<h1>{{ $t('editProfile') }}</h1>
|
||||||
<div class="">
|
<div class="col-12">
|
||||||
<div
|
<div
|
||||||
class="alert alert-info alert-sm"
|
class="alert alert-info alert-sm"
|
||||||
v-html="$t('communityGuidelinesWarning', managerEmail)"
|
v-html="$t('communityGuidelinesWarning', managerEmail)"
|
||||||
@@ -187,9 +292,9 @@
|
|||||||
<!-- include ../../shared/formatting-help-->
|
<!-- include ../../shared/formatting-help-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class=" text-center">
|
<div class="col-12 text-center">
|
||||||
<button
|
<button
|
||||||
class="btn btn-primary"
|
class="btn btn-primary mr-2"
|
||||||
@click="save()"
|
@click="save()"
|
||||||
>
|
>
|
||||||
{{ $t("save") }}
|
{{ $t("save") }}
|
||||||
@@ -203,7 +308,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- ACHIEVEMENTS -->
|
|
||||||
<div
|
<div
|
||||||
v-show="selectedPage === 'achievements'"
|
v-show="selectedPage === 'achievements'"
|
||||||
v-if="user.achievements"
|
v-if="user.achievements"
|
||||||
@@ -215,10 +319,10 @@
|
|||||||
:key="key"
|
:key="key"
|
||||||
class="row category-row"
|
class="row category-row"
|
||||||
>
|
>
|
||||||
<h3 class="text-center">
|
<h3 class="col-12 text-center mb-3">
|
||||||
{{ $t(`${key}Achievs`) }}
|
{{ $t(`${key}Achievs`) }}
|
||||||
</h3>
|
</h3>
|
||||||
<div class="">
|
<div class="col-12">
|
||||||
<div class="row achievements-row justify-content-center">
|
<div class="row achievements-row justify-content-center">
|
||||||
<div
|
<div
|
||||||
v-for="(achievement, achievKey) in achievementsCategory(key, category)"
|
v-for="(achievement, achievKey) in achievementsCategory(key, category)"
|
||||||
@@ -274,14 +378,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr class="">
|
<hr class="col-12">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div
|
<div
|
||||||
v-if="user.achievements.challenges"
|
v-if="user.achievements.challenges"
|
||||||
class=""
|
class="col-12 col-md-6"
|
||||||
>
|
>
|
||||||
<div class="achievement-icon achievement-karaoke-2x"></div>
|
<div class="achievement-icon achievement-karaoke-2x"></div>
|
||||||
<h3 class="text-center">
|
<h3 class="text-center mt-2 mb-4">
|
||||||
{{ $t('challengesWon') }}
|
{{ $t('challengesWon') }}
|
||||||
</h3>
|
</h3>
|
||||||
<div
|
<div
|
||||||
@@ -294,10 +398,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="user.achievements.quests"
|
v-if="user.achievements.quests"
|
||||||
class=""
|
class="col-12 col-md-6"
|
||||||
>
|
>
|
||||||
<div class="achievement-icon achievement-alien2x"></div>
|
<div class="achievement-icon achievement-alien2x"></div>
|
||||||
<h3 class="text-center">
|
<h3 class="text-center mt-2 mb-4">
|
||||||
{{ $t('questsCompleted') }}
|
{{ $t('questsCompleted') }}
|
||||||
</h3>
|
</h3>
|
||||||
<div
|
<div
|
||||||
@@ -316,8 +420,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- STATS -->
|
|
||||||
<div>
|
|
||||||
<profileStats
|
<profileStats
|
||||||
v-show="selectedPage === 'stats'"
|
v-show="selectedPage === 'stats'"
|
||||||
v-if="user.preferences"
|
v-if="user.preferences"
|
||||||
@@ -325,39 +427,24 @@
|
|||||||
:show-allocation="showAllocation()"
|
:show-allocation="showAllocation()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" >
|
<style lang="scss" >
|
||||||
@import '~@/assets/scss/colors.scss';
|
@import '~@/assets/scss/colors.scss';
|
||||||
|
|
||||||
#profile {
|
|
||||||
.modal-header{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-body {
|
|
||||||
padding: 0;
|
|
||||||
border-radius: 12px;
|
|
||||||
}
|
|
||||||
.modal-content {
|
|
||||||
background: $gray-700;
|
|
||||||
padding: 0;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile {
|
.profile {
|
||||||
.member-details {
|
.member-details {
|
||||||
margin-left: 24px;
|
.character-name, small, .small-text {
|
||||||
background-color: $white;
|
color: #878190;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&.character-name, small, .small-text {
|
|
||||||
color: $gray-50;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.standard-page {
|
.standard-page {
|
||||||
padding: 0px;
|
padding-bottom: 0rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-content {
|
||||||
|
background: #f9f9f9;
|
||||||
}
|
}
|
||||||
|
|
||||||
.progress-container > .progress {
|
.progress-container > .progress {
|
||||||
@@ -451,29 +538,22 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.state-pages {
|
|
||||||
background-color: $gray-700;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav {
|
.nav {
|
||||||
font-size: 0.875rem;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
min-height: 40px;
|
min-height: 40px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding-top: 16px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-item {
|
.nav-item {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 0 8px 8px 6px;
|
margin: 0 1.2em;
|
||||||
color: $gray-50;
|
padding: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-item:hover, .nav-item.active {
|
.nav-item:hover, .nav-item.active {
|
||||||
color: $purple-300;
|
color: #4f2a93;
|
||||||
border-bottom: 2px solid $purple-300;
|
border-bottom: 2px solid #4f2a93;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -577,8 +657,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.member-details {
|
.member-details {
|
||||||
small, .small-text {
|
.character-name, small, .small-text {
|
||||||
color: $gray-10;
|
color: #878190;
|
||||||
}
|
}
|
||||||
|
|
||||||
.progress-container > .progress {
|
.progress-container > .progress {
|
||||||
@@ -593,11 +673,21 @@
|
|||||||
size: 16px;
|
size: 16px;
|
||||||
color: $gray-50;
|
color: $gray-50;
|
||||||
}
|
}
|
||||||
|
h2:after {
|
||||||
|
background-color: $gray-500;
|
||||||
|
content: "";
|
||||||
|
display: inline-block;
|
||||||
|
height: 1px;
|
||||||
|
position: relative;
|
||||||
|
vertical-align: middle;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.info {
|
.info {
|
||||||
|
|
||||||
.info-item {
|
.info-item {
|
||||||
color: $gray-50;
|
color: $gray-200;
|
||||||
size: 14px;
|
size: 14px;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
|
|
||||||
|
|||||||
@@ -190,10 +190,14 @@
|
|||||||
class="col-12 col-md-6"
|
class="col-12 col-md-6"
|
||||||
>
|
>
|
||||||
<div class="row col-12 stats-column">
|
<div class="row col-12 stats-column">
|
||||||
<div
|
<div class="col-12 col-md-4 attribute-label">
|
||||||
:id="`${stat}-information`"
|
<span
|
||||||
class="col-12 col-md-4 attribute-label"
|
class="hint"
|
||||||
>
|
:popover-title="$t(statInfo.title)"
|
||||||
|
popover-placement="right"
|
||||||
|
:popover="$t(statInfo.popover)"
|
||||||
|
popover-trigger="mouseenter"
|
||||||
|
></span>
|
||||||
<div
|
<div
|
||||||
class="stat-title"
|
class="stat-title"
|
||||||
:class="stat"
|
:class="stat"
|
||||||
@@ -202,13 +206,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<strong class="number">{{ totalStatPoints(stat) | floorWholeNumber }}</strong>
|
<strong class="number">{{ totalStatPoints(stat) | floorWholeNumber }}</strong>
|
||||||
</div>
|
</div>
|
||||||
<b-popover
|
|
||||||
:target="`${stat}-information`"
|
|
||||||
triggers="hover focus"
|
|
||||||
placement="right"
|
|
||||||
:prevent-overflow="false"
|
|
||||||
:content="$t(statInfo.popover)"
|
|
||||||
/>
|
|
||||||
<div class="col-12 col-md-6">
|
<div class="col-12 col-md-6">
|
||||||
<ul class="bonus-stats">
|
<ul class="bonus-stats">
|
||||||
<li>
|
<li>
|
||||||
@@ -358,7 +355,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
allocateStatsList: {
|
allocateStatsList: {
|
||||||
str: { title: 'allocateStr', popover: 'strText', allocatepop: 'allocateStrPop' },
|
str: { title: 'allocateStr', popover: 'strengthText', allocatepop: 'allocateStrPop' },
|
||||||
int: { title: 'allocateInt', popover: 'intText', allocatepop: 'allocateIntPop' },
|
int: { title: 'allocateInt', popover: 'intText', allocatepop: 'allocateIntPop' },
|
||||||
con: { title: 'allocateCon', popover: 'conText', allocatepop: 'allocateConPop' },
|
con: { title: 'allocateCon', popover: 'conText', allocatepop: 'allocateConPop' },
|
||||||
per: { title: 'allocatePer', popover: 'perText', allocatepop: 'allocatePerPop' },
|
per: { title: 'allocatePer', popover: 'perText', allocatepop: 'allocatePerPop' },
|
||||||
@@ -367,7 +364,7 @@ export default {
|
|||||||
stats: {
|
stats: {
|
||||||
str: {
|
str: {
|
||||||
title: 'strength',
|
title: 'strength',
|
||||||
popover: 'strText',
|
popover: 'strengthText',
|
||||||
},
|
},
|
||||||
int: {
|
int: {
|
||||||
title: 'intelligence',
|
title: 'intelligence',
|
||||||
|
|||||||
Reference in New Issue
Block a user