|
1 | 1 | import React from 'react'; |
2 | | -import { LayoutList, Image, Settings } from 'lucide-react'; |
3 | | -import { AppSection } from '../types'; |
| 2 | +import { LayoutList, Image, Settings, Aperture, Users } from 'lucide-react'; |
| 3 | +import { AppSection, Language } from '../types'; |
| 4 | +import { TRANSLATIONS } from '../utils/translations'; |
4 | 5 |
|
5 | 6 | interface NavbarProps { |
6 | 7 | currentSection: AppSection; |
7 | 8 | onSectionChange: (section: AppSection) => void; |
| 9 | + language: Language; |
8 | 10 | } |
9 | 11 |
|
10 | | -export const Navbar: React.FC<NavbarProps> = ({ currentSection, onSectionChange }) => { |
| 12 | +export const Navbar: React.FC<NavbarProps> = ({ currentSection, onSectionChange, language }) => { |
| 13 | + const t = TRANSLATIONS[language]; |
| 14 | + |
11 | 15 | const navItems = [ |
12 | | - { id: AppSection.RELEASES, icon: LayoutList, label: 'Systems' }, |
13 | | - { id: AppSection.WALLPAPERS, icon: Image, label: 'Wallpapers' }, |
14 | | - { id: AppSection.SETTINGS, icon: Settings, label: 'Config' }, |
| 16 | + { id: AppSection.RELEASES, icon: LayoutList, label: t.nav_releases }, |
| 17 | + { id: AppSection.WALLPAPERS, icon: Image, label: t.nav_wallpapers }, |
| 18 | + { id: AppSection.GALLERY, icon: Aperture, label: t.nav_gallery }, |
| 19 | + { id: AppSection.TEAM, icon: Users, label: t.nav_team }, |
| 20 | + { id: AppSection.SETTINGS, icon: Settings, label: t.nav_config }, |
15 | 21 | ]; |
16 | 22 |
|
17 | 23 | return ( |
18 | 24 | <nav className="fixed bottom-0 left-0 w-full z-50"> |
19 | | - {/* Glass gradient background */} |
20 | | - <div className="absolute inset-0 bg-background/80 backdrop-blur-lg border-t border-white/5" /> |
21 | | - |
22 | | - <div className="relative flex justify-around items-center h-20 max-w-lg mx-auto pb-4 safe-area-bottom"> |
23 | | - {navItems.map((item) => { |
24 | | - const isActive = currentSection === item.id; |
25 | | - const Icon = item.icon; |
26 | | - |
27 | | - return ( |
28 | | - <button |
29 | | - key={item.id} |
30 | | - onClick={() => onSectionChange(item.id)} |
31 | | - className="relative flex flex-col items-center justify-center w-full h-full group" |
32 | | - > |
33 | | - <div className={` |
34 | | - p-1.5 rounded-xl transition-all duration-300 ease-out mb-1 |
35 | | - ${isActive ? 'bg-primary/20 text-primary translate-y-[-2px]' : 'text-muted group-hover:text-text'} |
36 | | - `}> |
37 | | - <Icon size={24} strokeWidth={isActive ? 2.5 : 2} /> |
38 | | - </div> |
39 | | - |
40 | | - <span className={` |
41 | | - text-[10px] font-bold tracking-wider transition-colors duration-300 uppercase |
42 | | - ${isActive ? 'text-primary' : 'text-muted/60'} |
43 | | - `}> |
44 | | - {item.label} |
45 | | - </span> |
| 25 | + {/* Glass gradient background */} |
| 26 | + <div className="absolute inset-0 bg-background/80 backdrop-blur-lg border-t border-white/5" /> |
| 27 | + |
| 28 | + <div className="relative flex justify-around items-center h-20 max-w-lg mx-auto pb-4 safe-area-bottom px-2"> |
| 29 | + {navItems.map((item) => { |
| 30 | + const isActive = currentSection === item.id; |
| 31 | + const Icon = item.icon; |
| 32 | + |
| 33 | + return ( |
| 34 | + <button |
| 35 | + key={item.id} |
| 36 | + onClick={() => onSectionChange(item.id)} |
| 37 | + className="relative flex flex-col items-center justify-center w-full h-full group" |
| 38 | + > |
| 39 | + <div className={` |
| 40 | + p-1.5 rounded-xl transition-all duration-300 ease-out mb-1 |
| 41 | + ${isActive ? 'bg-primary/20 text-primary translate-y-[-2px]' : 'text-muted group-hover:text-text'} |
| 42 | + `}> |
| 43 | + <Icon size={20} strokeWidth={isActive ? 2.5 : 2} /> |
| 44 | + </div> |
| 45 | + |
| 46 | + <span className={` |
| 47 | + text-[9px] font-bold tracking-wider transition-colors duration-300 uppercase |
| 48 | + ${isActive ? 'text-primary' : 'text-muted/60'} |
| 49 | + `}> |
| 50 | + {item.label} |
| 51 | + </span> |
46 | 52 |
|
47 | | - {/* Active Indicator Dot */} |
48 | | - {isActive && ( |
49 | | - <span className="absolute bottom-2 w-1 h-1 bg-primary rounded-full shadow-[0_0_8px_rgb(var(--color-primary))]" /> |
50 | | - )} |
| 53 | + {/* Active Indicator Dot */} |
| 54 | + {isActive && ( |
| 55 | + <span className="absolute bottom-2 w-1 h-1 bg-primary rounded-full shadow-[0_0_8px_rgb(var(--color-primary))]" /> |
| 56 | + )} |
51 | 57 | </button> |
52 | | - ); |
53 | | - })} |
54 | | - </div> |
| 58 | + ); |
| 59 | + })} |
| 60 | + </div> |
55 | 61 | </nav> |
56 | 62 | ); |
57 | 63 | }; |
0 commit comments