aboutsummaryrefslogtreecommitdiff
path: root/src/components/post_status_form
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2018-12-03 06:47:35 +0300
committerHenry Jameson <me@hjkos.com>2018-12-03 06:47:35 +0300
commitb34097a5c154cb913048a16848d0ab0d48dfe626 (patch)
tree00ad59cdce2ce43feb077920997edeeed2c1ae5f /src/components/post_status_form
parente15b9bddbb23e36632982296a7c9ec01fd2bb7c7 (diff)
Added option to auto-hide subject field when it's empty.
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"