diff options
Diffstat (limited to 'app/javascript/flavours/glitch/features')
3 files changed, 8 insertions, 3 deletions
diff --git a/app/javascript/flavours/glitch/features/account_gallery/index.js b/app/javascript/flavours/glitch/features/account_gallery/index.js index 3f61af0e8..a5fa01444 100644 --- a/app/javascript/flavours/glitch/features/account_gallery/index.js +++ b/app/javascript/flavours/glitch/features/account_gallery/index.js @@ -107,7 +107,7 @@ export default class AccountGallery extends ImmutablePureComponent { ); } - if (hasMore) { + if (hasMore && !(isLoading && medias.size === 0)) { loadOlder = <LoadMore visible={!isLoading} onClick={this.handleLoadOlder} />; } diff --git a/app/javascript/flavours/glitch/features/composer/index.js b/app/javascript/flavours/glitch/features/composer/index.js index 40eae1f53..a8f5a5c3c 100644 --- a/app/javascript/flavours/glitch/features/composer/index.js +++ b/app/javascript/flavours/glitch/features/composer/index.js @@ -81,6 +81,7 @@ function mapStateToProps (state) { focusDate: state.getIn(['compose', 'focusDate']), caretPosition: state.getIn(['compose', 'caretPosition']), isSubmitting: state.getIn(['compose', 'is_submitting']), + isChangingUpload: state.getIn(['compose', 'is_changing_upload']), isUploading: state.getIn(['compose', 'is_uploading']), layout: state.getIn(['local_settings', 'layout']), media: state.getIn(['compose', 'media_attachments']), @@ -228,6 +229,7 @@ const handlers = { onChangeText, onSubmit, isSubmitting, + isChangingUpload, isUploading, media, anyMedia, @@ -243,7 +245,7 @@ const handlers = { } // Submit disabled: - if (isSubmitting || isUploading || (!text.trim().length && !anyMedia)) { + if (isSubmitting || isUploading || isChangingUpload || (!text.trim().length && !anyMedia)) { return; } @@ -386,6 +388,7 @@ class Composer extends React.Component { anyMedia, intl, isSubmitting, + isChangingUpload, isUploading, layout, media, @@ -418,7 +421,7 @@ class Composer extends React.Component { spoilersAlwaysOn, } = this.props; - let disabledButton = isSubmitting || isUploading || (!text.trim().length && !anyMedia); + let disabledButton = isSubmitting || isUploading || isChangingUpload || (!text.trim().length && !anyMedia); return ( <div className='composer'> @@ -518,6 +521,7 @@ Composer.propTypes = { focusDate: PropTypes.instanceOf(Date), caretPosition: PropTypes.number, isSubmitting: PropTypes.bool, + isChangingUpload: PropTypes.bool, isUploading: PropTypes.bool, layout: PropTypes.string, media: ImmutablePropTypes.list, diff --git a/app/javascript/flavours/glitch/features/ui/components/embed_modal.js b/app/javascript/flavours/glitch/features/ui/components/embed_modal.js index f3553f4a9..bf29b0da5 100644 --- a/app/javascript/flavours/glitch/features/ui/components/embed_modal.js +++ b/app/javascript/flavours/glitch/features/ui/components/embed_modal.js @@ -74,6 +74,7 @@ export default class EmbedModal extends ImmutablePureComponent { className='embed-modal__iframe' frameBorder='0' ref={this.setIframeRef} + sandbox='allow-same-origin' title='preview' /> </div> |