diff --git a/.haml-lint.yml b/.haml-lint.yml index b94eb8b0df..2b553ca56c 100644 --- a/.haml-lint.yml +++ b/.haml-lint.yml @@ -1,5 +1,3 @@ -inherits_from: .haml-lint_todo.yml - exclude: - 'vendor/**/*' - lib/templates/haml/scaffold/_form.html.haml diff --git a/Gemfile b/Gemfile index f2cf820b21..c5ff3562a4 100644 --- a/Gemfile +++ b/Gemfile @@ -58,6 +58,7 @@ gem 'htmlentities', '~> 4.3' gem 'http', '~> 5.1' gem 'http_accept_language', '~> 2.1' gem 'httplog', '~> 1.6.2' +gem 'i18n', '1.14.1' # TODO: Remove version when resolved: https://github.com/glebm/i18n-tasks/issues/552 / https://github.com/ruby-i18n/i18n/pull/688 gem 'idn-ruby', require: 'idn' gem 'inline_svg' gem 'kaminari', '~> 1.2' diff --git a/Gemfile.lock b/Gemfile.lock index 9c5bb940bc..46e8eb1e66 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -866,6 +866,7 @@ DEPENDENCIES http (~> 5.1) http_accept_language (~> 2.1) httplog (~> 1.6.2) + i18n (= 1.14.1) i18n-tasks (~> 1.0) idn-ruby inline_svg diff --git a/app/javascript/mastodon/components/column_header.jsx b/app/javascript/mastodon/components/column_header.jsx index 7fd646690d..a7d07ffdb0 100644 --- a/app/javascript/mastodon/components/column_header.jsx +++ b/app/javascript/mastodon/components/column_header.jsx @@ -13,7 +13,7 @@ import ChevronRightIcon from '@/material-icons/400-24px/chevron_right.svg?react' import CloseIcon from '@/material-icons/400-24px/close.svg?react'; import SettingsIcon from '@/material-icons/400-24px/settings.svg?react'; import { Icon } from 'mastodon/components/icon'; -import { ButtonInTabsBar, useColumnsContext } from 'mastodon/features/ui/util/columns_context'; +import { ButtonInTabsBar } from 'mastodon/features/ui/util/columns_context'; import { WithRouterPropTypes } from 'mastodon/utils/react_router'; import { useAppHistory } from './router'; @@ -26,10 +26,9 @@ const messages = defineMessages({ back: { id: 'column_back_button.label', defaultMessage: 'Back' }, }); -const BackButton = ({ pinned, show, onlyIcon }) => { +const BackButton = ({ onlyIcon }) => { const history = useAppHistory(); const intl = useIntl(); - const { multiColumn } = useColumnsContext(); const handleBackClick = useCallback(() => { if (history.location?.state?.fromMastodon) { @@ -39,10 +38,6 @@ const BackButton = ({ pinned, show, onlyIcon }) => { } }, [history]); - const showButton = history && !pinned && ((multiColumn && history.location?.state?.fromMastodon) || show); - - if (!showButton) return null; - return ( ; } - backButton = ; + if (history && !pinned && ((multiColumn && history.location?.state?.fromMastodon) || showBackButton)) { + backButton = ; + } const collapsedContent = [ extraContent, @@ -199,16 +194,16 @@ class ColumnHeader extends PureComponent {

{hasTitle && ( <> - {showBackButton && backButton} + {backButton} )} - {!hasTitle && showBackButton && backButton} + {!hasTitle && backButton}
{extraButton} diff --git a/app/javascript/mastodon/features/follow_requests/index.jsx b/app/javascript/mastodon/features/follow_requests/index.jsx index 7d651f2ca6..a8f40a31d0 100644 --- a/app/javascript/mastodon/features/follow_requests/index.jsx +++ b/app/javascript/mastodon/features/follow_requests/index.jsx @@ -68,7 +68,7 @@ class FollowRequests extends ImmutablePureComponent { ); return ( - +