aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoreugenijm <eugenijm@protonmail.com>2019-04-22 18:25:21 +0300
committereugenijm <eugenijm@protonmail.com>2019-05-06 18:10:58 +0300
commitbefaa477a39234b9455faebfe54e90569013ebd0 (patch)
tree71f422397425e5589c2d2cc837ffc38bc35e6bd4 /src
parent4819009d21692a1f14fee1e1dfd9b690bb952a6a (diff)
Display additional scope description above the status form for mobile users.
Diffstat (limited to 'src')
-rw-r--r--src/components/mobile_post_status_modal/mobile_post_status_modal.js6
-rw-r--r--src/components/mobile_post_status_modal/mobile_post_status_modal.vue4
-rw-r--r--src/components/post_status_form/post_status_form.js1
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)
}
}
}