IMPROVEMENT: In single-post timeline, automaticaly hide the composer when

clicking its close ('x') icon.

Signed-off-by: Cyrille Bollu <cyrpub@bollu.be>
pull/793/head
Cyrille Bollu 2019-10-15 16:00:43 +02:00 zatwierdzone przez Robin Appelman
rodzic 265c2686a2
commit d8792993d4
2 zmienionych plików z 8 dodań i 2 usunięć

Wyświetl plik

@ -39,7 +39,7 @@
<span>In reply to</span>
<actor-avatar :actor="replyTo.actor_info" :size="16" />
<strong>{{ replyTo.actor_info.account }}</strong>
<a class="icon-close" @click="replyTo=null" />
<a class="icon-close" @click="closeReply()" />
</p>
<div class="reply-to-preview">
{{ replyTo.content }}
@ -830,6 +830,11 @@ export default {
})
},
closeReply() {
this.replyTo = null
// View may want to hide the composer
this.$store.commit('setComposerDisplayStatus', false)
},
remoteSearchAccounts(text) {
return axios.get(generateUrl('apps/social/api/v1/global/accounts/search?search=' + text))
},

Wyświetl plik

@ -48,7 +48,8 @@ const state = {
*/
params: {},
account: '',
/* Tells whether the composer should be displayed or not
/* Tells whether the composer should be displayed or not.
* It's up to the view to honor this status or not.
* @member {boolean}
*/
composerDisplayStatus: false