1
0
Fork 0
forked from gitea/nas

Merge commit 'e58c36d308' into kb_migration

This commit is contained in:
KMY 2023-05-25 08:46:53 +09:00
commit d6f8f19e31
418 changed files with 2835 additions and 1841 deletions

View file

@ -1,14 +1,19 @@
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { PureComponent } from 'react';
import { FormattedMessage } from 'react-intl';
import { registrationsOpen } from 'mastodon/initial_state';
import { connect } from 'react-redux';
import { Icon } from 'mastodon/components/icon';
import classNames from 'classnames';
import { connect } from 'react-redux';
import { openModal, closeModal } from 'mastodon/actions/modal';
import { Icon } from 'mastodon/components/icon';
import { registrationsOpen } from 'mastodon/initial_state';
const mapStateToProps = (state, { accountId }) => ({
displayNameHtml: state.getIn(['accounts', accountId, 'display_name_html']),
signupUrl: state.getIn(['server', 'server', 'registrations', 'url'], '/auth/sign_up'),
});
const mapDispatchToProps = (dispatch) => ({
@ -81,6 +86,7 @@ class InteractionModal extends PureComponent {
url: PropTypes.string,
type: PropTypes.oneOf(['reply', 'reblog', 'favourite', 'follow']),
onSignupClick: PropTypes.func.isRequired,
signupUrl: PropTypes.string.isRequired,
};
handleSignupClick = () => {
@ -88,7 +94,7 @@ class InteractionModal extends PureComponent {
};
render () {
const { url, type, displayNameHtml } = this.props;
const { url, type, displayNameHtml, signupUrl } = this.props;
const name = <bdi dangerouslySetInnerHTML={{ __html: displayNameHtml }} />;
@ -126,7 +132,7 @@ class InteractionModal extends PureComponent {
if (registrationsOpen) {
signupButton = (
<a href='/auth/sign_up' className='button button--block button-tertiary'>
<a href={signupUrl} className='button button--block button-tertiary'>
<FormattedMessage id='sign_in_banner.create_account' defaultMessage='Create account' />
</a>
);