aboutsummaryrefslogtreecommitdiff
path: root/src/components/post_status_form
diff options
context:
space:
mode:
authorlambda <pleromagit@rogerbraun.net>2018-12-03 14:55:43 +0000
committerlambda <pleromagit@rogerbraun.net>2018-12-03 14:55:43 +0000
commit9e78eddf2ad846ee69bfef690cfe3765d1b55dcb (patch)
treef5e674945a381ace77313557d1c2789ea1af5ce4 /src/components/post_status_form
parentea28aa62f00663ab8a0e0bf64551ac15256a3242 (diff)
parentb34097a5c154cb913048a16848d0ab0d48dfe626 (diff)
Merge branch 'subject-line-entry-auto' into 'develop'
Added option to auto-hide subject field when it's empty. Closes #174 See merge request pleroma/pleroma-fe!388
Diffstat (limited to 'src/components/post_status_form')
-rw-r--r--src/components/post_status_form/post_status_form.js9
-rw-r--r--src/components/post_status_form/post_status_form.vue2
2 files changed, 10 insertions, 1 deletions
diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js
index fa86ee59..789243cf 100644
--- a/src/components/post_status_form/post_status_form.js
+++ b/src/components/post_status_form/post_status_form.js
@@ -150,6 +150,15 @@ const PostStatusForm = {
scopeOptionsEnabled () {
return this.$store.state.instance.scopeOptionsEnabled
},
+ alwaysShowSubject () {
+ if (typeof this.$store.state.config.alwaysShowSubjectInput !== 'undefined') {
+ return this.$store.state.config.alwaysShowSubjectInput
+ } else if (typeof this.$store.state.instance.alwaysShowSubjectInput !== 'undefined') {
+ return this.$store.state.instance.alwaysShowSubjectInput
+ } else {
+ return this.$store.state.instance.scopeOptionsEnabled
+ }
+ },
formattingOptionsEnabled () {
return this.$store.state.instance.formattingOptionsEnabled
}
diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue
index 42e9c65c..e4c46b9a 100644
--- a/src/components/post_status_form/post_status_form.vue
+++ b/src/components/post_status_form/post_status_form.vue
@@ -11,7 +11,7 @@
</i18n>
<p v-if="this.newStatus.visibility == 'direct'" class="visibility-notice">{{ $t('post_status.direct_warning') }}</p>
<input
- v-if="scopeOptionsEnabled"
+ v-if="newStatus.spoilerText || alwaysShowSubject"
type="text"
:placeholder="$t('post_status.content_warning')"
v-model="newStatus.spoilerText"