update frontend check

This commit is contained in:
iLeoDo 2024-02-04 17:15:48 +00:00
parent 1ac87efec4
commit ddc579de6e
3 changed files with 3 additions and 1 deletions

View File

@ -4,7 +4,7 @@ import { uploadCompose } from '../../../actions/compose';
import UploadButton from '../components/upload_button';
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']),
});

View File

@ -69,6 +69,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer
video_size_limit: MediaAttachment::VIDEO_LIMIT,
video_frame_rate_limit: MediaAttachment::MAX_VIDEO_FRAME_RATE,
video_matrix_limit: MediaAttachment::MAX_VIDEO_MATRIX_LIMIT,
allow_mix_media: MediaAttachment::ALLOW_MIX_MEDIA,
},
polls: {

View File

@ -75,6 +75,7 @@ class REST::V1::InstanceSerializer < ActiveModel::Serializer
video_size_limit: MediaAttachment::VIDEO_LIMIT,
video_frame_rate_limit: MediaAttachment::MAX_VIDEO_FRAME_RATE,
video_matrix_limit: MediaAttachment::MAX_VIDEO_MATRIX_LIMIT,
allow_mix_media: MediaAttachment::ALLOW_MIX_MEDIA,
},
polls: {