feat(ui): redesign Profile page (hero + tabs + danger zone)
Full rewrite of /profile with a cleaner layout and nicer polish.
Layout:
- Removed the sidebar 'user info' card; replaced with a horizontal hero
at the top: avatar (with premium badge overlay), name, email, logout
button, and 3 badges (plan, member since, recipe count)
- Tabs stretched full-width (no more 1/3 sidebar + 2/3 content split)
- Removed the 'Mes recettes' section from the bottom (redundant with
/recipes list page)
Hero:
- 24-28 Avatar with gradient fallback and ring-4 separator
- Premium crown icon overlay (Sparkles badge) if subscription != 'free'
- Badges: plan tier, member since (localized French date), recipe count
- Logout button moved up here, styled as ghost with red hover
Cuisine tab (the main improvement):
- Diet is now a 4-button segmented control instead of a native <select>
- Max time and servings inputs have suffix labels ('min', 'pers.')
- Equipment checkboxes replaced by visual tile buttons with emoji
icons, 2-col mobile / 4-col desktop, selected state = orange border +
bg. Hidden actual checkbox for accessibility.
- 'Actif' badge in the card header when any pref is set
- Rounded xl inputs (h-11), brand gradient submit button
Other tabs (Profil/Email/Sécurité):
- Consistent visual language: h-11 rounded-xl inputs, h-12 brand
gradient buttons, bolder labels
- Email tab shows current email in the description
- Improved placeholders
Alerts:
- Custom inline alerts with AnimatePresence, auto-dismiss after 4s for
success, dismissible X button, CheckCircle2/AlertCircle icons
- No more shadcn Alert component (simpler + branded colors)
Danger zone:
- Dedicated bordered section at the bottom with icon + explanation
- Delete button opens a proper Dialog (replaces prompt() hack)
- Dialog asks for password, has Cancel/Delete buttons
Mobile polish:
- Hero stacks avatar on top, centered
- Tab triggers show icon-only on mobile, icon+label on sm+
- All 4 diet buttons fit in 2 cols on mobile
- Equipment tiles also 2 cols on mobile
- Logout button full-width on mobile
Removed all unused imports: AvatarImage, Separator, CardFooter, Alert,
AlertTitle, AlertDescription. Cleaned up handlers that weren't needed
(inline setState in onChange).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7a3cbb9385
commit
0c4e0035c2
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user