diff options
Diffstat (limited to 'src/components/status')
| -rw-r--r-- | src/components/status/status.js | 8 | ||||
| -rw-r--r-- | src/components/status/status.vue | 9 |
2 files changed, 12 insertions, 5 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js index 030e22b5..46add8aa 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -40,6 +40,14 @@ const Status = { UserCardContent }, methods: { + linkClicked ({target}) { + if (target.tagName === 'SPAN') { + target = target.parentNode + } + if (target.tagName === 'A') { + window.open(target.href, '_blank') + } + }, toggleReplying () { this.replying = !this.replying }, diff --git a/src/components/status/status.vue b/src/components/status/status.vue index 0c004936..162ab140 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -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"> @@ -94,6 +94,7 @@ .user-content { min-height: 52px; + padding-top: 1px; } .source_url { @@ -110,8 +111,7 @@ } .status-content { - margin-top: 3px; - margin-bottom: 3px; + margin: 3px 15px 4px 0; } p { @@ -138,8 +138,7 @@ } .status { - padding: 0.5em; - padding-right: 1em; + padding: 0.65em 0.7em 0.8em 0.8em; border-bottom: 1px solid; } .muted button { |
