Merge branch 'target_blank_profile' into 'develop'

Made links in user bio always open in new tabs

Closes #169

See merge request pleroma/pleroma-fe!394
This commit is contained in:
lambda 2018-12-04 12:10:35 +00:00
commit f146562d70
2 changed files with 9 additions and 1 deletions

View File

@ -98,6 +98,14 @@ export default {
const store = this.$store const store = this.$store
store.commit('setProfileView', { v }) store.commit('setProfileView', { v })
} }
},
linkClicked ({target}) {
if (target.tagName === 'SPAN') {
target = target.parentNode
}
if (target.tagName === 'A') {
window.open(target.href, '_blank')
}
} }
} }
} }

View File

@ -105,7 +105,7 @@
<span v-if="!hideUserStatsLocal">{{user.followers_count}}</span> <span v-if="!hideUserStatsLocal">{{user.followers_count}}</span>
</div> </div>
</div> </div>
<p v-if="!hideBio && user.description_html" class="profile-bio" v-html="user.description_html"></p> <p @click.prevent="linkClicked" v-if="!hideBio && user.description_html" class="profile-bio" v-html="user.description_html"></p>
<p v-else-if="!hideBio" class="profile-bio">{{ user.description }}</p> <p v-else-if="!hideBio" class="profile-bio">{{ user.description }}</p>
</div> </div>
</div> </div>