diff options
| author | eugenijm <eugenijm@protonmail.com> | 2019-04-22 18:25:21 +0300 |
|---|---|---|
| committer | eugenijm <eugenijm@protonmail.com> | 2019-05-06 18:10:58 +0300 |
| commit | befaa477a39234b9455faebfe54e90569013ebd0 (patch) | |
| tree | 71f422397425e5589c2d2cc837ffc38bc35e6bd4 /src | |
| parent | 4819009d21692a1f14fee1e1dfd9b690bb952a6a (diff) | |
Display additional scope description above the status form for mobile users.
Diffstat (limited to 'src')
3 files changed, 8 insertions, 3 deletions
diff --git a/src/components/mobile_post_status_modal/mobile_post_status_modal.js b/src/components/mobile_post_status_modal/mobile_post_status_modal.js index 2f24dd08..eb665b8d 100644 --- a/src/components/mobile_post_status_modal/mobile_post_status_modal.js +++ b/src/components/mobile_post_status_modal/mobile_post_status_modal.js @@ -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 diff --git a/src/components/mobile_post_status_modal/mobile_post_status_modal.vue b/src/components/mobile_post_status_modal/mobile_post_status_modal.vue index 0a451c28..ca431c5f 100644 --- a/src/components/mobile_post_status_modal/mobile_post_status_modal.vue +++ b/src/components/mobile_post_status_modal/mobile_post_status_modal.vue @@ -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 diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index c65c27e2..d956ebe6 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -338,6 +338,7 @@ const PostStatusForm = { }, changeVis (visibility) { this.newStatus.visibility = visibility + this.$emit('onScopeChange', visibility) } } } |
