Repository Public
1// The destinations of the application, in the order of the sidebar.2export interface NavItem { href: string; icon: string; label: string; /** short label for the phone tab bar */ short?: string; admin?: boolean; match: (path: string) => boolean }3const at = (p: string) => (path: string) => path === p || path.startsWith(`${p}/`);4export const NAV: NavItem[] = [5 { href: '/', icon: 'folder', label: 'account.nav.files', short: 'account.nav.filesShort', match: (p) => p === '/' || p.startsWith('/folder/') },6 { href: '/recent', icon: 'clock', label: 'account.nav.recent', match: at('/recent') },7 { href: '/starred', icon: 'star', label: 'account.nav.starred', match: at('/starred') },8 { href: '/shares', icon: 'share', label: 'account.nav.shares', match: at('/shares') },9 { href: '/requests', icon: 'inbox', label: 'account.nav.requests', short: 'account.nav.requestsShort', match: at('/requests') },10 { href: '/duplicates', icon: 'duplicate', label: 'account.nav.duplicates', match: at('/duplicates') },11 { href: '/trash', icon: 'trash', label: 'account.nav.trash', match: at('/trash') },12];13export const SETTINGS: NavItem = { href: '/settings', icon: 'settings', label: 'account.nav.settings', match: at('/settings') };14export const ADMIN: NavItem = { href: '/admin', icon: 'shield', label: 'account.nav.admin', admin: true, match: at('/admin') };15/** Phone tab bar: these four, then "Plus" for everything else. */16export const TABS = ['/', '/recent', '/shares', '/requests'];17