diff --git a/src/components/mentions/mentions.js b/src/components/mentions/mentions.js new file mode 100644 index 0000000000..3563101bb2 --- /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 diff --git a/src/components/mentions/mentions.vue b/src/components/mentions/mentions.vue new file mode 100644 index 0000000000..a760719c40 --- /dev/null +++ b/src/components/mentions/mentions.vue @@ -0,0 +1,12 @@ + + + diff --git a/src/components/nav_panel/nav_panel.js b/src/components/nav_panel/nav_panel.js index c2373a26c0..baeaaede29 100644 --- a/src/components/nav_panel/nav_panel.js +++ b/src/components/nav_panel/nav_panel.js @@ -1,6 +1,6 @@ const NavPanel = { computed: { - loggedIn () { + currentUser () { return this.$store.state.users.currentUser } } diff --git a/src/components/nav_panel/nav_panel.vue b/src/components/nav_panel/nav_panel.vue index f463ef95c1..b709d9140b 100644 --- a/src/components/nav_panel/nav_panel.vue +++ b/src/components/nav_panel/nav_panel.vue @@ -2,11 +2,16 @@