refactor: restructure sidebar navigation with logical groups
Sidebar reorganized from 9 flat items to 7 items in 3 groups: CREA: Genera, Libreria, Idee PIANIFICA: Calendario, Programmati GESTISCI: Personaggi Removed from primary nav: - Link Affiliati (secondary, move to Settings later) - Social (setup, accessible via Settings) - Commenti (unused, future Pro feature) Other changes: - /content/library route added (replaces /content/archive as primary) - /content/archive kept as fallback route - All links updated to point to /content/library - "Contenuti" renamed to "Genera" - "Pianificazione" renamed to "Calendario" - "Schedulazione" renamed to "Programmati" - "Nuovo piano" button removed from Dashboard - Nav group headers with uppercase labels - end prop on /content to avoid highlighting on /content/library Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -52,6 +52,7 @@ export default function App() {
|
||||
<Route path="/characters/new" element={<CharacterForm />} />
|
||||
<Route path="/characters/:id/edit" element={<CharacterForm />} />
|
||||
<Route path="/content" element={<ContentPage />} />
|
||||
<Route path="/content/library" element={<ContentArchive />} />
|
||||
<Route path="/content/archive" element={<ContentArchive />} />
|
||||
<Route path="/ideas" element={<SavedIdeas />} />
|
||||
<Route path="/affiliates" element={<AffiliateList />} />
|
||||
|
||||
@@ -212,7 +212,7 @@ export default function ContentPage() {
|
||||
<p style={{ fontSize: '0.875rem', color: 'var(--ink-muted)', margin: 0 }}>
|
||||
Definisci un brief editoriale, scegli piattaforma e tipo, poi genera. L'AI terrà conto del tono e dei topic del personaggio selezionato.
|
||||
</p>
|
||||
<Link to="/content/archive" style={{ fontSize: '0.8rem', color: 'var(--accent)', whiteSpace: 'nowrap', textDecoration: 'none', fontWeight: 600 }}>
|
||||
<Link to="/content/library" style={{ fontSize: '0.8rem', color: 'var(--accent)', whiteSpace: 'nowrap', textDecoration: 'none', fontWeight: 600 }}>
|
||||
Libreria →
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
@@ -145,7 +145,6 @@ export default function Dashboard() {
|
||||
<Link to="/content" className="btn-primary">Genera contenuto</Link>
|
||||
<Link to="/editorial" className="btn-outline">Calendario AI</Link>
|
||||
<Link to="/characters/new" className="btn-outline">Nuovo personaggio</Link>
|
||||
<Link to="/plans/new" className="btn-outline">Nuovo piano</Link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -235,7 +234,7 @@ export default function Dashboard() {
|
||||
<div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginBottom: '0.75rem' }}>
|
||||
<span className="editorial-tag">Post recenti</span>
|
||||
<Link to="/content/archive" style={{ fontSize: '0.78rem', color: 'var(--accent)', textDecoration: 'underline', textUnderlineOffset: '3px' }}>
|
||||
<Link to="/content/library" style={{ fontSize: '0.78rem', color: 'var(--accent)', textDecoration: 'underline', textUnderlineOffset: '3px' }}>
|
||||
Vedi tutti
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
@@ -7,14 +7,15 @@ import { useAuth } from '../AuthContext'
|
||||
|
||||
const nav = [
|
||||
{ to: '/', label: 'Dashboard' },
|
||||
{ to: '/characters',label: 'Personaggi' },
|
||||
{ to: '/content', label: 'Contenuti' },
|
||||
{ group: 'Crea' },
|
||||
{ to: '/content', label: 'Genera' },
|
||||
{ to: '/content/library', label: 'Libreria' },
|
||||
{ to: '/ideas', label: 'Idee' },
|
||||
{ to: '/affiliates',label: 'Link Affiliati' },
|
||||
{ to: '/editorial', label: 'Pianificazione' },
|
||||
{ to: '/schedule', label: 'Schedulazione' },
|
||||
{ to: '/social', label: 'Social' },
|
||||
{ to: '/comments', label: 'Commenti' },
|
||||
{ group: 'Pianifica' },
|
||||
{ to: '/editorial', label: 'Calendario' },
|
||||
{ to: '/schedule', label: 'Programmati' },
|
||||
{ group: 'Gestisci' },
|
||||
{ to: '/characters', label: 'Personaggi' },
|
||||
]
|
||||
|
||||
export default function Layout() {
|
||||
@@ -69,16 +70,28 @@ export default function Layout() {
|
||||
</div>
|
||||
|
||||
{/* Nav */}
|
||||
<nav style={{ flex: 1, padding: '0.75rem 0.5rem', overflowY: 'auto' }}>
|
||||
{nav.map(({ to, label }) => (
|
||||
<nav style={{ flex: 1, padding: '0.5rem 0.5rem', overflowY: 'auto' }}>
|
||||
{nav.map((item, idx) => {
|
||||
if (item.group) {
|
||||
return (
|
||||
<p key={`g-${idx}`} style={{
|
||||
fontSize: '0.62rem', fontWeight: 700, letterSpacing: '0.12em',
|
||||
textTransform: 'uppercase', color: 'var(--ink-muted)',
|
||||
padding: '0.75rem 0.875rem 0.25rem', margin: 0,
|
||||
}}>
|
||||
{item.group}
|
||||
</p>
|
||||
)
|
||||
}
|
||||
return (
|
||||
<NavLink
|
||||
key={to}
|
||||
to={to}
|
||||
end={to === '/'}
|
||||
key={item.to}
|
||||
to={item.to}
|
||||
end={item.to === '/' || item.to === '/content'}
|
||||
onClick={() => isMobile && setSidebarOpen(false)}
|
||||
style={({ isActive }) => ({
|
||||
display: 'block',
|
||||
padding: '0.7rem 0.875rem',
|
||||
padding: '0.6rem 0.875rem',
|
||||
fontSize: '0.84rem',
|
||||
fontWeight: isActive ? 600 : 400,
|
||||
color: isActive ? 'var(--accent)' : 'var(--ink-light)',
|
||||
@@ -101,9 +114,10 @@ export default function Layout() {
|
||||
}
|
||||
}}
|
||||
>
|
||||
{label}
|
||||
{item.label}
|
||||
</NavLink>
|
||||
))}
|
||||
)
|
||||
})}
|
||||
</nav>
|
||||
|
||||
{/* User card + logout */}
|
||||
|
||||
Reference in New Issue
Block a user