Make usernames clickable in Hall of Heroes Fixes #11014 (#11281)

* Add userLink (user-link) import to heroes component

* Use the userLink component to make user names clickable in the hall of heroes

This fixes #11014
This commit is contained in:
Preston Skupinski 2019-08-18 10:28:48 -05:00 committed by Matteo Pagliazzi
parent 6784d23a7c
commit 8b5129cd4f

View file

@ -90,12 +90,8 @@
tbody
tr(v-for='(hero, index) in heroes')
td
span(v-if='hero.contributor && hero.contributor.admin', :popover="$t('gamemaster')", popover-trigger='mouseenter', popover-placement='right')
.label.label-default(:class='userLevelStyle(hero)')
| {{hero.profile.name}} 
//- span(v-class='userAdminGlyphiconStyle(hero)')
span(v-if='!hero.contributor || !hero.contributor.admin')
.label.label-default(v-if='hero.profile', v-class='userLevelStyle(hero)') {{hero.profile.name}}
user-link(v-if='hero.contributor && hero.contributor.admin', :user='hero', :popover="$t('gamemaster')", popover-trigger='mouseenter', popover-placement='right')
user-link(v-if='!hero.contributor || !hero.contributor.admin', :user='hero')
td(v-if='user.contributor.admin', @click='populateContributorInput(hero._id, index)').btn-link {{hero._id}}
td {{hero.contributor.level}}
td {{hero.contributor.text}}
@ -120,9 +116,13 @@ import { mountInfo, petInfo } from 'common/script/content/stable';
import { food, hatchingPotions, special } from 'common/script/content';
import gear from 'common/script/content/gear';
import notifications from 'client/mixins/notifications';
import userLink from '../userLink';
export default {
mixins: [notifications, styleHelper],
components: {
userLink,
},
data () {
return {
heroes: [],