mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 19:56:23 +00:00
Merge branch 'develop' into sabrecat/unsociable
This commit is contained in:
commit
7697d87358
5 changed files with 152 additions and 225 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit ee2883e08260347bfe63f08b0db1d60b69199ed1
|
||||
Subproject commit 109539e445936786e183ac800c1d956e1999f2b8
|
||||
|
|
@ -28,6 +28,18 @@ async function updateUser (user) {
|
|||
|
||||
if (user && user.items && user.items.gear && user.items.gear.owned && typeof user.items.gear.owned.back_special_namingDay2020 !== 'undefined') {
|
||||
set = { migration: MIGRATION_NAME };
|
||||
push = {
|
||||
notifications: {
|
||||
type: 'ITEM_RECEIVED',
|
||||
data: {
|
||||
icon: 'notif_namingDay_cake',
|
||||
title: 'Happy Naming Day!',
|
||||
text: 'To celebrate the day we became Habitica, we’ve awarded you some cake!',
|
||||
destination: '/inventory/items',
|
||||
},
|
||||
seen: false,
|
||||
},
|
||||
};
|
||||
} else if (user && user.items && user.items.gear && user.items.gear.owned && typeof user.items.gear.owned.body_special_namingDay2018 !== 'undefined') {
|
||||
set = { migration: MIGRATION_NAME, 'items.gear.owned.back_special_namingDay2020': true };
|
||||
push = {
|
||||
|
|
@ -36,7 +48,7 @@ async function updateUser (user) {
|
|||
data: {
|
||||
icon: 'notif_namingDay_back',
|
||||
title: 'Happy Naming Day!',
|
||||
text: 'To celebrate the day we became Habitica, we’ve awarded you a Royal Purple Gryphon Tail!',
|
||||
text: 'To celebrate the day we became Habitica, we’ve awarded you a Royal Purple Gryphon Tail and cake!',
|
||||
destination: '/inventory/equipment',
|
||||
},
|
||||
seen: false,
|
||||
|
|
@ -50,7 +62,7 @@ async function updateUser (user) {
|
|||
data: {
|
||||
icon: 'notif_namingDay_body',
|
||||
title: 'Happy Naming Day!',
|
||||
text: 'To celebrate the day we became Habitica, we’ve awarded you a Royal Purple Gryphon Cloak!',
|
||||
text: 'To celebrate the day we became Habitica, we’ve awarded you a Royal Purple Gryphon Cloak and cake!',
|
||||
destination: '/inventory/equipment',
|
||||
},
|
||||
seen: false,
|
||||
|
|
@ -64,7 +76,7 @@ async function updateUser (user) {
|
|||
data: {
|
||||
icon: 'notif_namingDay_head',
|
||||
title: 'Happy Naming Day!',
|
||||
text: 'To celebrate the day we became Habitica, we’ve awarded you a Royal Purple Gryphon Helm!',
|
||||
text: 'To celebrate the day we became Habitica, we’ve awarded you a Royal Purple Gryphon Helm and cake!',
|
||||
destination: '/inventory/equipment',
|
||||
},
|
||||
seen: false,
|
||||
|
|
@ -78,7 +90,7 @@ async function updateUser (user) {
|
|||
data: {
|
||||
icon: 'notif_namingDay_pet',
|
||||
title: 'Happy Naming Day!',
|
||||
text: 'To celebrate the day we became Habitica, we’ve awarded you a Royal Purple Gryphon Pet!',
|
||||
text: 'To celebrate the day we became Habitica, we’ve awarded you a Royal Purple Gryphon Pet and cake!',
|
||||
destination: '/inventory/stable',
|
||||
},
|
||||
seen: false,
|
||||
|
|
@ -92,7 +104,7 @@ async function updateUser (user) {
|
|||
data: {
|
||||
icon: 'notif_namingDay_mount',
|
||||
title: 'Happy Naming Day!',
|
||||
text: 'To celebrate the day we became Habitica, we’ve awarded you a Royal Purple Gryphon Mount!',
|
||||
text: 'To celebrate the day we became Habitica, we’ve awarded you a Royal Purple Gryphon Mount and cake!',
|
||||
destination: '/inventory/stable',
|
||||
},
|
||||
seen: false,
|
||||
|
|
|
|||
|
|
@ -36023,6 +36023,11 @@
|
|||
width: 28px;
|
||||
height: 28px;
|
||||
}
|
||||
.notif_namingDay_cake {
|
||||
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/notif_namingDay_cake.png');
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
}
|
||||
.notif_namingDay_head {
|
||||
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/notif_namingDay_head.png');
|
||||
width: 28px;
|
||||
|
|
|
|||
|
|
@ -1,173 +1,68 @@
|
|||
<template>
|
||||
<div
|
||||
v-if="!user && userLoaded"
|
||||
>
|
||||
<error404 />
|
||||
</div>
|
||||
<div
|
||||
v-else-if="userLoaded"
|
||||
class="profile"
|
||||
>
|
||||
<div class="header">
|
||||
<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
|
||||
v-if="!user && userLoaded"
|
||||
>
|
||||
<error404 />
|
||||
</div>
|
||||
<div
|
||||
v-else-if="userLoaded"
|
||||
class="profile"
|
||||
>
|
||||
<!-- HEADER -->
|
||||
<div class="header">
|
||||
<div class="profile-actions d-flex">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="">
|
||||
<member-details
|
||||
:member="user"
|
||||
:class-badge-position="'hidden'"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<member-details :member="user" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="text-center nav">
|
||||
<div
|
||||
class="nav-item"
|
||||
:class="{active: selectedPage === 'profile'}"
|
||||
@click="selectPage('profile')"
|
||||
>
|
||||
{{ $t('profile') }}
|
||||
</div>
|
||||
<div
|
||||
class="nav-item"
|
||||
:class="{active: selectedPage === 'stats'}"
|
||||
@click="selectPage('stats')"
|
||||
>
|
||||
{{ $t('stats') }}
|
||||
</div>
|
||||
<div
|
||||
class="nav-item"
|
||||
:class="{active: selectedPage === 'achievements'}"
|
||||
@click="selectPage('achievements')"
|
||||
>
|
||||
{{ $t('achievements') }}
|
||||
<!-- STATE CHANGES -->
|
||||
<div class="row state-pages">
|
||||
<div class="text-center nav">
|
||||
<div
|
||||
class="nav-item"
|
||||
:class="{active: selectedPage === 'profile'}"
|
||||
@click="selectPage('profile')"
|
||||
>
|
||||
{{ $t('profile') }}
|
||||
</div>
|
||||
<div
|
||||
class="nav-item"
|
||||
:class="{active: selectedPage === 'stats'}"
|
||||
@click="selectPage('stats')"
|
||||
>
|
||||
{{ $t('stats') }}
|
||||
</div>
|
||||
<div
|
||||
class="nav-item"
|
||||
:class="{active: selectedPage === 'achievements'}"
|
||||
@click="selectPage('achievements')"
|
||||
>
|
||||
{{ $t('achievements') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- SHOW PROFILE -->
|
||||
<div
|
||||
v-show="selectedPage === 'profile'"
|
||||
v-if="user.profile"
|
||||
id="userProfile"
|
||||
class="standard-page"
|
||||
class="standard-page "
|
||||
>
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-8">
|
||||
<div class="">
|
||||
<div class="header mb-3">
|
||||
<h1>{{ user.profile.name }}</h1>
|
||||
<div
|
||||
v-if="user.auth && user.auth.local && user.auth.local.username"
|
||||
class="name"
|
||||
>
|
||||
@{{ user.auth.local.username }}
|
||||
</div>
|
||||
<h1>{{ $t('about') }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
<!-- EDIT BUTTON REPURPOSE FOR SEND MESSAGE/OTHER ACTIONS-->
|
||||
<div class="col-12 col-md-4">
|
||||
<button
|
||||
v-if="user._id === userLoggedIn._id"
|
||||
|
|
@ -179,13 +74,13 @@
|
|||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- PROFILE STUFF -->
|
||||
<div
|
||||
v-if="!editing"
|
||||
class="row"
|
||||
>
|
||||
<div class="col-12 col-md-8">
|
||||
<div class="">
|
||||
<div class="about profile-section">
|
||||
<h2>{{ $t('about') }}</h2>
|
||||
<p
|
||||
v-if="user.profile.blurb"
|
||||
v-markdown="user.profile.blurb"
|
||||
|
|
@ -206,9 +101,8 @@
|
|||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-4">
|
||||
<div class="">
|
||||
<div class="info profile-section">
|
||||
<h2>{{ $t('info') }}</h2>
|
||||
<div class="info-item">
|
||||
<div class="info-item-label">
|
||||
{{ $t('joined') }}:
|
||||
|
|
@ -252,12 +146,13 @@
|
|||
<!-- @TODO: Implement in V2 .social-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- EDITING PROFILE -->
|
||||
<div
|
||||
v-if="editing"
|
||||
class="row"
|
||||
>
|
||||
<h1>{{ $t('editProfile') }}</h1>
|
||||
<div class="col-12">
|
||||
<div class="">
|
||||
<div
|
||||
class="alert alert-info alert-sm"
|
||||
v-html="$t('communityGuidelinesWarning', managerEmail)"
|
||||
|
|
@ -292,9 +187,9 @@
|
|||
<!-- include ../../shared/formatting-help-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 text-center">
|
||||
<div class=" text-center">
|
||||
<button
|
||||
class="btn btn-primary mr-2"
|
||||
class="btn btn-primary"
|
||||
@click="save()"
|
||||
>
|
||||
{{ $t("save") }}
|
||||
|
|
@ -308,21 +203,22 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ACHIEVEMENTS -->
|
||||
<div
|
||||
v-show="selectedPage === 'achievements'"
|
||||
v-if="user.achievements"
|
||||
id="achievements"
|
||||
class="standard-page container"
|
||||
class="standard-page container "
|
||||
>
|
||||
<div
|
||||
v-for="(category, key) in achievements"
|
||||
:key="key"
|
||||
class="row category-row"
|
||||
>
|
||||
<h3 class="col-12 text-center mb-3">
|
||||
<h3 class="text-center">
|
||||
{{ $t(`${key}Achievs`) }}
|
||||
</h3>
|
||||
<div class="col-12">
|
||||
<div class="">
|
||||
<div class="row achievements-row justify-content-center">
|
||||
<div
|
||||
v-for="(achievement, achievKey) in achievementsCategory(key, category)"
|
||||
|
|
@ -378,14 +274,14 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="col-12">
|
||||
<hr class="">
|
||||
<div class="row">
|
||||
<div
|
||||
v-if="user.achievements.challenges"
|
||||
class="col-12 col-md-6"
|
||||
class=""
|
||||
>
|
||||
<div class="achievement-icon achievement-karaoke-2x"></div>
|
||||
<h3 class="text-center mt-2 mb-4">
|
||||
<h3 class="text-center">
|
||||
{{ $t('challengesWon') }}
|
||||
</h3>
|
||||
<div
|
||||
|
|
@ -398,10 +294,10 @@
|
|||
</div>
|
||||
<div
|
||||
v-if="user.achievements.quests"
|
||||
class="col-12 col-md-6"
|
||||
class=""
|
||||
>
|
||||
<div class="achievement-icon achievement-alien2x"></div>
|
||||
<h3 class="text-center mt-2 mb-4">
|
||||
<h3 class="text-center">
|
||||
{{ $t('questsCompleted') }}
|
||||
</h3>
|
||||
<div
|
||||
|
|
@ -420,31 +316,48 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<profileStats
|
||||
v-show="selectedPage === 'stats'"
|
||||
v-if="user.preferences"
|
||||
:user="user"
|
||||
:show-allocation="showAllocation()"
|
||||
/>
|
||||
<!-- STATS -->
|
||||
<div>
|
||||
<profileStats
|
||||
v-show="selectedPage === 'stats'"
|
||||
v-if="user.preferences"
|
||||
:user="user"
|
||||
:show-allocation="showAllocation()"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" >
|
||||
@import '~@/assets/scss/colors.scss';
|
||||
|
||||
#profile {
|
||||
.modal-header{
|
||||
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
padding: 0;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.modal-content {
|
||||
background: $gray-700;
|
||||
padding: 0;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.profile {
|
||||
.member-details {
|
||||
.character-name, small, .small-text {
|
||||
color: #878190;
|
||||
margin-left: 24px;
|
||||
background-color: $white;
|
||||
|
||||
&.character-name, small, .small-text {
|
||||
color: $gray-50;
|
||||
}
|
||||
}
|
||||
|
||||
.standard-page {
|
||||
padding-bottom: 0rem;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
background: #f9f9f9;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.progress-container > .progress {
|
||||
|
|
@ -538,22 +451,29 @@
|
|||
}
|
||||
}
|
||||
|
||||
.state-pages {
|
||||
background-color: $gray-700;
|
||||
|
||||
}
|
||||
|
||||
.nav {
|
||||
font-size: 0.875rem;
|
||||
width: 100%;
|
||||
font-weight: bold;
|
||||
min-height: 40px;
|
||||
justify-content: center;
|
||||
padding-top: 16px;
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
display: inline-block;
|
||||
margin: 0 1.2em;
|
||||
padding: 1em;
|
||||
margin: 0 8px 8px 6px;
|
||||
color: $gray-50;
|
||||
}
|
||||
|
||||
.nav-item:hover, .nav-item.active {
|
||||
color: #4f2a93;
|
||||
border-bottom: 2px solid #4f2a93;
|
||||
color: $purple-300;
|
||||
border-bottom: 2px solid $purple-300;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
|
@ -657,8 +577,8 @@
|
|||
}
|
||||
|
||||
.member-details {
|
||||
.character-name, small, .small-text {
|
||||
color: #878190;
|
||||
small, .small-text {
|
||||
color: $gray-10;
|
||||
}
|
||||
|
||||
.progress-container > .progress {
|
||||
|
|
@ -673,21 +593,11 @@
|
|||
size: 16px;
|
||||
color: $gray-50;
|
||||
}
|
||||
h2:after {
|
||||
background-color: $gray-500;
|
||||
content: "";
|
||||
display: inline-block;
|
||||
height: 1px;
|
||||
position: relative;
|
||||
vertical-align: middle;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.info {
|
||||
|
||||
.info-item {
|
||||
color: $gray-200;
|
||||
color: $gray-50;
|
||||
size: 14px;
|
||||
margin-bottom: 8px;
|
||||
|
||||
|
|
|
|||
|
|
@ -120,27 +120,27 @@
|
|||
</h2>
|
||||
<div class="well pet-mount-well">
|
||||
<div class="pet-mount-well-image">
|
||||
<div
|
||||
class="box"
|
||||
:class="{white: user.items.currentPet}"
|
||||
>
|
||||
<div
|
||||
class="box"
|
||||
:class="{white: user.items.currentPet}"
|
||||
>
|
||||
<div
|
||||
class="Pet"
|
||||
:class="`Pet-${user.items.currentPet}`"
|
||||
></div>
|
||||
</div>
|
||||
class="Pet"
|
||||
:class="`Pet-${user.items.currentPet}`"
|
||||
></div>
|
||||
</div>
|
||||
<div class="pet-mount-well-text">
|
||||
<div>{{ formatAnimal(user.items.currentPet, 'pet') }}</div>
|
||||
<div>
|
||||
<strong>{{ $t('petsFound') }}:</strong>
|
||||
{{ totalCount(user.items.pets) }}
|
||||
</div>
|
||||
<div>
|
||||
<strong>{{ $t('beastMasterProgress') }}:</strong>
|
||||
{{ beastMasterProgress(user.items.pets) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="pet-mount-well-text">
|
||||
<div>{{ formatAnimal(user.items.currentPet, 'pet') }}</div>
|
||||
<div>
|
||||
<strong>{{ $t('petsFound') }}:</strong>
|
||||
{{ totalCount(user.items.pets) }}
|
||||
</div>
|
||||
<div>
|
||||
<strong>{{ $t('beastMasterProgress') }}:</strong>
|
||||
{{ beastMasterProgress(user.items.pets) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stats-section-mounts col-12 col-md-6">
|
||||
|
|
|
|||
Loading…
Reference in a new issue