diff --git a/app/javascript/mastodon/features/navigation_panel/redesign/account_card_and_menu.module.scss b/app/javascript/mastodon/features/navigation_panel/redesign/account_card_and_menu.module.scss index 7f158b2fa4e..8091b4a4fc0 100644 --- a/app/javascript/mastodon/features/navigation_panel/redesign/account_card_and_menu.module.scss +++ b/app/javascript/mastodon/features/navigation_panel/redesign/account_card_and_menu.module.scss @@ -6,19 +6,19 @@ border-radius: var(--radius-3); transition: background-color 200ms; - &:hover { + &:has(a:hover) { background-color: var(--color-bg-highlight); } - &:has(button:focus-visible) { + &:has(a:focus-visible) { outline: var(--outline-focus-default); background-color: var(--color-bg-highlight); } - // Disable default styles for LockupButton component - & button { + // Disable default hover & focus styles for LockupLink + & a { &:hover { - text-decoration: none; + text-decoration: none !important; } &:focus-visible { diff --git a/app/javascript/mastodon/features/navigation_panel/redesign/account_card_and_menu.tsx b/app/javascript/mastodon/features/navigation_panel/redesign/account_card_and_menu.tsx index 1f26b924bc6..b26c13ca7eb 100644 --- a/app/javascript/mastodon/features/navigation_panel/redesign/account_card_and_menu.tsx +++ b/app/javascript/mastodon/features/navigation_panel/redesign/account_card_and_menu.tsx @@ -14,27 +14,32 @@ import { GavelIcon, ShieldStarIcon, SignOutIcon, + MastodonLogoIcon, + GithubLogoIcon, } from '@phosphor-icons/react'; import { openModal } from '@/mastodon/actions/modal'; import { Avatar } from '@/mastodon/components/avatar'; +import { IconButton } from '@/mastodon/components/button/redesign'; import { DisplayName } from '@/mastodon/components/display_name'; import { useAccountHandle } from '@/mastodon/components/display_name/default'; import { - LockupButton, LockupContent, + LockupLink, LockupWrapper, } from '@/mastodon/components/lockup'; import { Menu, MenuItem, MenuItemDivider, + MenuItemGroup, MenuItemLink, MenuList, MenuTrigger, } from '@/mastodon/components/menu'; import { useAccount } from '@/mastodon/hooks/useAccount'; import { useIdentity } from '@/mastodon/identity_context'; +import { source_url, version } from '@/mastodon/initial_state'; import { canManageReports, canViewAdminDashboard, @@ -45,46 +50,35 @@ import classes from './account_card_and_menu.module.scss'; export const NavigationAccountCardAndMenu: React.FC = () => { const { accountId } = useIdentity(); + const account = useAccount(accountId); + const handle = useAccountHandle(account); + const accountBasePath = `/@${account?.acct}`; if (!accountId) { return null; } - return ( - - - - - - - - - ); -}; - -const AccountMenuTrigger: React.FC> = ( - props, -) => { - const { accountId } = useIdentity(); - const account = useAccount(accountId); - const handle = useAccountHandle(account); - return ( } - sideContent={} + sideContent={ + + + + + + + + + } className={classes.root} > - + - + ); }; @@ -194,6 +188,24 @@ export const AccountMenuItems: React.FC<{ + + + + + + + + + + + + = ({ siteName = domain, multiColumn }) => { + withVersionInfo?: boolean; +}> = ({ multiColumn, withVersionInfo }) => { const multiColumnLinkAttrs = multiColumn ? { target: '_blank', @@ -18,7 +24,6 @@ export const NavigationFooterLinks: React.FC<{ return (
-

{siteName}

  • @@ -28,18 +33,6 @@ export const NavigationFooterLinks: React.FC<{ />
  • -
  • - - - -
  • {termsOfServiceEnabled && (
  • )} +
  • + + + +
  • + {statusPageUrl && ( +
  • + + + +
  • + )} + {canViewProfileDirectory && ( +
  • + + + +
  • + )}
+ {withVersionInfo && ( +

+ {`Mastodon v${version} `}  + + + +

+ )}
); }; diff --git a/app/javascript/mastodon/features/navigation_panel/redesign/index.tsx b/app/javascript/mastodon/features/navigation_panel/redesign/index.tsx index 00a1a132bdc..f67039a301b 100644 --- a/app/javascript/mastodon/features/navigation_panel/redesign/index.tsx +++ b/app/javascript/mastodon/features/navigation_panel/redesign/index.tsx @@ -294,10 +294,7 @@ export const RedesignNavigationPanel: React.FC<{ )} - + )} @@ -315,10 +312,7 @@ export const RedesignNavigationPanel: React.FC<{ )} diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index 8518ec74a7a..14e20027310 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -866,6 +866,7 @@ "footer.about_server": "About {domain}", "footer.about_this_server": "About", "footer.directory": "Profiles directory", + "footer.directory_short": "Directory", "footer.get_app": "Get the app", "footer.keyboard_shortcuts": "Keyboard shortcuts", "footer.privacy_policy": "Privacy policy", @@ -1038,6 +1039,7 @@ "mute_modal.you_wont_see_mentions": "You won't see posts that mention them.", "mute_modal.you_wont_see_posts": "They can still see your posts, but you won't see theirs.", "navigation_bar.about": "About", + "navigation_bar.about_mastodon": "About Mastodon", "navigation_bar.account_settings": "Password and security", "navigation_bar.administration": "Administration", "navigation_bar.advanced_interface": "Open in advanced web interface", @@ -1073,6 +1075,7 @@ "navigation_bar.search": "Search", "navigation_bar.search_trends": "Search / Trending", "navigation_bar.sign_out": "Sign Out", + "navigation_bar.source_code": "Source Code", "navigation_panel.collapse_followed_tags": "Collapse followed hashtags menu", "navigation_panel.collapse_lists": "Collapse list menu", "navigation_panel.expand_followed_tags": "Expand followed hashtags menu",