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

View file

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

View file

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