mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
* Added Contributor Titles to Names on Hover * Added Contributor Titles to Names on Hover * added contributor title text on hover * added contributor titles on hover in chat * added contributor titles to text on hover * Delete .project
This commit is contained in:
@@ -7,7 +7,7 @@ div
|
|||||||
h3.leader(
|
h3.leader(
|
||||||
:class='userLevelStyle(msg)',
|
:class='userLevelStyle(msg)',
|
||||||
@click="showMemberModal(msg.uuid)",
|
@click="showMemberModal(msg.uuid)",
|
||||||
v-b-tooltip.hover.top="('contributor' in msg) ? msg.contributor.text : ''",
|
v-b-tooltip.hover.top="tierTitle",
|
||||||
)
|
)
|
||||||
| {{msg.user}}
|
| {{msg.user}}
|
||||||
.svg-icon(v-html="tierIcon", v-if='showShowTierStyle')
|
.svg-icon(v-html="tierIcon", v-if='showShowTierStyle')
|
||||||
@@ -119,6 +119,8 @@ import markdownDirective from 'client/directives/markdown';
|
|||||||
import { mapState } from 'client/libs/store';
|
import { mapState } from 'client/libs/store';
|
||||||
import styleHelper from 'client/mixins/styleHelper';
|
import styleHelper from 'client/mixins/styleHelper';
|
||||||
|
|
||||||
|
import achievementsLib from '../../../common/script/libs/achievements';
|
||||||
|
|
||||||
import deleteIcon from 'assets/svg/delete.svg';
|
import deleteIcon from 'assets/svg/delete.svg';
|
||||||
import copyIcon from 'assets/svg/copy.svg';
|
import copyIcon from 'assets/svg/copy.svg';
|
||||||
import likeIcon from 'assets/svg/like.svg';
|
import likeIcon from 'assets/svg/like.svg';
|
||||||
@@ -221,6 +223,10 @@ export default {
|
|||||||
}
|
}
|
||||||
return this.icons[`tier${message.contributor.level}`];
|
return this.icons[`tier${message.contributor.level}`];
|
||||||
},
|
},
|
||||||
|
tierTitle () {
|
||||||
|
const message = this.msg;
|
||||||
|
return achievementsLib.getContribText(message.contributor, message.backer) || '';
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async like () {
|
async like () {
|
||||||
|
|||||||
@@ -316,4 +316,6 @@ achievs.getAchievementsForProfile = function getAchievementsForProfile (user, la
|
|||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
achievs.getContribText = contribText;
|
||||||
|
|
||||||
module.exports = achievs;
|
module.exports = achievs;
|
||||||
|
|||||||
Reference in New Issue
Block a user