@@ -133,38 +128,27 @@ export const AccountHeader: React.FC<{
/>
-
+ {!isRedesignEnabled() && (
+
+ )}
-
-
-
-
-
- @{username}
- @{domain}
-
-
- {account.locked && (
-
- )}
-
-
+
+
+ {isRedesignEnabled() &&
}
diff --git a/app/javascript/mastodon/features/account_timeline/components/account_name.tsx b/app/javascript/mastodon/features/account_timeline/components/account_name.tsx
new file mode 100644
index 0000000000..90ccf7486d
--- /dev/null
+++ b/app/javascript/mastodon/features/account_timeline/components/account_name.tsx
@@ -0,0 +1,68 @@
+import type { FC } from 'react';
+
+import { useIntl } from 'react-intl';
+
+import { DisplayName } from '@/mastodon/components/display_name';
+import { Icon } from '@/mastodon/components/icon';
+import { useAccount } from '@/mastodon/hooks/useAccount';
+import { useAppSelector } from '@/mastodon/store';
+import InfoIcon from '@/material-icons/400-24px/info.svg?react';
+import LockIcon from '@/material-icons/400-24px/lock.svg?react';
+
+import { DomainPill } from '../../account/components/domain_pill';
+import { isRedesignEnabled } from '../common';
+
+import classes from './redesign.module.scss';
+
+export const AccountName: FC<{ accountId: string; className?: string }> = ({
+ accountId,
+ className,
+}) => {
+ const intl = useIntl();
+ const account = useAccount(accountId);
+ const me = useAppSelector((state) => state.meta.get('me') as string);
+ const localDomain = useAppSelector(
+ (state) => state.meta.get('domain') as string,
+ );
+
+ if (!account) {
+ return null;
+ }
+
+ const [username = '', domain = localDomain] = account.acct.split('@');
+
+ return (
+
+
+
+
+ @{username}
+ {isRedesignEnabled() && '@'}
+
+ {!isRedesignEnabled() && '@'}
+ {domain}
+
+
+
+ {isRedesignEnabled() && }
+
+ {!isRedesignEnabled() && account.locked && (
+
+ )}
+
+
+ );
+};
diff --git a/app/javascript/mastodon/features/account_timeline/components/redesign.module.scss b/app/javascript/mastodon/features/account_timeline/components/redesign.module.scss
index dd09f199e5..757f5a4231 100644
--- a/app/javascript/mastodon/features/account_timeline/components/redesign.module.scss
+++ b/app/javascript/mastodon/features/account_timeline/components/redesign.module.scss
@@ -1,3 +1,44 @@
+.nameWrapper {
+ display: flex;
+ gap: 16px;
+}
+
+.name {
+ flex-grow: 1;
+ font-size: 22px;
+ white-space: initial;
+ text-overflow: initial;
+ line-height: normal;
+
+ :global(.icon-info) {
+ margin-left: 2px;
+ width: 1em;
+ height: 1em;
+ align-self: center;
+ }
+}
+
+// Overrides .account__header__tabs__name h1 small
+h1.name > small {
+ gap: 0;
+}
+
+.domainPill {
+ appearance: none;
+ border: none;
+ background: none;
+ padding: 0;
+ text-decoration: underline;
+ color: inherit;
+ font-size: 1em;
+ font-weight: initial;
+
+ &:global(.active) {
+ background: none;
+ color: inherit;
+ }
+}
+
.fieldList {
margin-top: 16px;
}