Display additional scope description above the status form for mobile users.

This commit is contained in:
eugenijm 2019-04-22 18:25:21 +03:00
parent 4819009d21
commit befaa477a3
3 changed files with 8 additions and 3 deletions

View file

@ -12,7 +12,8 @@ const MobilePostStatusModal = {
scrollingDown: false, scrollingDown: false,
inputActive: false, inputActive: false,
oldScrollPos: 0, oldScrollPos: 0,
amountScrolled: 0 amountScrolled: 0,
visibility: this.$store.state.users.currentUser.default_scope
} }
}, },
created () { created () {
@ -32,6 +33,9 @@ const MobilePostStatusModal = {
} }
}, },
methods: { methods: {
onScopeChange (visibility) {
this.visibility = visibility
},
openPostForm () { openPostForm () {
this.postFormOpen = true this.postFormOpen = true
this.hidden = true this.hidden = true

View file

@ -6,8 +6,8 @@
@click="closePostForm" @click="closePostForm"
> >
<div class="post-form-modal-panel panel" @click.stop=""> <div class="post-form-modal-panel panel" @click.stop="">
<div class="panel-heading">{{$t('post_status.new_status')}}</div> <div class="panel-heading">{{$t('post_status.new_status') + ' (' + $t('post_status.scope.' + visibility) + ')'}}</div>
<PostStatusForm class="panel-body" @posted="closePostForm"/> <PostStatusForm class="panel-body" @posted="closePostForm" @onScopeChange="onScopeChange" />
</div> </div>
</div> </div>
<button <button

View file

@ -338,6 +338,7 @@ const PostStatusForm = {
}, },
changeVis (visibility) { changeVis (visibility) {
this.newStatus.visibility = visibility this.newStatus.visibility = visibility
this.$emit('onScopeChange', visibility)
} }
} }
} }