forked from AkkomaGang/akkoma-fe
Open clicked links the statusnet_html in a new window.
This commit is contained in:
parent
73f46bfba6
commit
04c4ad9a65
4 changed files with 12 additions and 2 deletions
|
@ -20,6 +20,11 @@ const Attachment = {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
linkClicked ({target}) {
|
||||
if (target.tagName === 'A') {
|
||||
window.open(target.href, '_blank')
|
||||
}
|
||||
},
|
||||
toggleHidden () {
|
||||
this.showHidden = !this.showHidden
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
<span v-if="type === 'unknown'">Don't know how to display this...</span>
|
||||
|
||||
<div v-if="type === 'html' && attachment.oembed" class="oembed">
|
||||
<div @click.prevent="linkClicked" v-if="type === 'html' && attachment.oembed" class="oembed">
|
||||
<div v-if="attachment.thumb_url" class="image">
|
||||
<img :src="attachment.thumb_url"></img>
|
||||
</div>
|
||||
|
|
|
@ -40,6 +40,11 @@ const Status = {
|
|||
UserCardContent
|
||||
},
|
||||
methods: {
|
||||
linkClicked ({target}) {
|
||||
if (target.tagName === 'A') {
|
||||
window.open(target.href, '_blank')
|
||||
}
|
||||
},
|
||||
toggleReplying () {
|
||||
this.replying = !this.replying
|
||||
},
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
</small>
|
||||
</h4>
|
||||
|
||||
<div class="status-content" v-html="status.statusnet_html"></div>
|
||||
<div @click.prevent="linkClicked" class="status-content" v-html="status.statusnet_html"></div>
|
||||
|
||||
<div v-if='status.attachments' class='attachments'>
|
||||
<attachment :status-id="status.id" :nsfw="status.nsfw" :attachment="attachment" v-for="attachment in status.attachments">
|
||||
|
|
Loading…
Reference in a new issue