aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/attachment/attachment.vue2
-rw-r--r--src/components/mentions/mentions.js21
-rw-r--r--src/components/mentions/mentions.vue4
3 files changed, 12 insertions, 15 deletions
diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue
index 6bc0356a..e16cc7cd 100644
--- a/src/components/attachment/attachment.vue
+++ b/src/components/attachment/attachment.vue
@@ -9,7 +9,7 @@
<a class="image-attachment" v-if="type === 'image' && !hidden"
:href="attachment.url" target="_blank">
- <img :src="attachment.url"></img>
+ <img referrerpolicy="no-referrer" :src="attachment.url"></img>
</a>
<video v-if="type === 'video' && !hidden" :src="attachment.url" controls></video>
diff --git a/src/components/mentions/mentions.js b/src/components/mentions/mentions.js
index e84d1912..46a1c63e 100644
--- a/src/components/mentions/mentions.js
+++ b/src/components/mentions/mentions.js
@@ -1,26 +1,25 @@
-import Status from '../status/status.vue'
-// Temporary
-import { prepareStatus } from '../../modules/statuses.js'
-import { map } from 'lodash'
+import Timeline from '../timeline/timeline.vue'
const Mentions = {
- data () {
- return {
- mentions: []
- }
- },
computed: {
username () {
return this.$route.params.username
+ },
+ timeline () {
+ return this.$store.state.statuses.timelines.mentions
}
},
components: {
- Status
+ Timeline
},
created () {
this.$store.state.api.backendInteractor.fetchMentions({username: this.username})
.then((mentions) => {
- this.mentions = map(mentions, prepareStatus)
+ this.$store.dispatch('addNewStatuses', {
+ statuses: mentions,
+ timeline: 'mentions',
+ showImmediately: true
+ })
})
}
}
diff --git a/src/components/mentions/mentions.vue b/src/components/mentions/mentions.vue
index a760719c..6287ca11 100644
--- a/src/components/mentions/mentions.vue
+++ b/src/components/mentions/mentions.vue
@@ -2,9 +2,7 @@
<div class="timeline panel panel-default">
<div class="panel-heading">Mentions</div>
<div class="panel-body">
- <div class="timeline">
- <status v-for="status in mentions" :key="status.id" v-bind:statusoid="status"></status>
- </div>
+ <Timeline v-bind:timeline="timeline" v-bind:timeline-name="'mentions'"/>
</div>
</div>
</template>