Merge remote-tracking branch 'upstream/develop' into emoji-optimizations
* upstream/develop: (95 commits) Lightbox/modal multi image improvements - #381 '/api/pleroma/profile/mfa' -> '/api/pleroma/accounts/mfa' Add ability to change user's email translations-de-batch-1 eu-translate update profile-banner rounding css, fixes #690 fix indentation remove needless ref show preview popover when hover numbered replies refactor conditions do not make too many nested div add fetchStatus action refactor status loading logic split status preview popover into a separate component uninstall mobile-detect library listen both events minor css fix restrict distance at top side only set different trigger event in desktop and mobile by default fix eslint warnings ...
This commit is contained in:
commit
0dcb696e26
77 changed files with 1318 additions and 1127 deletions
|
@ -7,6 +7,8 @@ import fileTypeService from '../../services/file_type/file_type.service.js'
|
|||
import { findOffset } from '../../services/offset_finder/offset_finder.service.js'
|
||||
import { reject, map, uniqBy } from 'lodash'
|
||||
import suggestor from '../emoji_input/suggestor.js'
|
||||
import { mapGetters } from 'vuex'
|
||||
import Checkbox from '../checkbox/checkbox.vue'
|
||||
|
||||
const buildMentionsString = ({ user, attentions = [] }, currentUser) => {
|
||||
let allAttentions = [...attentions]
|
||||
|
@ -35,7 +37,8 @@ const PostStatusForm = {
|
|||
MediaUpload,
|
||||
EmojiInput,
|
||||
PollForm,
|
||||
ScopeSelector
|
||||
ScopeSelector,
|
||||
Checkbox
|
||||
},
|
||||
mounted () {
|
||||
this.resize(this.$refs.textarea)
|
||||
|
@ -50,9 +53,7 @@ const PostStatusForm = {
|
|||
const preset = this.$route.query.message
|
||||
let statusText = preset || ''
|
||||
|
||||
const scopeCopy = typeof this.$store.state.config.scopeCopy === 'undefined'
|
||||
? this.$store.state.instance.scopeCopy
|
||||
: this.$store.state.config.scopeCopy
|
||||
const { scopeCopy } = this.$store.getters.mergedConfig
|
||||
|
||||
if (this.replyTo) {
|
||||
const currentUser = this.$store.state.users.currentUser
|
||||
|
@ -63,9 +64,7 @@ const PostStatusForm = {
|
|||
? this.copyMessageScope
|
||||
: this.$store.state.users.currentUser.default_scope
|
||||
|
||||
const contentType = typeof this.$store.state.config.postContentType === 'undefined'
|
||||
? this.$store.state.instance.postContentType
|
||||
: this.$store.state.config.postContentType
|
||||
const { postContentType: contentType } = this.$store.getters.mergedConfig
|
||||
|
||||
return {
|
||||
dropFiles: [],
|
||||
|
@ -94,10 +93,7 @@ const PostStatusForm = {
|
|||
return this.$store.state.users.currentUser.default_scope
|
||||
},
|
||||
showAllScopes () {
|
||||
const minimalScopesMode = typeof this.$store.state.config.minimalScopesMode === 'undefined'
|
||||
? this.$store.state.instance.minimalScopesMode
|
||||
: this.$store.state.config.minimalScopesMode
|
||||
return !minimalScopesMode
|
||||
return !this.mergedConfig.minimalScopesMode
|
||||
},
|
||||
emojiUserSuggestor () {
|
||||
return suggestor({
|
||||
|
@ -145,13 +141,7 @@ const PostStatusForm = {
|
|||
return this.$store.state.instance.minimalScopesMode
|
||||
},
|
||||
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 true
|
||||
}
|
||||
return this.mergedConfig.alwaysShowSubjectInput
|
||||
},
|
||||
postFormats () {
|
||||
return this.$store.state.instance.postFormats || []
|
||||
|
@ -164,13 +154,14 @@ const PostStatusForm = {
|
|||
this.$store.state.instance.pollLimits.max_options >= 2
|
||||
},
|
||||
hideScopeNotice () {
|
||||
return this.$store.state.config.hideScopeNotice
|
||||
return this.$store.getters.mergedConfig.hideScopeNotice
|
||||
},
|
||||
pollContentError () {
|
||||
return this.pollFormVisible &&
|
||||
this.newStatus.poll &&
|
||||
this.newStatus.poll.error
|
||||
}
|
||||
},
|
||||
...mapGetters(['mergedConfig'])
|
||||
},
|
||||
methods: {
|
||||
postStatus (newStatus) {
|
||||
|
|
|
@ -264,12 +264,9 @@
|
|||
v-if="newStatus.files.length > 0"
|
||||
class="upload_settings"
|
||||
>
|
||||
<input
|
||||
id="filesSensitive"
|
||||
v-model="newStatus.nsfw"
|
||||
type="checkbox"
|
||||
>
|
||||
<label for="filesSensitive">{{ $t('post_status.attachments_sensitive') }}</label>
|
||||
<Checkbox v-model="newStatus.nsfw">
|
||||
{{ $t('post_status.attachments_sensitive') }}
|
||||
</Checkbox>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue