mirror of https://github.com/mastodon/mastodon
update frontend check
This commit is contained in:
parent
1ac87efec4
commit
ddc579de6e
|
@ -4,7 +4,7 @@ import { uploadCompose } from '../../../actions/compose';
|
||||||
import UploadButton from '../components/upload_button';
|
import UploadButton from '../components/upload_button';
|
||||||
|
|
||||||
const mapStateToProps = state => ({
|
const mapStateToProps = state => ({
|
||||||
disabled: state.getIn(['compose', 'poll']) !== null || state.getIn(['compose', 'is_uploading']) || (state.getIn(['compose', 'media_attachments']).size + state.getIn(['compose', 'pending_media_attachments']) > 3 || state.getIn(['compose', 'media_attachments']).some(m => ['video', 'audio'].includes(m.get('type')))),
|
disabled: state.getIn(['compose', 'poll']) !== null || state.getIn(['compose', 'is_uploading']) || (state.getIn(['compose', 'media_attachments']).size + state.getIn(['compose', 'pending_media_attachments']) > 3 || (!state.getIn(['server', 'server', 'configuration', 'media_attachments', 'allow_mix_media'], false) && state.getIn(['compose', 'media_attachments']).some(m => ['video', 'audio'].includes(m.get('type'))))),
|
||||||
resetFileKey: state.getIn(['compose', 'resetFileKey']),
|
resetFileKey: state.getIn(['compose', 'resetFileKey']),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer
|
||||||
video_size_limit: MediaAttachment::VIDEO_LIMIT,
|
video_size_limit: MediaAttachment::VIDEO_LIMIT,
|
||||||
video_frame_rate_limit: MediaAttachment::MAX_VIDEO_FRAME_RATE,
|
video_frame_rate_limit: MediaAttachment::MAX_VIDEO_FRAME_RATE,
|
||||||
video_matrix_limit: MediaAttachment::MAX_VIDEO_MATRIX_LIMIT,
|
video_matrix_limit: MediaAttachment::MAX_VIDEO_MATRIX_LIMIT,
|
||||||
|
allow_mix_media: MediaAttachment::ALLOW_MIX_MEDIA,
|
||||||
},
|
},
|
||||||
|
|
||||||
polls: {
|
polls: {
|
||||||
|
|
|
@ -75,6 +75,7 @@ class REST::V1::InstanceSerializer < ActiveModel::Serializer
|
||||||
video_size_limit: MediaAttachment::VIDEO_LIMIT,
|
video_size_limit: MediaAttachment::VIDEO_LIMIT,
|
||||||
video_frame_rate_limit: MediaAttachment::MAX_VIDEO_FRAME_RATE,
|
video_frame_rate_limit: MediaAttachment::MAX_VIDEO_FRAME_RATE,
|
||||||
video_matrix_limit: MediaAttachment::MAX_VIDEO_MATRIX_LIMIT,
|
video_matrix_limit: MediaAttachment::MAX_VIDEO_MATRIX_LIMIT,
|
||||||
|
allow_mix_media: MediaAttachment::ALLOW_MIX_MEDIA,
|
||||||
},
|
},
|
||||||
|
|
||||||
polls: {
|
polls: {
|
||||||
|
|
Loading…
Reference in New Issue