Open mentions in new tab
This commit is contained in:
parent
34333925d2
commit
b10ba55aca
|
@ -60,11 +60,7 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit {
|
||||||
if (this.parentComment) {
|
if (this.parentComment) {
|
||||||
const mentions = this.parentComments
|
const mentions = this.parentComments
|
||||||
.filter(c => c.account.id !== this.user.account.id) // Don't add mention of ourselves
|
.filter(c => c.account.id !== this.user.account.id) // Don't add mention of ourselves
|
||||||
.map(c => {
|
.map(c => c.by)
|
||||||
if (c.account.host) return '@' + c.account.name + '@' + c.account.host
|
|
||||||
|
|
||||||
return c.account.name
|
|
||||||
})
|
|
||||||
|
|
||||||
const mentionsSet = new Set(mentions)
|
const mentionsSet = new Set(mentions)
|
||||||
const mentionsText = Array.from(mentionsSet).join(' ') + ' '
|
const mentionsText = Array.from(mentionsSet).join(' ') + ' '
|
||||||
|
|
|
@ -100,7 +100,7 @@ export class VideoCommentComponent implements OnInit, OnChanges {
|
||||||
allowedTags: [ 'a', 'p', 'span', 'br' ],
|
allowedTags: [ 'a', 'p', 'span', 'br' ],
|
||||||
allowedSchemes: [ 'http', 'https' ],
|
allowedSchemes: [ 'http', 'https' ],
|
||||||
allowedAttributes: {
|
allowedAttributes: {
|
||||||
'a': [ 'href', 'class' ]
|
'a': [ 'href', 'class', 'target' ]
|
||||||
},
|
},
|
||||||
transformTags: {
|
transformTags: {
|
||||||
a: (tagName, attribs) => {
|
a: (tagName, attribs) => {
|
||||||
|
|
Loading…
Reference in New Issue