Save author of the status in state
This commit is contained in:
parent
2f0f424f91
commit
fd54181805
2 changed files with 8 additions and 2 deletions
|
@ -5,6 +5,7 @@ const status = {
|
||||||
fetchedStatus: {},
|
fetchedStatus: {},
|
||||||
fetchedStatuses: [],
|
fetchedStatuses: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
|
statusAuthor: {},
|
||||||
statusesByInstance: {
|
statusesByInstance: {
|
||||||
selectedInstance: '',
|
selectedInstance: '',
|
||||||
showLocal: false,
|
showLocal: false,
|
||||||
|
@ -49,6 +50,9 @@ const status = {
|
||||||
},
|
},
|
||||||
SET_STATUS_VISIBILITY: (state, visibility) => {
|
SET_STATUS_VISIBILITY: (state, visibility) => {
|
||||||
state.statusVisibility = visibility
|
state.statusVisibility = visibility
|
||||||
|
},
|
||||||
|
SET_STATUS_AUTHOR: (state, user) => {
|
||||||
|
state.statusAuthor = user
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
|
@ -77,6 +81,7 @@ const status = {
|
||||||
const status = await fetchStatus(id, getters.authHost, getters.token)
|
const status = await fetchStatus(id, getters.authHost, getters.token)
|
||||||
|
|
||||||
commit('SET_STATUS', status.data)
|
commit('SET_STATUS', status.data)
|
||||||
|
commit('SET_STATUS_AUTHOR', status.data.account)
|
||||||
commit('SET_LOADING', false)
|
commit('SET_LOADING', false)
|
||||||
dispatch('FetchUserStatuses', { userId: state.fetchedStatus.account.id, godmode: false })
|
dispatch('FetchUserStatuses', { userId: state.fetchedStatus.account.id, godmode: false })
|
||||||
},
|
},
|
||||||
|
|
|
@ -8,7 +8,8 @@
|
||||||
<div class="left-header-container">
|
<div class="left-header-container">
|
||||||
<moderation-dropdown
|
<moderation-dropdown
|
||||||
:user="user"
|
:user="user"
|
||||||
:page="'userPage'"
|
:page="'statusPage'"
|
||||||
|
:status-id="status.id"
|
||||||
@open-reset-token-dialog="openResetPasswordDialog"/>
|
@open-reset-token-dialog="openResetPasswordDialog"/>
|
||||||
<reboot-button/>
|
<reboot-button/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -81,7 +82,7 @@ export default {
|
||||||
return this.$store.state.userProfile.statusesLoading
|
return this.$store.state.userProfile.statusesLoading
|
||||||
},
|
},
|
||||||
user() {
|
user() {
|
||||||
return this.$store.state.status.fetchedStatus.account
|
return this.$store.state.status.statusAuthor
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeMount: function() {
|
beforeMount: function() {
|
||||||
|
|
Loading…
Reference in a new issue