From c0a8fb2b59665bd1c3d0ce6b94d451f779fab4b6 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 27 Feb 2022 07:37:00 +0100 Subject: [Glitch] Fix report submit button not being disabled during submission in web UI Port 0883f057531d291e8793bd3113f4331c502ad8cf to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/features/report/comment.js | 2 +- app/javascript/flavours/glitch/features/report/statuses.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'app/javascript/flavours/glitch/features/report') diff --git a/app/javascript/flavours/glitch/features/report/comment.js b/app/javascript/flavours/glitch/features/report/comment.js index b2663bbf2..ec261afcb 100644 --- a/app/javascript/flavours/glitch/features/report/comment.js +++ b/app/javascript/flavours/glitch/features/report/comment.js @@ -74,7 +74,7 @@ class Comment extends React.PureComponent {
- +
); diff --git a/app/javascript/flavours/glitch/features/report/statuses.js b/app/javascript/flavours/glitch/features/report/statuses.js index 69cfbb3e5..47d5ee863 100644 --- a/app/javascript/flavours/glitch/features/report/statuses.js +++ b/app/javascript/flavours/glitch/features/report/statuses.js @@ -6,9 +6,11 @@ import StatusCheckBox from 'flavours/glitch/features/report/containers/status_ch import { OrderedSet } from 'immutable'; import { FormattedMessage } from 'react-intl'; import Button from 'flavours/glitch/components/button'; +import LoadingIndicator from 'flavours/glitch/components/loading_indicator'; const mapStateToProps = (state, { accountId }) => ({ availableStatusIds: OrderedSet(state.getIn(['timelines', `account:${accountId}:with_replies`, 'items'])), + isLoading: state.getIn(['timelines', `account:${accountId}:with_replies`, 'isLoading']), }); export default @connect(mapStateToProps) @@ -19,6 +21,7 @@ class Statuses extends React.PureComponent { accountId: PropTypes.string.isRequired, availableStatusIds: ImmutablePropTypes.set.isRequired, selectedStatusIds: ImmutablePropTypes.set.isRequired, + isLoading: PropTypes.bool, onToggle: PropTypes.func.isRequired, }; @@ -28,7 +31,7 @@ class Statuses extends React.PureComponent { }; render () { - const { availableStatusIds, selectedStatusIds, onToggle } = this.props; + const { availableStatusIds, selectedStatusIds, onToggle, isLoading } = this.props; return ( @@ -36,7 +39,7 @@ class Statuses extends React.PureComponent {

- {availableStatusIds.union(selectedStatusIds).map(statusId => ( + {isLoading ? : availableStatusIds.union(selectedStatusIds).map(statusId => ( Date: Sun, 6 Mar 2022 16:51:40 -0500 Subject: [Glitch] Spelling Port front-end changes from b5329e0035d455e72dad7249d88bd624b5cb59a0 to glitch-soc Co-authored-by: Josh Soref Signed-off-by: Claire --- app/javascript/flavours/glitch/components/scrollable_list.js | 2 +- app/javascript/flavours/glitch/containers/media_container.js | 4 ++-- app/javascript/flavours/glitch/features/report/category.js | 2 +- app/javascript/flavours/glitch/features/video/index.js | 4 ++-- app/javascript/flavours/glitch/styles/polls.scss | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'app/javascript/flavours/glitch/features/report') diff --git a/app/javascript/flavours/glitch/components/scrollable_list.js b/app/javascript/flavours/glitch/components/scrollable_list.js index 16f13afa4..50bfacc6a 100644 --- a/app/javascript/flavours/glitch/components/scrollable_list.js +++ b/app/javascript/flavours/glitch/components/scrollable_list.js @@ -144,7 +144,7 @@ class ScrollableList extends PureComponent { this.attachIntersectionObserver(); attachFullscreenListener(this.onFullScreenChange); - // Handle initial scroll posiiton + // Handle initial scroll position this.handleScroll(); } diff --git a/app/javascript/flavours/glitch/containers/media_container.js b/app/javascript/flavours/glitch/containers/media_container.js index 1ddbc706b..11c15d7c6 100644 --- a/app/javascript/flavours/glitch/containers/media_container.js +++ b/app/javascript/flavours/glitch/containers/media_container.js @@ -43,7 +43,7 @@ export default class MediaContainer extends PureComponent { handleOpenVideo = (options) => { const { components } = this.props; - const { media } = JSON.parse(components[options.componetIndex].getAttribute('data-props')); + const { media } = JSON.parse(components[options.componentIndex].getAttribute('data-props')); const mediaList = fromJS(media); document.body.classList.add('with-modals--active'); @@ -87,7 +87,7 @@ export default class MediaContainer extends PureComponent { ...(hashtag ? { hashtag: fromJS(hashtag) } : {}), ...(componentName === 'Video' ? { - componetIndex: i, + componentIndex: i, onOpenVideo: this.handleOpenVideo, } : { onOpenMedia: this.handleOpenMedia, diff --git a/app/javascript/flavours/glitch/features/report/category.js b/app/javascript/flavours/glitch/features/report/category.js index ddbc82563..cf63533d0 100644 --- a/app/javascript/flavours/glitch/features/report/category.js +++ b/app/javascript/flavours/glitch/features/report/category.js @@ -8,7 +8,7 @@ const messages = defineMessages({ dislike: { id: 'report.reasons.dislike', defaultMessage: 'I don\'t like it' }, dislike_description: { id: 'report.reasons.dislike_description', defaultMessage: 'It is not something you want to see' }, spam: { id: 'report.reasons.spam', defaultMessage: 'It\'s spam' }, - spam_description: { id: 'report.reasons.spam_description', defaultMessage: 'Malicious links, fake engagement, or repetetive replies' }, + spam_description: { id: 'report.reasons.spam_description', defaultMessage: 'Malicious links, fake engagement, or repetitive replies' }, violation: { id: 'report.reasons.violation', defaultMessage: 'It violates server rules' }, violation_description: { id: 'report.reasons.violation_description', defaultMessage: 'You are aware that it breaks specific rules' }, other: { id: 'report.reasons.other', defaultMessage: 'It\'s something else' }, diff --git a/app/javascript/flavours/glitch/features/video/index.js b/app/javascript/flavours/glitch/features/video/index.js index fcbf07ce2..53e3dfda3 100644 --- a/app/javascript/flavours/glitch/features/video/index.js +++ b/app/javascript/flavours/glitch/features/video/index.js @@ -123,7 +123,7 @@ class Video extends React.PureComponent { autoPlay: PropTypes.bool, volume: PropTypes.number, muted: PropTypes.bool, - componetIndex: PropTypes.number, + componentIndex: PropTypes.number, }; static defaultProps = { @@ -516,7 +516,7 @@ class Video extends React.PureComponent { startTime: this.video.currentTime, autoPlay: !this.state.paused, defaultVolume: this.state.volume, - componetIndex: this.props.componetIndex, + componentIndex: this.props.componentIndex, }); } diff --git a/app/javascript/flavours/glitch/styles/polls.scss b/app/javascript/flavours/glitch/styles/polls.scss index a2cdecf06..0847c8f4c 100644 --- a/app/javascript/flavours/glitch/styles/polls.scss +++ b/app/javascript/flavours/glitch/styles/polls.scss @@ -75,7 +75,7 @@ display: none; } - .autossugest-input { + .autosuggest-input { flex: 1 1 auto; } -- cgit