deploy / deploy (push) Successful in 36s
- « Ajouter » devient « Rechercher » : un seul champ, onglets Tout / Titres /
Personnes / Membres (pseudo), ajout manuel conservé.
- Page d'une personne : photo, naissance, biographie, filmographie par métier
(jeu, doublage, réalisation, scénario, production, autres), tri populaires /
récents, titres déjà dans la bibliothèque marqués ; TMDB et AniList (doubleurs,
staff d'anime).
- Casting et réalisateur·rice cliquables sur la fiche ; pile de fenêtres
(titre → personne → titre…) avec retour cran par cran.
- Proxy tmdb : /search/person, /person/{id}, combined_credits (redéployé).
- 18 langues.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YVo1qxKoBQCaMd7Ue8PGbe
56 lines
1.9 KiB
TypeScript
56 lines
1.9 KiB
TypeScript
import { type Tab } from './BottomNav'
|
|
import { t } from '../i18n'
|
|
import { BarChart3, Home, LibraryBig, Search, Settings } from 'lucide-react'
|
|
import { cx } from '../lib/utils'
|
|
|
|
const ITEMS: { tab: Tab; readonly label: string; Icon: typeof Home }[] = [
|
|
{ tab: 'home', get label() { return t('nav.home') }, Icon: Home },
|
|
{ tab: 'catalog', get label() { return t('nav.catalog') }, Icon: LibraryBig },
|
|
{ tab: 'stats', get label() { return t('nav.stats') }, Icon: BarChart3 },
|
|
{ tab: 'settings', get label() { return t('nav.settings') }, Icon: Settings },
|
|
]
|
|
|
|
interface Props {
|
|
current: Tab
|
|
onChange: (tab: Tab) => void
|
|
onAdd: () => void
|
|
}
|
|
|
|
export default function SideNav({ current, onChange, onAdd }: Props) {
|
|
return (
|
|
<nav className="fixed inset-y-0 start-0 z-30 hidden w-60 flex-col border-e border-line bg-bg px-4 py-6 lg:flex">
|
|
<h1 className="px-2 text-2xl font-bold">
|
|
Azuu<span className="text-accent">Cine</span>
|
|
</h1>
|
|
|
|
<button
|
|
onClick={onAdd}
|
|
className="mt-6 flex w-full items-center justify-center gap-2 rounded-full bg-accent-fill px-4 py-2.5 text-sm font-semibold text-on-accent transition active:scale-95"
|
|
>
|
|
<Search size={17} strokeWidth={2.4} />
|
|
{t('search.title')}
|
|
</button>
|
|
|
|
<div className="mt-6 flex flex-col gap-1">
|
|
{ITEMS.map(({ tab, label, Icon }) => {
|
|
const active = current === tab
|
|
return (
|
|
<button
|
|
key={tab}
|
|
onClick={() => onChange(tab)}
|
|
aria-current={active ? 'page' : undefined}
|
|
className={cx(
|
|
'flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-sm font-medium transition-colors',
|
|
active ? 'bg-surface-2 text-ink' : 'text-ink-3 hover:text-ink',
|
|
)}
|
|
>
|
|
<Icon size={20} strokeWidth={active ? 2.2 : 1.6} />
|
|
{label}
|
|
</button>
|
|
)
|
|
})}
|
|
</div>
|
|
</nav>
|
|
)
|
|
}
|