diff --git a/apps/mail/components/golden.tsx b/apps/mail/components/golden.tsx index 8b87599908..01d98d3626 100644 --- a/apps/mail/components/golden.tsx +++ b/apps/mail/components/golden.tsx @@ -98,7 +98,7 @@ export const GoldenTicketModal = () => { - +

Invite a friend

diff --git a/apps/mail/components/mail/mail-list.tsx b/apps/mail/components/mail/mail-list.tsx index f057ac9710..beed3e335a 100644 --- a/apps/mail/components/mail/mail-list.tsx +++ b/apps/mail/components/mail/mail-list.tsx @@ -135,7 +135,7 @@ const Draft = memo(({ message }: { message: { id: string } }) => { 'text-md flex items-baseline gap-1 group-hover:opacity-100', )} > - + {cleanNameDisplay(draft?.to?.[0] || 'noname') || ''} @@ -144,7 +144,7 @@ const Draft = memo(({ message }: { message: { id: string } }) => {

{draft?.subject} @@ -608,7 +608,7 @@ const Thread = memo( {isFolderSent ? ( {highlightText(latestMessage.subject, searchValue.highlight)} ) : ( - + {highlightText( cleanNameDisplay(latestMessage.sender.name) || '', searchValue.highlight, @@ -657,7 +657,7 @@ const Thread = memo( ) : (

{highlightText(latestMessage.subject, searchValue.highlight)} diff --git a/apps/mail/components/mail/mail.tsx b/apps/mail/components/mail/mail.tsx index 9f34b8f5a6..e183b7b37d 100644 --- a/apps/mail/components/mail/mail.tsx +++ b/apps/mail/components/mail/mail.tsx @@ -169,7 +169,7 @@ export function MailLayout() { threadId ? 'md:hidden lg:block' : '', )} > -

+
{ icon: ( ), @@ -519,8 +518,7 @@ export const Categories = () => { icon: ( ), @@ -534,8 +532,7 @@ export const Categories = () => { icon: ( ), @@ -547,8 +544,7 @@ export const Categories = () => { icon: ( ), @@ -560,8 +556,7 @@ export const Categories = () => { icon: ( ), @@ -573,8 +568,7 @@ export const Categories = () => { icon: ( ), @@ -599,7 +593,7 @@ function getCategoryColor(categoryId: string): string { case 'updates': return 'bg-[#8B5CF6]'; case 'unread': - return 'bg-[#006FFE]'; + return 'bg-[#FF4800]'; default: return 'bg-base-primary-500'; } @@ -624,14 +618,13 @@ function CategorySelect({ isMultiSelectMode }: { isMultiSelectMode: boolean }) { const primaryCategory = categories[0]; if (!primaryCategory) return null; - const renderCategoryButton = (cat: CategoryType, isOverlay = false) => { + const renderCategoryButton = (cat: CategoryType, isOverlay = false, idx?: number) => { const isSelected = cat.id === (category || 'Primary'); const bgColor = getCategoryColor(cat.id); - return ( + return isSelected ? ( + ) : ( + + + + + + {cat.name} + + ); }; @@ -685,7 +704,7 @@ function CategorySelect({ isMultiSelectMode }: { isMultiSelectMode: boolean }) { return (
- {categories.map((cat) => renderCategoryButton(cat))} + {categories.map((cat, idx) => renderCategoryButton(cat, false, idx))}
- {categories.map((cat) => renderCategoryButton(cat, true))} + {categories.map((cat, idx) => renderCategoryButton(cat, true, idx))}
@@ -814,7 +833,9 @@ function MailCategoryTabs({ : 'text-muted-foreground hover:text-foreground hover:bg-muted/50', )} > - {category.icon} +
+ {category.icon} +
{category.name} @@ -844,7 +865,9 @@ function MailCategoryTabs({ className={cn('flex items-center gap-1.5 rounded-full px-2 text-xs font-medium')} tabIndex={-1} > -

{category.icon}

+
+ {category.icon} +
{category.name} diff --git a/apps/mail/components/ui/app-sidebar.tsx b/apps/mail/components/ui/app-sidebar.tsx index 286a1e9949..bd5d9cd643 100644 --- a/apps/mail/components/ui/app-sidebar.tsx +++ b/apps/mail/components/ui/app-sidebar.tsx @@ -120,7 +120,7 @@ export function AppSidebar({ ...props }: React.ComponentProps) { className={`mt-auto flex w-full flex-col ${state !== 'collapsed' ? 'px-0 md:px-2' : ''}`} > -
+
diff --git a/apps/mail/components/ui/nav-main.tsx b/apps/mail/components/ui/nav-main.tsx index 41252a43e0..ce9c973932 100644 --- a/apps/mail/components/ui/nav-main.tsx +++ b/apps/mail/components/ui/nav-main.tsx @@ -129,25 +129,25 @@ export function NavMain({ items }: NavMainProps) { const currentFrom = searchParams.get('from'); // Handle settings navigation - // if (item.isSettingsButton) { - // Include current path with category query parameter if present - // const currentPath = category - // ? `${pathname}?category=${encodeURIComponent(category)}` - // : pathname; - // return `${item.url}?from=${encodeURIComponent(currentPath)}`; - // } + if (item.isSettingsButton) { + // Include current path with category query parameter if present + const currentPath = category + ? `${pathname}?category=${encodeURIComponent(category)}` + : pathname; + return `${item.url}?from=${encodeURIComponent(currentPath)}`; + } // Handle back button with redirect protection - // if (item.isBackButton) { - // if (currentFrom) { - // const decodedFrom = decodeURIComponent(currentFrom); - // if (isValidInternalUrl(decodedFrom)) { - // return decodedFrom; - // } - // } - // // Fall back to safe default if URL is missing or invalid - // return '/mail'; - // } + if (item.isBackButton) { + if (currentFrom) { + const decodedFrom = decodeURIComponent(currentFrom); + if (isValidInternalUrl(decodedFrom)) { + return decodedFrom; + } + } + // Fall back to safe default if URL is missing or invalid + return '/mail'; + } // Handle settings pages navigation if (item.isSettingsPage && currentFrom) { @@ -504,15 +504,6 @@ function NavItem(item: NavItemProps & { href: string }) { ); - if (item.isBackButton) { - return ( - // TODO: Fix back link to go back a step not to /mail/inbox - - {buttonContent} - - ); - } - return ( diff --git a/apps/mail/config/navigation.ts b/apps/mail/config/navigation.ts index 672e86fb7d..5f0ff59228 100644 --- a/apps/mail/config/navigation.ts +++ b/apps/mail/config/navigation.ts @@ -223,6 +223,7 @@ export const bottomNavItems = [ title: 'navigation.sidebar.settings', url: '/settings/general', icon: SettingsGear, + isSettingsButton: true, }, ], }, diff --git a/apps/mail/locales/es.json b/apps/mail/locales/es.json index 17bf9af402..87d82f02a3 100644 --- a/apps/mail/locales/es.json +++ b/apps/mail/locales/es.json @@ -12,7 +12,6 @@ "signedOutSuccess": "Sesión cerrada correctamente", "signOutError": "Error al cerrar sesión", "refresh": "Actualizar", - "loading": "Loading...", "featureNotImplemented": "Esta función aún no está implementada", "moving": "Moviendo...", "movedToInbox": "Movido a la bandeja de entrada", @@ -116,7 +115,6 @@ }, "mailCategories": { "primary": "Principal", - "allMail": "All Mail", "important": "Importante", "personal": "Personal", "updates": "Actualizaciones",