Files
kakeibo/frontend/src/components/layout/nav-items.ts
T
suphicakir c6d4c30461 feat(arayüz): sayfa yönlendirme, korumalı sayfalar ve uygulama iskeleti
- react-router: Türkçe adresler (/defter, /plan, /birikim, ...), 404 sayfası
- Korumalı sayfalar: oturum yoksa /giris?donus=..., girişten sonra geri dönüş
- Açık yönlendirme koruması (safeReturnPath, 10 test)
- İskelet: mobilde 5 öğeli alt menü, masaüstünde sol kenar çubuğu
- Diğer sayfası (değerlendirme, raporlar, ayarlar, tema, çıkış)
- Arayüz metinleri lib/strings.ts'de toplanmaya başlandı
- Tasarım önizlemesi /dev/tasarim (yalnızca geliştirmede)
- Düzeltme: çıkışta önbellek temizliği ekranı güncellemiyordu

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 00:46:17 +03:00

52 lines
1.6 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import {
CalendarDays,
ChartLine,
ClipboardCheck,
LayoutDashboard,
Menu,
NotebookPen,
PiggyBank,
Settings,
type LucideIcon,
} from 'lucide-react'
import { t } from '@/lib/strings'
export type NavItem = { to: string; label: string; icon: LucideIcon }
/** Sayfa adresleri tek yerde */
export const paths = {
dashboard: '/',
ledger: '/defter',
planning: '/plan',
savings: '/birikim',
more: '/diger',
review: '/degerlendirme',
reports: '/raporlar',
settings: '/ayarlar',
login: '/giris',
register: '/kayit',
} as const
const dashboard: NavItem = { to: paths.dashboard, label: t.nav.dashboard, icon: LayoutDashboard }
const ledger: NavItem = { to: paths.ledger, label: t.nav.ledger, icon: NotebookPen }
const planning: NavItem = { to: paths.planning, label: t.nav.planning, icon: CalendarDays }
const savings: NavItem = { to: paths.savings, label: t.nav.savings, icon: PiggyBank }
const review: NavItem = { to: paths.review, label: t.nav.review, icon: ClipboardCheck }
const reports: NavItem = { to: paths.reports, label: t.nav.reports, icon: ChartLine }
const settings: NavItem = { to: paths.settings, label: t.nav.settings, icon: Settings }
/** Mobil alt menü: 5 öğe (KAKEIBO_PROMPT §9) */
export const bottomNav: NavItem[] = [
dashboard,
ledger,
planning,
savings,
{ to: paths.more, label: t.nav.more, icon: Menu },
]
/** "Diğer" altında toplananlar (mobil) */
export const moreNav: NavItem[] = [review, reports, settings]
/** Masaüstü sol menü: hepsi doğrudan */
export const sideNav: NavItem[] = [dashboard, ledger, planning, review, savings, reports, settings]