From 5c122a035b8d9bc72fcd6dfe0860fff4b20edc1f Mon Sep 17 00:00:00 2001 From: gitea Date: Sun, 15 Jun 2025 07:13:19 +0200 Subject: [PATCH] revert 75c4430778b1397eda0909367a99f60e74332796 revert Footer --- .../features/ui/components/link_footer.tsx | 167 ++++++++++-------- 1 file changed, 95 insertions(+), 72 deletions(-) diff --git a/app/javascript/mastodon/features/ui/components/link_footer.tsx b/app/javascript/mastodon/features/ui/components/link_footer.tsx index 9e8f0104a2..cbfb6a3114 100644 --- a/app/javascript/mastodon/features/ui/components/link_footer.tsx +++ b/app/javascript/mastodon/features/ui/components/link_footer.tsx @@ -1,78 +1,101 @@ -import PropTypes from 'prop-types'; -import { PureComponent } from 'react'; - -import { FormattedMessage, injectIntl } from 'react-intl'; +import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router-dom'; -import { connect } from 'react-redux'; +import { + domain, + version, + source_url, + statusPageUrl, + profile_directory as canProfileDirectory, + termsOfServiceEnabled, +} from 'mastodon/initial_state'; -import { openModal } from 'mastodon/actions/modal'; -import { identityContextPropShape, withIdentity } from 'mastodon/identity_context'; -import { domain, version, source_url, statusPageUrl, profile_directory as profileDirectory } from 'mastodon/initial_state'; -import { PERMISSION_INVITE_USERS } from 'mastodon/permissions'; +const DividingCircle: React.FC = () => {' · '}; -const mapDispatchToProps = (dispatch) => ({ - onLogout () { - dispatch(openModal({ modalType: 'CONFIRM_LOG_OUT' })); +export const LinkFooter: React.FC<{ + multiColumn: boolean; +}> = ({ multiColumn }) => { + return ( +
+

+ {domain}:{' '} + + + + {statusPageUrl && ( + <> + + + + + + )} + {canProfileDirectory && ( + <> + + + + + + )} + + + + + {termsOfServiceEnabled && ( + <> + + + + + + )} +

- }, -}); - -class LinkFooter extends PureComponent { - static propTypes = { - identity: identityContextPropShape, - multiColumn: PropTypes.bool, - onLogout: PropTypes.func.isRequired, - intl: PropTypes.object.isRequired, - }; - - handleLogoutClick = e => { - e.preventDefault(); - e.stopPropagation(); - - this.props.onLogout(); - - return false; - }; - - render () { - const { signedIn, permissions } = this.props.identity; - const { multiColumn } = this.props; -const canInvite = signedIn && ((permissions & PERMISSION_INVITE_USERS) === PERMISSION_INVITE_USERS); - const canProfileDirectory = profileDirectory; - - const DividingCircle = {' · '}; - - return ( -
-

- {domain}: - {' '} - - {statusPageUrl && ( - <> - {DividingCircle} - - - )} - {canInvite && ( - <> - {DividingCircle} - - - )} - {DividingCircle} - - {DividingCircle} - - {DividingCircle} - - {DividingCircle} - v{version} -

-
- ); - } - -} +

+ Mastodon:{' '} + + + + + + + + + + + + + + + + + v{version} +

+
+ ); +};