From 2f0df9c92c0ecabf81d4eed1ab58eb2de0172d58 Mon Sep 17 00:00:00 2001 From: AdrianoDev Date: Sat, 25 Jul 2026 17:21:32 +0200 Subject: [PATCH] Link alla gestione utenti nella sidebar del Biohacking Co-Authored-By: Claude Fable 5 --- src/layouts/Campus.astro | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/layouts/Campus.astro b/src/layouts/Campus.astro index 9e6bfb8..3147897 100644 --- a/src/layouts/Campus.astro +++ b/src/layouts/Campus.astro @@ -17,6 +17,8 @@ interface Props { currentLesson?: string; } const { title, nav, currentArea, currentLesson } = Astro.props; +// Solo l'admin gestisce gli utenti: dalla sezione ci arriva senza passare dal pannello. +const isAdmin = Astro.locals.user?.role === 'admin'; --- @@ -64,7 +66,10 @@ const { title, nav, currentArea, currentLesson } = Astro.props; ))} - Esci +
+ {isAdmin && Gestione utenti} + Esci +
@@ -103,9 +108,11 @@ const { title, nav, currentArea, currentLesson } = Astro.props; .cp-chapters ul li.on a { color: #fff; background: rgba(184,169,140,.22); } .cp-label { font-family: var(--font-heading); font-size: .68rem; letter-spacing: .06em; color: var(--c-accent); } - .cp-logout { display: inline-block; margin-top: 30px; font-size: .78rem; letter-spacing: .1em; - text-transform: uppercase; color: #8d8379; text-decoration: none; } - .cp-logout:hover { color: #fff; } + .cp-foot { display: flex; flex-direction: column; gap: 10px; margin-top: 30px; + padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); } + .cp-foot a { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; + color: #8d8379; text-decoration: none; } + .cp-foot a:hover { color: #fff; } /* --- contenuto --- */ .cp-main { flex: 1; min-width: 0; max-width: 920px; margin: 0 auto; padding: 56px 44px 100px; }