aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/post_status_form/post_status_form.js9
-rw-r--r--src/components/post_status_form/post_status_form.vue2
-rw-r--r--src/components/settings/settings.js7
-rw-r--r--src/components/settings/settings.vue6
4 files changed, 23 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"
diff --git a/src/components/settings/settings.js b/src/components/settings/settings.js
index 910eea63..91a2014a 100644
--- a/src/components/settings/settings.js
+++ b/src/components/settings/settings.js
@@ -38,6 +38,10 @@ const settings = {
? instance.subjectLineBehavior
: user.subjectLineBehavior,
subjectLineBehaviorDefault: instance.subjectLineBehavior,
+ alwaysShowSubjectInputLocal: typeof user.alwaysShowSubjectInput === 'undefined'
+ ? instance.alwaysShowSubjectInput
+ : user.alwaysShowSubjectInput,
+ alwaysShowSubjectInputDefault: instance.alwaysShowSubjectInput,
scopeCopyLocal: user.scopeCopy,
scopeCopyDefault: this.$t('settings.values.' + instance.scopeCopy),
stopGifs: user.stopGifs,
@@ -122,6 +126,9 @@ const settings = {
scopeCopyLocal (value) {
this.$store.dispatch('setOption', { name: 'scopeCopy', value })
},
+ alwaysShowSubjectInputLocal (value) {
+ this.$store.dispatch('setOption', { name: 'alwaysShowSubjectInput', value })
+ },
subjectLineBehaviorLocal (value) {
this.$store.dispatch('setOption', { name: 'subjectLineBehavior', value })
},
diff --git a/src/components/settings/settings.vue b/src/components/settings/settings.vue
index 4a236d23..de506e4d 100644
--- a/src/components/settings/settings.vue
+++ b/src/components/settings/settings.vue
@@ -64,6 +64,12 @@
</label>
</li>
<li>
+ <input type="checkbox" id="subjectHide" v-model="alwaysShowSubjectInputLocal">
+ <label for="subjectHide">
+ {{$t('settings.subject_input_always_show')}} {{$t('settings.instance_default', { value: alwaysShowSubjectInputDefault })}}
+ </label>
+ </li>
+ <li>
<div>
{{$t('settings.subject_line_behavior')}}
<label for="subjectLineBehavior" class="select">