Compare commits

...

12 Commits

Author SHA1 Message Date
Soulfire Jarexi Backblaze 2713ca0c3e Merge branch 'develop' into s0ulf3re/contentWarningRework 2023-03-26 23:54:17 +00:00
Soulfire Jarexi Backblaze cd5a09935e
Removed "Always show Content Warning" option 2023-03-22 08:14:54 -04:00
FloatingGhost 85abc62213 Merge branch 'develop' into stable 2023-03-11 17:27:22 +00:00
FloatingGhost 8569b5946e Merge branch 'develop' into stable 2023-02-11 10:50:04 +00:00
FloatingGhost 9c9b4cc07c Merge branch 'develop' into stable 2022-12-10 14:52:00 +00:00
floatingghost 2c9b73646c Merge pull request 'hotfix: mfm mysteries' (#215) from develop into stable
Reviewed-on: AkkomaGang/pleroma-fe#215
2022-11-15 16:01:07 +00:00
floatingghost 80a519d7e4 Merge pull request 'hotfix: translation' (#207) from develop into stable
Reviewed-on: AkkomaGang/pleroma-fe#207
2022-11-12 19:08:20 +00:00
floatingghost 975f04bf5a Merge pull request '2022.11 stable release' (#202) from develop into stable
Reviewed-on: AkkomaGang/pleroma-fe#202
2022-11-12 15:33:57 +00:00
floatingghost c8c8d40827 Merge pull request '2022.10 stable' (#177) from develop into stable
Reviewed-on: AkkomaGang/pleroma-fe#177
2022-10-08 11:13:01 +00:00
floatingghost d7499a1f91 Merge pull request '2022.09 stable' (#160) from develop into stable
Reviewed-on: AkkomaGang/pleroma-fe#160
2022-09-10 14:39:13 +00:00
floatingghost 5972d89117 Merge pull request 'stable release' (#130) from develop into stable
Reviewed-on: AkkomaGang/pleroma-fe#130
2022-08-12 15:26:51 +00:00
floatingghost d03872d598 Merge pull request 'port MFM link into stable docs' (#38) from develop into stable
Reviewed-on: AkkomaGang/pleroma-fe#38
2022-07-15 13:02:06 +00:00
4 changed files with 42 additions and 10 deletions

View File

@ -203,6 +203,9 @@ const EmojiInput = {
const pickerInput = pickerEl.querySelector('input')
if (pickerInput) pickerInput.focus()
},
triggerShowContentWarning () {
this.triggerShowContentWarning()
},
triggerShowPicker () {
this.showPicker = true
this.$nextTick(() => {

View File

@ -100,6 +100,7 @@ const PostStatusForm = {
'isRedraft'
],
emits: [
'contentWarningFieldVisible',
'posted',
'resize',
'mediaplay',
@ -198,6 +199,7 @@ const PostStatusForm = {
}
return {
showingContentWarning: false,
dropFiles: [],
uploadingFiles: false,
error: null,
@ -244,6 +246,9 @@ const PostStatusForm = {
customEmoji () {
return this.$store.state.instance.customEmoji || []
},
contentWarningFieldVisible () {
return this.$store.state.instance.showingContentWarning
},
statusLength () {
return this.newStatus.status.length
},
@ -345,6 +350,12 @@ const PostStatusForm = {
if (this.preview) this.previewStatus()
},
async postStatus (event, newStatus, opts = {}) {
// If the Content warning Field is not visible, then do not post a content warning
if (this.showingContentWarning === false) {
this.newStatus.spoilerText = ''
}
if (this.posting && !this.optimisticPosting) { return }
if (this.disableSubmit) { return }
if (this.emojiInputShown) { return }
@ -675,7 +686,15 @@ const PostStatusForm = {
this.$refs['textarea'].focus()
this.$refs['emoji-input'].triggerShowPicker()
},
clearError () {
showContentWarningField() {
if (this.showingContentWarning === true) {
console.log(this.showingContentWarning)
this.$refs['contentWarningField'].focus()
}
console.log('button clicked')
this.showingContentWarning = !this.showingContentWarning
},
clearError () {
this.error = null
},
changeVis (visibility) {

View File

@ -117,14 +117,19 @@
class="preview-status"
/>
</div>
<!-- Content warning -->
<EmojiInput
v-if="!disableSubject && (newStatus.spoilerText || alwaysShowSubject)"
ref="contentWarning"
v-if="showingContentWarning && (newStatus.spoilerText || alwaysShowSubject)"
v-model="newStatus.spoilerText"
enable-emoji-picker
:suggest="emojiSuggestor"
class="form-control"
>
<input
ref="contentWarningField"
v-if="showingContentWarning"
v-model="newStatus.spoilerText"
type="text"
:placeholder="$t('post_status.content_warning')"
@ -133,6 +138,8 @@
class="form-post-subject"
@input="onSubjectInput"
>
<!-- Post Field -->
</EmojiInput>
<i18n-t
v-if="newStatus.files.length !== 0 && newStatus.nsfw === false && newStatus.spoilerText !== ''"
@ -186,6 +193,8 @@
v-if="!disableScopeSelector"
class="visibility-tray"
>
<!-- Scope selector - Allows determining the privacy level of a post -->
<scope-selector
v-if="!disableVisibilitySelector"
:user-default="userDefaultScope"
@ -260,6 +269,14 @@
@upload-failed="uploadFailed"
@all-uploaded="finishedUploadingFiles"
/>
<!-- Content Warning Button -->
<button
class="emoji-icon button-unstyled"
:title="$t('Add content warning')"
@click="showContentWarningField"
>
<FAIcon icon="eye" />
</button>
<button
class="emoji-icon button-unstyled"
:title="$t('emoji.add_emoji')"

View File

@ -562,14 +562,7 @@
{{ $t('settings.sensitive_if_subject') }}
</BooleanSetting>
</li>
<li>
<BooleanSetting
path="alwaysShowSubjectInput"
expert="1"
>
{{ $t('settings.subject_input_always_show') }}
</BooleanSetting>
</li>
<li>
<ChoiceSetting
id="subjectLineBehavior"