PageSourceSearch

https://lodj.ai/assets/AdminLayout-D2nKnwsU.js

js lodj.ai collected 2026-10-05 15:38:28 UTC 9,891 bytes, 4 lines download raw bytes

1import{r as d,u as E,c as L,j as e,L as k,O as S}from"./vendor-ByiVU45v.js";import{O as R,q as A,c as O,Q as r}from"./admin_modules-GunHHZnp.js";import{i as P}from"./index-BoSxnZmd.js";import"./games-vAEJyDs5.js";import"./firebase-CCD8Ax5Y.js";const s=({to:l,icon:f,label:n,active:c,onClick:a,isAction:o})=>e.jsxs(k,{to:l,onClick:a,className:`
2      flex items-center gap-4 w-full px-5 py-4 rounded-2xl transition-all duration-150 select-none outline-none relative
3      ${o?"bg-accent text-black font-black mb-6 shadow-lg hover:scale-[1.02] active:scale-95":c?"bg-white/10 text-white font-bold shadow-md border border-white/5":"text-gray-400 hover:text-white hover:bg-white/5 active:bg-white/10"}
4    `,children:[e.jsx("div",{className:"w-6 flex justify-center shrink-0",children:e.jsx("i",{className:`${f} text-lg`})}),e.jsx("span",{className:"text-[13px] uppercase tracking-wider font-black truncate",children:n}),c&&!o&&e.jsx("div",{className:"ml-auto w-1.5 h-1.5 rounded-full bg-accent shadow-[0_0_10px_#f5bb0c]"})]}),N=60*60*1e3,z=60*1e3,F=()=>{const[l,f]=d.useState(window.innerWidth>=1024),n=E(),c=L(),{user:a,isLoading:o,logout:y}=R(),{showToast:_}=A(),[T,w]=d.useState(!1),m=d.useRef(null),x=d.useRef(null),h=()=>{m.current&&window.clearTimeout(m.current),x.current&&window.clearTimeout(x.current),w(!1),x.current=window.setTimeout(()=>{w(!0)},N-z),m.current=window.setTimeout(()=>{b("Session expirée pour inactivité prolongée.")},N)},b=i=>{y(),i&&_(i,"info"),c("/admin/login")};if(d.useEffect(()=>{!o&&!a&&c("/admin/login")},[a,o,c]),d.useEffect(()=>{const i=["mousedown","mousemove","keypress","scroll","touchstart"],v=()=>h();return i.forEach(g=>document.addEventListener(g,v)),h(),()=>{i.forEach(g=>document.removeEventListener(g,v)),m.current&&window.clearTimeout(m.current),x.current&&window.clearTimeout(x.current)}},[a]),o)return e.jsx("div",{className:"min-h-screen bg-[#0a0c10] flex items-center justify-center",children:e.jsx(P,{})});if(!a)return null;const p=a.role,t=i=>n.pathname===i,u=n.pathname.includes("/home-builder")||n.pathname.includes("/design")||n.pathname.includes("/poster-studio"),j=p==="journalist"||p==="journalist_senior";return e.jsxs("div",{className:"flex h-screen bg-[#050505] text-white font-sans overflow-hidden",children:[T&&e.jsx("div",{className:"fixed inset-0 z-[10000] bg-black/80 backdrop-blur-md flex items-center justify-center p-4",children:e.jsxs("div",{className:"bg-[#1a1d24] border border-white/10 rounded-3xl p-8 max-w-sm text-center shadow-2xl",children:[e.jsx("div",{className:"w-16 h-16 bg-accent/10 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx("i",{className:"fas fa-user-clock text-3xl text-accent"})}),e.jsx("h3",{className:"text-xl font-bold mb-2",children:"Session inactive"}),e.jsx("p",{className:"text-gray-400 text-sm mb-6",children:"Pour votre sécurité, vous allez être déconnecté dans moins d'une minute."}),e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("button",{onClick:h,className:"w-full py-3 bg-accent text-black font-black uppercase text-xs tracking-widest rounded-xl shadow-lg hover:bg-yellow-400",children:"Rester connecté"}),e.jsx("button",{onClick:()=>b(),className:"w-full py-3 bg-white/5 text-gray-400 hover:text-white rounded-xl text-xs font-bold transition-colors",children:"Me déconnecter"})]})]})}),l&&(window.innerWidth<1024||u)&&e.jsx("div",{className:"fixed inset-0 bg-black/80 backdrop-blur-sm z-40",onClick:()=>f(!1)}),e.jsxs("aside",{className:`flex-shrink-0 w-72 bg-[#0f1115] border-r border-white/5 flex flex-col transition-transform duration-500 ease-[cubic-bezier(0.16,1,0.3,1)] h-full fixed ${u?"z-50":"lg:relative z-10"} ${l?"translate-x-0":"-translate-x-full"} ${u?"":"lg:translate-x-0"} shadow-2xl`,children:[e.jsxs("div",{className:"p-8 flex items-center justify-between border-b border-white/5 bg-black/20",children:[e.jsx("img",{src:O,alt:"LODJ Admin",className:"h-7 opacity-90"}),e.jsx("div",{className:`px-2 py-0.5 rounded text-[8px] font-black uppercase border ${a.scope==="fr"?"border-blue-500 text-blue-400":a.scope==="ar"?"border-green-500 text-green-400":"border-gray-500 text-gray-500"}`,children:a.scope==="global"?"NETWORK":a.scope})]}),e.jsxs("nav",{className:"flex-grow p-5 space-y-1 overflow-y-auto no-scrollbar relative",children:[e.jsx(s,{to:"/admin/articles/new",icon:"fas fa-plus",label:"Rédiger",active:t("/admin/articles/new"),isAction:!0}
4),!j&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-[10px] font-black text-gray-700 uppercase tracking-[0.3em] px-5 mb-3 mt-8",children:"Pilotage"}),e.jsx(s,{to:"/admin/dashboard",icon:"fas fa-chart-line",label:"Dashboard",active:t("/admin/dashboard")}),e.jsx(s,{to:"/admin/ailab",icon:"fas fa-flask",label:"Laboratoire IA",active:t("/admin/ailab")}),e.jsx(s,{to:"/admin/poster-studio",icon:"fas fa-wand-magic-sparkles",label:"Poster Studio",active:t("/admin/poster-studio")})]}),e.jsx("div",{className:"text-[10px] font-black text-gray-700 uppercase tracking-[0.3em] px-5 mb-3 mt-8",children:"Rédaction"}),e.jsx(s,{to:"/admin/pipeline",icon:"fas fa-conveyor-belt-alt",label:"Content Pipeline",active:t("/admin/pipeline")}),e.jsx(s,{to:"/admin/articles",icon:"fas fa-newspaper",label:"Gestion Articles",active:n.pathname.startsWith("/admin/articles")&&!t("/admin/articles/new")}),r(a,"manage_content")&&e.jsx(s,{to:"/admin/feeds",icon:"fas fa-diagram-project",label:"Flux & Pages",active:t("/admin/feeds")}),e.jsx(s,{to:"/admin/media",icon:"fas fa-images",label:"Médiathèque",active:t("/admin/media")}),r(a,"manage_design")&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-[10px] font-black text-gray-700 uppercase tracking-[0.3em] px-5 mb-3 mt-8",children:"Design"}),e.jsx(s,{to:"/admin/home-builder",icon:"fas fa-shapes",label:"Home Builder",active:t("/admin/home-builder")}),e.jsx(s,{to:"/admin/design",icon:"fas fa-palette",label:"Thème & UI",active:t("/admin/design")})]}),!j&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-[10px] font-black text-gray-700 uppercase tracking-[0.3em] px-5 mb-3 mt-8",children:"Engagement"}),r(a,"manage_content")&&e.jsx(s,{to:"/admin/newsletter",icon:"fas fa-envelope-open-text",label:"Newsletters",active:t("/admin/newsletter")}),r(a,"manage_ads")&&e.jsx(s,{to:"/admin/ads",icon:"fas fa-ad",label:"Publicité Pro",active:t("/admin/ads")}),r(a,"manage_notifications")&&e.jsx(s,{to:"/admin/notifications",icon:"fas fa-bell",label:"Alertes Push",active:t("/admin/notifications")}),r(a,"manage_polls")&&e.jsx(s,{to:"/admin/polls",icon:"fas fa-poll-h",label:"Sondages",active:t("/admin/polls")}),e.jsx(s,{to:"/admin/contributions",icon:"fas fa-camera-retro",label:"Reporters UGC",active:t("/admin/contributions")}),e.jsx(s,{to:"/admin/comments",icon:"fas fa-comments",label:"Modération",active:t("/admin/comments")})]}),r(a,"manage_users")&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-[10px] font-black text-gray-700 uppercase tracking-[0.3em] px-5 mb-3 mt-8",children:"Système"}),e.jsx(s,{to:"/admin/users",icon:"fas fa-users-gear",label:"Équipe & Droits",active:t("/admin/users")}),e.jsx(s,{to:"/admin/settings",icon:"fas fa-shield-halved",label:"Paramètres",active:t("/admin/settings")})]})]}),e.jsx("div",{className:"p-6 border-t border-white/5 bg-black/20",children:e.jsxs("div",{className:"flex items-center gap-4 p-2 rounded-xl",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-gray-800 flex items-center justify-center font-bold border border-white/10 overflow-hidden shrink-0 shadow-lg",children:a.avatar?e.jsx("img",{src:a.avatar,className:"w-full h-full object-cover"}):a.name.charAt(0)}),e.jsxs("div",{className:"flex-grow min-w-0",children:[e.jsx("p",{className:"text-sm font-black truncate text-white uppercase italic tracking-tight",children:a.name}),e.jsx("p",{className:"text-[9px] text-accent uppercase font-black truncate",children:p.replace("_"," ")})]}),e.jsx("button",{onClick:()=>b(),className:"w-10 h-10 rounded-xl bg-red-900/10 text-red-500 hover:bg-red-600 hover:text-white transition-all flex items-center justify-center shadow-lg",children:e.jsx("i",{className:"fas fa-power-off"})})]})})]}),e.jsxs("main",{className:"flex-grow flex flex-col h-full overflow-hidden relative z-1",children:[e.jsxs("header",{className:"h-20 bg-[#0f1115]/80 backdrop-blur-md border-b border-white/5 flex items-center justify-between px-8 shrink-0 relative z-5",children:[e.jsx("button",{onClick:i=>{i.stopPropagation(),f(!l)},className:`${u?"":"lg:hidden"} text-gray-400 w-12 h-12 flex items-center justify-center hover:text-white bg-white/5 rounded-2xl border border-white/10`,children:e.jsx("i",{className:`fas ${l?"fa-times":"fa-bars"} text-xl`})}),e.jsxs("div",{className:"hidden md:flex items-center gap-4 text-[10px] font-black text-gray-500 uppercase tracking-widest",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-green-500 shadow-[0_0_10px_#22c55e]"}),"Node Élite Actif"]}),e.jsx("span",{className:"w-px h-3 bg-white/10"}),e.jsx("span",{children:new Date().toLocaleDateString("en-GB",{weekday:"long",day:"numeric",month:"long"})})]}),e.jsx("div",{className:"flex items-center gap-4",children:e.jsxs(k,{to:"/en",target:"_blank",rel:"noopener noreferrer",className:"px-6 py-3 rounded-xl bg-white/5 border border-white/10 text-[9px] font-black uppercase tracking-widest text-accent hover:bg-accent hover:text-black transition-all flex items-center gap-3 shadow-lg",children:["View Site ",e.jsx("i",{className:"fas fa-external-link-alt text-[10px]"})]})})]}),e.jsx("div",{className:`flex-grow overflow-y-auto ${t("/admin/home-builder")||t("/admin/design")?"":"p-6 lg:p-12"} bg-[#050505] custom-scrollbar relative z-1`,children:e.jsx("div",{className:t("/admin/home-builder")||t("/admin/design")?"h-full":"max-w-[1400px] mx-auto",children:e.jsx(S,{})})})]})]})};export{F as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.