diff --git a/frontend/src/pages/SettingsPage/components/AccountSettingsCard.tsx b/frontend/src/pages/SettingsPage/components/AccountSettingsCard.tsx index c9fb6dfc5..ee58f1011 100644 --- a/frontend/src/pages/SettingsPage/components/AccountSettingsCard.tsx +++ b/frontend/src/pages/SettingsPage/components/AccountSettingsCard.tsx @@ -201,207 +201,246 @@ const AccountSettingsCard = forwardRef( setPendingLeave(null); }; + // Full-width card; `*:pb-0` drops the Card's bottom padding so the footer sits flush. return ( - - -
- {/* LEFT: identity */} -
- - -
- - {isEditingName ? ( - <> - handleNameDraftChange(e.target.value)} - onBlur={handleSaveNameEdit} - onKeyDown={(e) => { - if (e.key === 'Enter') { - e.preventDefault(); - handleSaveNameEdit(); - } else if (e.key === 'Escape') { - e.preventDefault(); - handleCancelNameEdit(); - } - }} - className={cn( - 'h-10 w-full rounded-none border-0 border-b bg-transparent px-0 text-lg shadow-none focus-visible:ring-0', - nameError - ? 'border-destructive placeholder:text-destructive/70' - : 'border-border focus-visible:border-primary', - )} - /> - {longWordError ? ( -

- A single word in your name cannot exceed 30 characters. -

+
+ + +
+ {/* TOP ROW: avatar preview + display name */} +
+ - )} -
-
+ + + + + - {/* RIGHT: avatar picker */} -
- -
- {avatars.map((avatar) => { - const isSelected = selectedAvatar === avatar; - return ( - - ); - })} + + + )} + {!isEditingName && ( +

+ Shown on albums and shared memories. +

+ )} +
+
+ + {/* AVATAR PICKER */} +
+ +
+
+ {avatars.map((avatar) => { + const isSelected = selectedAvatar === avatar; + return ( + + ); + })} +
+
-
- {/* FOOTER */} -
-

- {hasUnsavedChanges - ? 'You have unsaved changes' - : 'All changes saved'} -

-
- - +
-
- + - + - - - - Unsaved changes - -

- You have unsaved changes to your profile. Save before leaving? -

- - - - - -
-
- + + + + Unsaved changes + +

+ You have unsaved changes to your profile. Save before leaving? +

+ + + + + +
+
+ +
); }, );