Allow user click on toot to view detail

This commit is contained in:
Sardo 2018-04-11 13:19:59 +08:00
parent af9ea04f7c
commit b7f3fd2e04
2 changed files with 1 additions and 7 deletions

View File

@ -3,7 +3,7 @@
<div class="icon">
<img :src="originalMessage(message).account.avatar" @click="openUser(originalMessage(message).account)"/>
</div>
<div class="detail">
<div class="detail" @click="openDetail(message)">
<div class="toot-header">
<div class="user" @click="openUser(originalMessage(message).account)">
{{ username(originalMessage(message).account) }}

View File

@ -4,7 +4,6 @@ const TootDetail = {
namespaced: true,
state: {
message: null,
loading: false,
ancestors: [],
descendants: []
},
@ -12,9 +11,6 @@ const TootDetail = {
changeToot (state, message) {
state.message = message
},
changeLoading (state, value) {
state.loading = value
},
updateAncestors (state, ancestors) {
state.ancestors = ancestors
},
@ -28,7 +24,6 @@ const TootDetail = {
},
fetchToot ({ state, commit, rootState }, message) {
return new Promise((resolve, reject) => {
commit('TimelineSpace/Contents/SideBar/TootDetail/changeLoading', true, { root: true })
const client = new Mastodon(
{
access_token: rootState.TimelineSpace.account.accessToken,
@ -38,7 +33,6 @@ const TootDetail = {
if (err) return reject(err)
commit('updateAncestors', data.ancestors)
commit('updateDescendants', data.descendants)
commit('TimelineSpace/Contents/SideBar/TootDetail/changeLoading', false, { root: true })
resolve(res)
})
})