Skip to content
Snippets Groups Projects
Commit f146562d authored by lain's avatar lain
Browse files

Merge branch 'target_blank_profile' into 'develop'

Made links in user bio always open in new tabs

Closes #169

See merge request !394
parents 29ced0c0 6d6d1102
No related branches found
No related tags found
1 merge request!394Made links in user bio always open in new tabs
Pipeline #
......@@ -98,6 +98,14 @@ export default {
const store = this.$store
store.commit('setProfileView', { v })
}
},
linkClicked ({target}) {
if (target.tagName === 'SPAN') {
target = target.parentNode
}
if (target.tagName === 'A') {
window.open(target.href, '_blank')
}
}
}
}
......@@ -105,7 +105,7 @@
<span v-if="!hideUserStatsLocal">{{user.followers_count}}</span>
</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>
</div>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment