diff options
author | Claire <claire.github-309c@sitedethib.com> | 2023-02-10 22:56:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-10 22:56:36 +0100 |
commit | dc02a93d04815c618dc55748fff3cfe64c7023d9 (patch) | |
tree | 5b6d56d248379823660d70dc35c95e4c547f43ea /app/javascript/flavours | |
parent | 76b4e7727b7497c1b68e06133831701f8950ae19 (diff) | |
parent | 87419f9307f54755af4604876ac149262ae3f0a6 (diff) |
Merge pull request #2105 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/flavours')
7 files changed, 20 insertions, 16 deletions
diff --git a/app/javascript/flavours/glitch/components/autosuggest_input.js b/app/javascript/flavours/glitch/components/autosuggest_input.js index 4d751e281..1a030fb85 100644 --- a/app/javascript/flavours/glitch/components/autosuggest_input.js +++ b/app/javascript/flavours/glitch/components/autosuggest_input.js @@ -51,6 +51,7 @@ export default class AutosuggestInput extends ImmutablePureComponent { searchTokens: PropTypes.arrayOf(PropTypes.string), maxLength: PropTypes.number, lang: PropTypes.string, + spellCheck: PropTypes.string, }; static defaultProps = { @@ -186,7 +187,7 @@ export default class AutosuggestInput extends ImmutablePureComponent { }; render () { - const { value, suggestions, disabled, placeholder, onKeyUp, autoFocus, className, id, maxLength, lang } = this.props; + const { value, suggestions, disabled, placeholder, onKeyUp, autoFocus, className, id, maxLength, lang, spellCheck } = this.props; const { suggestionsHidden } = this.state; return ( @@ -212,6 +213,7 @@ export default class AutosuggestInput extends ImmutablePureComponent { className={className} maxLength={maxLength} lang={lang} + spellCheck={spellCheck} /> </label> diff --git a/app/javascript/flavours/glitch/features/compose/components/compose_form.js b/app/javascript/flavours/glitch/features/compose/components/compose_form.js index 9f57d7b1b..696188f31 100644 --- a/app/javascript/flavours/glitch/features/compose/components/compose_form.js +++ b/app/javascript/flavours/glitch/features/compose/components/compose_form.js @@ -332,6 +332,7 @@ class ComposeForm extends ImmutablePureComponent { className='spoiler-input__input' lang={this.props.lang} autoFocus={false} + spellCheck /> </div> diff --git a/app/javascript/flavours/glitch/features/compose/components/poll_form.js b/app/javascript/flavours/glitch/features/compose/components/poll_form.js index 13b7322d3..cb6b577bf 100644 --- a/app/javascript/flavours/glitch/features/compose/components/poll_form.js +++ b/app/javascript/flavours/glitch/features/compose/components/poll_form.js @@ -72,6 +72,7 @@ class Option extends React.PureComponent { maxLength={pollLimits.max_option_chars} value={title} lang={lang} + spellCheck onChange={this.handleOptionTitleChange} suggestions={this.props.suggestions} onSuggestionsFetchRequested={this.onSuggestionsFetchRequested} diff --git a/app/javascript/flavours/glitch/features/follow_requests/index.js b/app/javascript/flavours/glitch/features/follow_requests/index.js index 7b35e3ec9..aa60bd7b8 100644 --- a/app/javascript/flavours/glitch/features/follow_requests/index.js +++ b/app/javascript/flavours/glitch/features/follow_requests/index.js @@ -3,7 +3,6 @@ import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { debounce } from 'lodash'; -import LoadingIndicator from 'flavours/glitch/components/loading_indicator'; import Column from 'flavours/glitch/features/ui/components/column'; import ColumnBackButtonSlim from 'flavours/glitch/components/column_back_button_slim'; import AccountAuthorizeContainer from './containers/account_authorize_container'; @@ -53,16 +52,8 @@ class FollowRequests extends ImmutablePureComponent { render () { const { intl, accountIds, hasMore, multiColumn, locked, domain, isLoading } = this.props; - if (!accountIds) { - return ( - <Column name='follow-requests'> - <LoadingIndicator /> - </Column> - ); - } - const emptyMessage = <FormattedMessage id='empty_column.follow_requests' defaultMessage="You don't have any follow requests yet. When you receive one, it will show up here." />; - const unlockedPrependMessage = locked ? null : ( + const unlockedPrependMessage = !locked && accountIds.size > 0 && ( <div className='follow_requests-unlocked_explanation'> <FormattedMessage id='follow_requests.unlocked_explanation' @@ -81,6 +72,7 @@ class FollowRequests extends ImmutablePureComponent { onLoadMore={this.handleLoadMore} hasMore={hasMore} isLoading={isLoading} + showLoading={isLoading && accountIds.size === 0} emptyMessage={emptyMessage} bindToDocument={!multiColumn} prepend={unlockedPrependMessage} diff --git a/app/javascript/flavours/glitch/features/ui/components/link_footer.js b/app/javascript/flavours/glitch/features/ui/components/link_footer.js index c4bea9f31..0d1d4040f 100644 --- a/app/javascript/flavours/glitch/features/ui/components/link_footer.js +++ b/app/javascript/flavours/glitch/features/ui/components/link_footer.js @@ -3,7 +3,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage, defineMessages, injectIntl } from 'react-intl'; import { Link } from 'react-router-dom'; -import { domain, version, source_url, profile_directory as profileDirectory } from 'flavours/glitch/initial_state'; +import { domain, version, source_url, statusPageUrl, profile_directory as profileDirectory } from 'flavours/glitch/initial_state'; import { logOut } from 'flavours/glitch/utils/log_out'; import { openModal } from 'flavours/glitch/actions/modal'; import { PERMISSION_INVITE_USERS } from 'flavours/glitch/permissions'; @@ -59,21 +59,27 @@ class LinkFooter extends React.PureComponent { <p> <strong>{domain}</strong>: {' '} - <Link key='about' to='/about'><FormattedMessage id='footer.about' defaultMessage='About' /></Link> + <Link to='/about'><FormattedMessage id='footer.about' defaultMessage='About' /></Link> + {statusPageUrl && ( + <> + {DividingCircle} + <a href={statusPageUrl} target='_blank' rel='noopener'><FormattedMessage id='footer.status' defaultMessage='Status' /></a> + </> + )} {canInvite && ( <> {DividingCircle} - <a key='invites' href='/invites' target='_blank'><FormattedMessage id='footer.invite' defaultMessage='Invite people' /></a> + <a href='/invites' target='_blank'><FormattedMessage id='footer.invite' defaultMessage='Invite people' /></a> </> )} {canProfileDirectory && ( <> {DividingCircle} - <Link key='directory' to='/directory'><FormattedMessage id='footer.directory' defaultMessage='Profiles directory' /></Link> + <Link to='/directory'><FormattedMessage id='footer.directory' defaultMessage='Profiles directory' /></Link> </> )} {DividingCircle} - <Link key='privacy-policy' to='/privacy-policy'><FormattedMessage id='footer.privacy_policy' defaultMessage='Privacy policy' /></Link> + <Link to='/privacy-policy'><FormattedMessage id='footer.privacy_policy' defaultMessage='Privacy policy' /></Link> </p> <p> diff --git a/app/javascript/flavours/glitch/initial_state.js b/app/javascript/flavours/glitch/initial_state.js index eefbdca80..c4b249db8 100644 --- a/app/javascript/flavours/glitch/initial_state.js +++ b/app/javascript/flavours/glitch/initial_state.js @@ -142,6 +142,7 @@ export const usePendingItems = getMeta('use_pending_items'); export const version = getMeta('version'); export const translationEnabled = getMeta('translation_enabled'); export const languages = initialState?.languages; +export const statusPageUrl = getMeta('status_page_url'); // Glitch-soc-specific settings export const maxChars = (initialState && initialState.max_toot_chars) || 500; diff --git a/app/javascript/flavours/glitch/styles/components/modal.scss b/app/javascript/flavours/glitch/styles/components/modal.scss index 972e01e7d..69d237dec 100644 --- a/app/javascript/flavours/glitch/styles/components/modal.scss +++ b/app/javascript/flavours/glitch/styles/components/modal.scss @@ -1071,6 +1071,7 @@ &__container { padding: 30px; pointer-events: all; + overflow-y: auto; } .status__content { |