[Glitch] Autofix missing comma and indentation in JS files
Port 774e1189d2 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
			
			
This commit is contained in:
		
							parent
							
								
									4a9cdfb928
								
							
						
					
					
						commit
						7b325aa81b
					
				| 
						 | 
					@ -96,7 +96,7 @@ export function normalizeStatus(status, normalOldStatus, settings) {
 | 
				
			||||||
      normalStatus.media_attachments.forEach(item => {
 | 
					      normalStatus.media_attachments.forEach(item => {
 | 
				
			||||||
        const oldItem = list.find(i => i.get('id') === item.id);
 | 
					        const oldItem = list.find(i => i.get('id') === item.id);
 | 
				
			||||||
        if (oldItem && oldItem.get('description') === item.description) {
 | 
					        if (oldItem && oldItem.get('description') === item.description) {
 | 
				
			||||||
          item.translation = oldItem.get('translation')
 | 
					          item.translation = oldItem.get('translation');
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					@ -129,13 +129,13 @@ export function normalizePoll(poll, normalOldPoll) {
 | 
				
			||||||
      ...option,
 | 
					      ...option,
 | 
				
			||||||
      voted: poll.own_votes && poll.own_votes.includes(index),
 | 
					      voted: poll.own_votes && poll.own_votes.includes(index),
 | 
				
			||||||
      titleHtml: emojify(escapeTextContentForBrowser(option.title), emojiMap),
 | 
					      titleHtml: emojify(escapeTextContentForBrowser(option.title), emojiMap),
 | 
				
			||||||
    }
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (normalOldPoll && normalOldPoll.getIn(['options', index, 'title']) === option.title) {
 | 
					    if (normalOldPoll && normalOldPoll.getIn(['options', index, 'title']) === option.title) {
 | 
				
			||||||
      normalOption.translation = normalOldPoll.getIn(['options', index, 'translation']);
 | 
					      normalOption.translation = normalOldPoll.getIn(['options', index, 'translation']);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return normalOption
 | 
					    return normalOption;
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return normalPoll;
 | 
					  return normalPoll;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,7 +30,7 @@ export default class Column extends PureComponent {
 | 
				
			||||||
      if (scrollable.classList.contains('scrollable--flex')) {
 | 
					      if (scrollable.classList.contains('scrollable--flex')) {
 | 
				
			||||||
        scrollable = scrollable?.querySelector('.scrollable') || scrollable;
 | 
					        scrollable = scrollable?.querySelector('.scrollable') || scrollable;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
   }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!scrollable) {
 | 
					    if (!scrollable) {
 | 
				
			||||||
      return;
 | 
					      return;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -133,7 +133,7 @@ class Poll extends ImmutablePureComponent {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  handleReveal = () => {
 | 
					  handleReveal = () => {
 | 
				
			||||||
    this.setState({ revealed: true });
 | 
					    this.setState({ revealed: true });
 | 
				
			||||||
  }
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  renderOption (option, optionIndex, showResults) {
 | 
					  renderOption (option, optionIndex, showResults) {
 | 
				
			||||||
    const { poll, lang, disabled, intl } = this.props;
 | 
					    const { poll, lang, disabled, intl } = this.props;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -59,14 +59,14 @@ class Search extends PureComponent {
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  defaultOptions = [
 | 
					  defaultOptions = [
 | 
				
			||||||
    { label: <><mark>has:</mark> <FormattedList type='disjunction' value={['media', 'poll', 'embed']} /></>, action: e => { e.preventDefault(); this._insertText('has:') } },
 | 
					    { label: <><mark>has:</mark> <FormattedList type='disjunction' value={['media', 'poll', 'embed']} /></>, action: e => { e.preventDefault(); this._insertText('has:'); } },
 | 
				
			||||||
    { label: <><mark>is:</mark> <FormattedList type='disjunction' value={['reply', 'sensitive']} /></>, action: e => { e.preventDefault(); this._insertText('is:') } },
 | 
					    { label: <><mark>is:</mark> <FormattedList type='disjunction' value={['reply', 'sensitive']} /></>, action: e => { e.preventDefault(); this._insertText('is:'); } },
 | 
				
			||||||
    { label: <><mark>language:</mark> <FormattedMessage id='search_popout.language_code' defaultMessage='ISO language code' /></>, action: e => { e.preventDefault(); this._insertText('language:') } },
 | 
					    { label: <><mark>language:</mark> <FormattedMessage id='search_popout.language_code' defaultMessage='ISO language code' /></>, action: e => { e.preventDefault(); this._insertText('language:'); } },
 | 
				
			||||||
    { label: <><mark>from:</mark> <FormattedMessage id='search_popout.user' defaultMessage='user' /></>, action: e => { e.preventDefault(); this._insertText('from:') } },
 | 
					    { label: <><mark>from:</mark> <FormattedMessage id='search_popout.user' defaultMessage='user' /></>, action: e => { e.preventDefault(); this._insertText('from:'); } },
 | 
				
			||||||
    { label: <><mark>before:</mark> <FormattedMessage id='search_popout.specific_date' defaultMessage='specific date' /></>, action: e => { e.preventDefault(); this._insertText('before:') } },
 | 
					    { label: <><mark>before:</mark> <FormattedMessage id='search_popout.specific_date' defaultMessage='specific date' /></>, action: e => { e.preventDefault(); this._insertText('before:'); } },
 | 
				
			||||||
    { label: <><mark>during:</mark> <FormattedMessage id='search_popout.specific_date' defaultMessage='specific date' /></>, action: e => { e.preventDefault(); this._insertText('during:') } },
 | 
					    { label: <><mark>during:</mark> <FormattedMessage id='search_popout.specific_date' defaultMessage='specific date' /></>, action: e => { e.preventDefault(); this._insertText('during:'); } },
 | 
				
			||||||
    { label: <><mark>after:</mark> <FormattedMessage id='search_popout.specific_date' defaultMessage='specific date' /></>, action: e => { e.preventDefault(); this._insertText('after:') } },
 | 
					    { label: <><mark>after:</mark> <FormattedMessage id='search_popout.specific_date' defaultMessage='specific date' /></>, action: e => { e.preventDefault(); this._insertText('after:'); } },
 | 
				
			||||||
    { label: <><mark>in:</mark> <FormattedList type='disjunction' value={['all', 'library']} /></>, action: e => { e.preventDefault(); this._insertText('in:') } }
 | 
					    { label: <><mark>in:</mark> <FormattedList type='disjunction' value={['all', 'library']} /></>, action: e => { e.preventDefault(); this._insertText('in:'); } }
 | 
				
			||||||
  ];
 | 
					  ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  setRef = c => {
 | 
					  setRef = c => {
 | 
				
			||||||
| 
						 | 
					@ -92,7 +92,7 @@ class Search extends PureComponent {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (value.length > 0 || submitted) {
 | 
					    if (value.length > 0 || submitted) {
 | 
				
			||||||
      onClear();
 | 
					      onClear();
 | 
				
			||||||
      this.setState({ options: [], selectedOption: -1 })
 | 
					      this.setState({ options: [], selectedOption: -1 });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -80,7 +80,7 @@ class Results extends PureComponent {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return null;
 | 
					    return null;
 | 
				
			||||||
  };
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  handleSelectAll = () => {
 | 
					  handleSelectAll = () => {
 | 
				
			||||||
    const { submittedType, dispatch } = this.props;
 | 
					    const { submittedType, dispatch } = this.props;
 | 
				
			||||||
| 
						 | 
					@ -116,7 +116,7 @@ class Results extends PureComponent {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    this.setState({ type: 'hashtags' });
 | 
					    this.setState({ type: 'hashtags' });
 | 
				
			||||||
  }
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  handleSelectStatuses = () => {
 | 
					  handleSelectStatuses = () => {
 | 
				
			||||||
    const { submittedType, dispatch } = this.props;
 | 
					    const { submittedType, dispatch } = this.props;
 | 
				
			||||||
| 
						 | 
					@ -128,7 +128,7 @@ class Results extends PureComponent {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    this.setState({ type: 'statuses' });
 | 
					    this.setState({ type: 'statuses' });
 | 
				
			||||||
  }
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  handleLoadMoreAccounts = () => this._loadMore('accounts');
 | 
					  handleLoadMoreAccounts = () => this._loadMore('accounts');
 | 
				
			||||||
  handleLoadMoreStatuses = () => this._loadMore('statuses');
 | 
					  handleLoadMoreStatuses = () => this._loadMore('statuses');
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -221,7 +221,7 @@ const Firehose = ({ feedType, multiColumn }) => {
 | 
				
			||||||
      </Helmet>
 | 
					      </Helmet>
 | 
				
			||||||
    </Column>
 | 
					    </Column>
 | 
				
			||||||
  );
 | 
					  );
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Firehose.propTypes = {
 | 
					Firehose.propTypes = {
 | 
				
			||||||
  multiColumn: PropTypes.bool,
 | 
					  multiColumn: PropTypes.bool,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -27,9 +27,9 @@ const mapStateToProps = (state, { accountId }) => ({
 | 
				
			||||||
const mapDispatchToProps = (dispatch) => ({
 | 
					const mapDispatchToProps = (dispatch) => ({
 | 
				
			||||||
  onSignupClick() {
 | 
					  onSignupClick() {
 | 
				
			||||||
    dispatch(closeModal({
 | 
					    dispatch(closeModal({
 | 
				
			||||||
        modalType: undefined,
 | 
					      modalType: undefined,
 | 
				
			||||||
        ignoreFocus: false,
 | 
					      ignoreFocus: false,
 | 
				
			||||||
      }));
 | 
					    }));
 | 
				
			||||||
    dispatch(openModal({ modalType: 'CLOSED_REGISTRATIONS' }));
 | 
					    dispatch(openModal({ modalType: 'CLOSED_REGISTRATIONS' }));
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
| 
						 | 
					@ -187,7 +187,7 @@ class LoginForm extends React.PureComponent {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  setIFrameRef = (iframe) => {
 | 
					  setIFrameRef = (iframe) => {
 | 
				
			||||||
    this.iframeRef = iframe;
 | 
					    this.iframeRef = iframe;
 | 
				
			||||||
  }
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  handleFocus = () => {
 | 
					  handleFocus = () => {
 | 
				
			||||||
    this.setState({ expanded: true });
 | 
					    this.setState({ expanded: true });
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -104,7 +104,7 @@ const Comment = ({ comment, domain, statusIds, isRemote, isSubmitting, selectedD
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </>
 | 
					    </>
 | 
				
			||||||
  );
 | 
					  );
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Comment.propTypes = {
 | 
					Comment.propTypes = {
 | 
				
			||||||
  comment: PropTypes.string.isRequired,
 | 
					  comment: PropTypes.string.isRequired,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -77,8 +77,8 @@ class Header extends PureComponent {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      if (sso_redirect) {
 | 
					      if (sso_redirect) {
 | 
				
			||||||
        content = (
 | 
					        content = (
 | 
				
			||||||
            <a href={sso_redirect} data-method='post' className='button button--block button-tertiary'><FormattedMessage id='sign_in_banner.sso_redirect' defaultMessage='Login or Register' /></a>
 | 
					          <a href={sso_redirect} data-method='post' className='button button--block button-tertiary'><FormattedMessage id='sign_in_banner.sso_redirect' defaultMessage='Login or Register' /></a>
 | 
				
			||||||
        )
 | 
					        );
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
        let signupButton;
 | 
					        let signupButton;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -128,7 +128,7 @@ export default class ModalRoot extends PureComponent {
 | 
				
			||||||
            <BundleContainer fetchComponent={MODAL_COMPONENTS[type]} loading={this.renderLoading(type)} error={this.renderError} renderDelay={200}>
 | 
					            <BundleContainer fetchComponent={MODAL_COMPONENTS[type]} loading={this.renderLoading(type)} error={this.renderError} renderDelay={200}>
 | 
				
			||||||
              {(SpecificComponent) => {
 | 
					              {(SpecificComponent) => {
 | 
				
			||||||
                const ref = typeof SpecificComponent !== 'function' ? this.setModalRef : undefined;
 | 
					                const ref = typeof SpecificComponent !== 'function' ? this.setModalRef : undefined;
 | 
				
			||||||
                return <SpecificComponent {...props} onChangeBackgroundColor={this.setBackgroundColor} onClose={this.handleClose} ref={ref} />
 | 
					                return <SpecificComponent {...props} onChangeBackgroundColor={this.setBackgroundColor} onClose={this.handleClose} ref={ref} />;
 | 
				
			||||||
              }}
 | 
					              }}
 | 
				
			||||||
            </BundleContainer>
 | 
					            </BundleContainer>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -24,7 +24,7 @@ const SignInBanner = () => {
 | 
				
			||||||
        <p><FormattedMessage id='sign_in_banner.text' defaultMessage='Login to follow profiles or hashtags, favorite, share and reply to posts. You can also interact from your account on a different server.' /></p>
 | 
					        <p><FormattedMessage id='sign_in_banner.text' defaultMessage='Login to follow profiles or hashtags, favorite, share and reply to posts. You can also interact from your account on a different server.' /></p>
 | 
				
			||||||
        <a href={sso_redirect} data-method='post' className='button button--block button-tertiary'><FormattedMessage id='sign_in_banner.sso_redirect' defaultMessage='Login or Register' /></a>
 | 
					        <a href={sso_redirect} data-method='post' className='button button--block button-tertiary'><FormattedMessage id='sign_in_banner.sso_redirect' defaultMessage='Login or Register' /></a>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    )
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (registrationsOpen) {
 | 
					  if (registrationsOpen) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue