From 1b283a9c01dfbb2ea52854077f6c56e7b16fca46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sat, 6 Jun 2026 23:15:05 +0200 Subject: [PATCH] feat(settings): land the account page from the avatar, tidy the token row Clicking the avatar (and the name beside it) in the sidebar user menu now routes straight to the account settings. On the per-medication API token row, drop the separate "Copy URL" button in favour of an inline read-only endpoint field with a copy icon, and switch the generate-token button to the standard outline variant so it no longer renders as the lone primary-coloured control on the row. --- src/components/layout/sidebar-nav.tsx | 78 ++++++++++++------- .../medications/sections/api-tokens-row.tsx | 41 ++++++---- 2 files changed, 72 insertions(+), 47 deletions(-) diff --git a/src/components/layout/sidebar-nav.tsx b/src/components/layout/sidebar-nav.tsx index 4e62bf571..ba4cf3670 100644 --- a/src/components/layout/sidebar-nav.tsx +++ b/src/components/layout/sidebar-nav.tsx @@ -124,22 +124,31 @@ function SidebarUserSection({ collapsed }: { collapsed: boolean }) { className="w-60" sideOffset={8} > -
- - {avatarUrl && } - - {getInitials(user.username)} - - -
-

{user.username}

- {user.email && ( -

- {user.email} -

- )} -
-
+ {/* R20 — the user header is the direct route into the account + settings. Clicking the avatar / name jumps straight to + `/settings/account` rather than making the user hunt for a + separate "Settings" entry. */} + + + + {avatarUrl && } + + {getInitials(user.username)} + + +
+

{user.username}

+ {user.email && ( +

+ {user.email} +

+ )} +
+ +
@@ -219,20 +228,29 @@ function SidebarUserSection({ collapsed }: { collapsed: boolean }) { return (
- - {avatarUrl && } - - {getInitials(user.username)} - - -
-

{user.username}

- {user.email && ( -

- {user.email} -

- )} -
+ {/* R20 — the avatar + name in the expanded footer routes straight + into the account settings; the kebab to the right still opens + the rest of the user menu. */} + + + {avatarUrl && } + + {getInitials(user.username)} + + +
+

{user.username}

+ {user.email && ( +

+ {user.email} +

+ )} +
+ {t("medications.detail.api.caption", { name: medicationName })}

- {/* The raw endpoint URL is redundant with the copy button below, so - it is rendered muted + single-line-truncated rather than as a - full-width block — the long absolute URL was pure visual noise. */} - ` carries the value; the icon button copies it. */} +
- POST {endpoint} - + + POST {endpoint} + + +
-