aboutsummaryrefslogtreecommitdiff
path: root/src/components/mentions/mentions.js
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2016-11-26 21:09:41 +0100
committerRoger Braun <roger@rogerbraun.net>2016-11-26 21:09:41 +0100
commit6c2941dba04ca3454251c8ad04cafc40ff4900e8 (patch)
tree714e2655e1005526ac5b23dc437f908c99c8a289 /src/components/mentions/mentions.js
parent8cd1c690cae1b3c0cce15401e794fa8011816454 (diff)
Basic mention support.
I still have to think about how to integrate them in the state system...
Diffstat (limited to 'src/components/mentions/mentions.js')
-rw-r--r--src/components/mentions/mentions.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/components/mentions/mentions.js b/src/components/mentions/mentions.js
new file mode 100644
index 00000000..3563101b
--- /dev/null
+++ b/src/components/mentions/mentions.js
@@ -0,0 +1,28 @@
+import Status from '../status/status.vue'
+// Temporary
+import { prepareStatus, updateTimestampsInStatuses } from '../../modules/statuses.js'
+import { map } from 'lodash'
+
+const Mentions = {
+ data () {
+ return {
+ mentions: []
+ }
+ },
+ computed: {
+ username () {
+ return this.$route.params.username
+ }
+ },
+ components: {
+ Status
+ },
+ created () {
+ this.$store.state.api.backendInteractor.fetchMentions({username: this.username})
+ .then((mentions) => {
+ this.mentions = updateTimestampsInStatuses(map(mentions, prepareStatus))
+ })
+ }
+}
+
+export default Mentions