PageSourceSearch

https://codir.pro/assets/Profile-BsXEFJqn.js

js codir.pro collected 2026-10-02 02:05:56 UTC 3,044 bytes, 1 lines download raw bytes

1import{a as c,r as i,b as d,j as a,L as m,m as r,S as x}from"./index-B0sM48fE.js";import{U as f}from"./user-D79swjNq.js";import{M as p}from"./mail-Bq5DIA9G.js";function j(){const{t}=c(),[e,s]=i.useState(null),[n,o]=i.useState(!0);return i.useEffect(()=>{d.auth.me().then(l=>{s(l),o(!1)})},[]),n?a.jsx("div",{className:"flex items-center justify-center h-64",children:a.jsx(m,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):a.jsxs("div",{children:[a.jsxs(r.div,{initial:{opacity:0,y:-10,filter:"blur(8px) brightness(2)"},animate:{opacity:1,y:0,filter:"blur(0px) brightness(1)"},transition:{duration:.6,ease:[.22,1,.36,1]},className:"mb-10 text-center max-w-xl mx-auto",children:[a.jsx("h1",{className:"font-space font-bold text-3xl md:text-4xl text-white tracking-tight",children:t("profile_title")}),a.jsx("p",{className:"text-white/80 mt-2",children:t("profile_subtitle")})]}),a.jsxs(r.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.1},className:"max-w-xl mx-auto space-y-6",children:[a.jsx("h2",{className:"text-xs font-space font-bold text-white uppercase tracking-[0.25em] mb-4",children:t("profile_section")}),a.jsxs("div",{className:"rounded-2xl border border-border/50 bg-card/80 backdrop-blur-xl p-8",children:[a.jsxs("div",{className:"flex items-center gap-4 mb-8 pb-8 border-b border-border/50",children:[a.jsx("div",{className:"h-16 w-16 rounded-2xl bg-primary/10 flex items-center justify-center",children:a.jsx("span",{className:"font-space font-bold text-2xl text-primary",children:((e==null?void 0:e.full_name)||"U").charAt(0).toUpperCase()})}),a.jsxs("div",{children:[a.jsx("h2",{className:"font-space font-semibold text-xl text-foreground",children:(e==null?void 0:e.full_name)||t("profile_fallback_name")}),a.jsx("p",{className:"text-muted-foreground text-sm",children:e==null?void 0:e.email}),a.jsx("span",{className:"inline-block mt-1 px-2 py-0.5 text-xs font-semibold rounded-full bg-primary/10 text-primary capitalize",children:(e==null?void 0:e.role)==="admin"?t("profile_role_admin"):(e==null?void 0:e.role)==="affiliate"?t("profile_role_affiliate"):t("profile_role_user")})]})]}),a.jsx("div",{className:"space-y-6",children:[{icon:f,label:t("profile_field_fullname"),value:(e==null?void 0:e.full_name)||"—"},{icon:p,label:t("profile_field_email"),value:(e==null?void 0:e.email)||"—"},{icon:x,label:t("profile_field_role"),value:(e==null?void 0:e.role)==="admin"?t("profile_role_admin"):(e==null?void 0:e.role)==="affiliate"?t("profile_role_affiliate"):t("profile_role_user")}].map(l=>a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsx("div",{className:"h-10 w-10 rounded-xl bg-secondary flex items-center justify-center shrink-0",children:a.jsx(l.icon,{className:"h-4 w-4 text-muted-foreground"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wider font-medium",children:l.label}),a.jsx("p",{className:"text-foreground font-medium",children:l.value})]})]},l.label))})]})]})]})}export{j 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.