PageSourceSearch

https://codir.pro/assets/DashboardLayout-B6P8K2ru.js

js codir.pro collected 2026-09-24 15:10:20 UTC 5,510 bytes, 11 lines download raw bytes

1import{c as x,p,u as g,a as f,r as c,b as o,f as v,q as y,s as j,j as a,v as d,m as u,d as h,g as m,w,N,O as _}from"./index-Dsd8GAzx.js";import{U as k}from"./user-C86RskUi.js";import{U as C}from"./users-Oahu2G-8.js";import{M as L}from"./mail-Biq8YZoA.js";/**
2 * @license lucide-react v0.475.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const I=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],z=x("LayoutDashboard",I);/**
7 * @license lucide-react v0.475.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const A=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],D=x("Settings",A);function O(){const i=p(),l=g(),{t:e}=f(),[s,b]=c.useState(null);c.useEffect(()=>{o.auth.me().then(b).catch(()=>{})},[]);const r=[...[{to:"/app",icon:z,label:e("dashnav_services")},{to:"/app/profile",icon:k,label:e("dashnav_profile")},{to:"/app/settings",icon:D,label:e("dashnav_settings")},{to:"/app/subscription",icon:v,label:e("dashnav_subscription")}],...(s==null?void 0:s.role)==="affiliate"||(s==null?void 0:s.role)==="admin"?[{to:"/app/affiliate",icon:C,label:e("dashnav_affiliate")}]:[],...(s==null?void 0:s.role)==="admin"?[{to:"/app/admin/analytics",icon:y,label:e("dashnav_analytics")},{to:"/app/admin/affiliates",icon:j,label:e("dashnav_admin")},{to:"/app/admin/contact",icon:L,label:e("dashnav_messages")}]:[]];return a.jsxs(a.Fragment,{children:[a.jsx("nav",{className:"hidden md:flex fixed top-4 left-0 right-0 z-50 justify-center px-4",children:a.jsxs("div",{className:"flex items-center gap-1 sm:gap-2 bg-[#1a1a1a] border border-white/10 rounded-full px-3 sm:px-5 py-2 shadow-2xl backdrop-blur-xl",children:[a.jsxs("button",{onClick:()=>l("/"),className:"flex items-center gap-2 mr-2 sm:mr-4",children:[a.jsx("img",{src:"https://media.base44.com/images/public/69d3bbd071c32e8e2cd61c44/ba76294fa_CodirLogo.png",alt:"CODIR",className:"h-7 w-auto"}),a.jsx("span",{className:"font-space font-bold text-white text-sm hidden sm:block",children:"CODIR"})]}),r.map(t=>{const n=i.pathname===t.to;return a.jsxs(d,{to:t.to,className:h("relative text-sm transition-all duration-300 px-2 sm:px-3 py-1 rounded-full font-medium flex items-center gap-1.5 hover:scale-105 active:scale-95",n?"bg-white text-black shadow-[0_0_20px_-2px_rgba(255,255,255,0.5)]":"text-white/70 hover:text-white hover:bg-white/10 hover:brightness-125"),children:[n&&a.jsx(u.span,{layoutId:"activeNavGlow",className:"absolute inset-0 rounded-full bg-white -z-10",transition:{type:"spring",stiffness:400,damping:30}}),a.jsx(t.icon,{className:"h-3.5 w-3.5 relative z-10"}),a.jsx("span",{className:"relative z-10",children:t.label})]},t.to)}),a.jsx("div",{className:"w-px h-5 bg-white/10 mx-1"}),a.jsxs("button",{onClick:()=>o.auth.logout(),className:"text-sm text-white/70 hover:text-white px-2 sm:px-3 py-1 rounded-full hover:bg-white/10 font-medium transition-colors flex items-center gap-1.5",children:[a.jsx(m,{className:"h-3.5 w-3.5"}),a.jsx("span",{className:"hidden sm:block",children:e("dashnav_logout")})]})]})}),a.jsxs("nav",{className:"md:hidden fixed bottom-0 left-0 right-0 z-50 bg-black border-t border-white/5 flex items-center justify-around px-2 h-16",children:[r.map(t=>{const n=i.pathname===t.to;return a.jsxs(d,{to:t.to,className:h("flex flex-col items-center gap-1 px-3 py-2 rounded-lg text-xs font-medium transition-all duration-300 active:scale-90",n?"text-primary scale-110 drop-shadow-[0_0_8px_rgba(99,91,255,0.6)]":"text-white/40 hover:text-white/80"),children:[a.jsx(t.icon,{className:"h-5 w-5"}),a.jsx("span",{children:t.label})]},t.to)}),a.jsxs("button",{onClick:()=>o.auth.logout(),className:"flex flex-col items-center gap-1 px-3 py-2 rounded-lg text-xs font-medium text-white/40",children:[a.jsx(m,{className:"h-5 w-5"}),a.jsx("span",{children:e("dashnav_logout")})]})]})]})}function q(){const i=p(),{isAuthenticated:l,isLoadingAuth:e}=w();return e?null:l?a.jsxs("div",{className:"min-h-screen bg-background",style:{backgroundImage:"radial-gradient(ellipse at 20% 0%, hsl(245 60% 18% / 0.55), transparent 55%), radial-gradient(ellipse at 80% 100%, hsl(185 60% 20% / 0.35), transparent 55%)",backgroundAttachment:"fixed",scrollbarGutter:"stable"},children:[a.jsx(O,{}),a.jsx("main",{className:"min-h-screen pt-24 md:pt-28 pb-20 md:pb-12",children:a.jsx("div",{className:"max-w-7xl mx-auto px-4 md:px-8",children:a.jsx(u.div,{initial:{opacity:0,y:10}
11,animate:{opacity:1,y:0},transition:{duration:.25,ease:[.22,1,.36,1]},children:a.jsx(_,{})},i.pathname)})})]}):a.jsx(N,{to:"/signin",replace:!0,state:{from:i.pathname}})}export{q 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.