PageSourceSearch

https://datahub-pro-production.up.railway.app/assets/ClientPortal-Dqx5Yq3-.js

js datahub-pro-production.up.railway.app collected 2026-10-03 12:11:56 UTC 5,781 bytes, 6 lines download raw bytes

1import{q as w,m as $,r as c,s as z,j as e,S as p,F as E,L as W,p as A,t as D}from"./index-BACUqBz4.js";import{u as L}from"./useBrandDocument-DBWYb0D2.js";import{E as C}from"./EmptyState-CRi2jFBw.js";/**
2 * @license lucide-react v0.383.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 R=w("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),B="var(--color-violet-500)",m={minHeight:"100vh",background:"var(--bg-canvas)",color:"var(--fg-primary)",fontFamily:"var(--type-family-sans)"},n={maxWidth:1e3,margin:"0 auto",padding:"var(--space-7) var(--space-6)"};function H(){var b,f,j,k,T;const{token:h}=$(),[r,S]=c.useState(null),[g,_]=c.useState(""),l=(r==null?void 0:r.branding)||{},v=((b=r==null?void 0:r.space)==null?void 0:b.client_name)||((f=r==null?void 0:r.space)==null?void 0:f.name)||"";if(L(l.company_name?`${v?v+" · ":""}${l.company_name}`:"",l.logo_url||"",!!r),c.useEffect(()=>{z.get(h).then(a=>S(a.data)).catch(a=>{var i;return _(((i=a==null?void 0:a.response)==null?void 0:i.status)===404?"This portal link is not active.":"Could not load this portal.")})},[h]),g)return e.jsx("div",{style:m,children:e.jsx("div",{style:{...n,paddingTop:"var(--space-20)"},children:e.jsx(C,{icon:R,tone:"amber",category:"home",title:"Portal unavailable",description:g})})});if(!r)return e.jsx("div",{style:m,children:e.jsxs("div",{style:{...n,paddingTop:"var(--space-10)"},children:[e.jsx(p,{width:"42%",height:28,style:{marginBottom:"var(--space-3)"}}),e.jsx(p,{width:"60%",height:16,style:{marginBottom:"var(--space-8)"}}),e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(280px, 1fr))",gap:"var(--space-4)"},children:[0,1,2].map(a=>e.jsx(p.Card,{height:148},a))})]})});const s=((j=r.branding)==null?void 0:j.primary_color)||B,t=((k=r.branding)==null?void 0:k.company_name)||"",y=(T=r.branding)==null?void 0:T.logo_url,d=r.space||{},x=(r.dashboards||[]).filter(a=>a.is_public&&a.share_token),u=`color-mix(in srgb, ${s} 12%, transparent)`;return e.jsxs("div",{style:{...m,"--gradient-home":`linear-gradient(135deg, ${s} 0%, ${s} 100%)`,"--gradient-brand-soft":`linear-gradient(135deg, ${u} 0%, transparent 100%)`},children:[e.jsx("div",{style:{borderTop:`4px solid ${s}`,background:"var(--bg-raised)",borderBottom:"1px solid var(--border-subtle)"},children:e.jsxs("div",{style:{...n,padding:"var(--space-5) var(--space-6)",display:"flex",alignItems:"center",gap:"var(--space-4)",flexWrap:"wrap"},children:[y?e.jsx("img",{src:y,alt:t||"logo",style:{height:44,width:"auto"}}):e.jsx("div",{style:{height:44,minWidth:44,borderRadius:"var(--r-md, 10
6px)",background:s,color:"var(--fg-inverse)",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:800,fontSize:"var(--t-lg, 1.1rem)",padding:"0 var(--space-3)"},children:(t||d.name||"R")[0]}),e.jsxs("div",{style:{lineHeight:1.2},children:[t&&e.jsx("div",{style:{fontWeight:800,color:"var(--fg-primary)",fontSize:"var(--t-md, 0.95rem)"},children:t}),e.jsx("div",{style:{color:"var(--fg-secondary)",fontSize:"var(--t-sm, 0.85rem)"},children:"Client reporting portal"})]})]})}),e.jsxs("div",{style:n,children:[e.jsx("h1",{className:"v3-page__title",style:{margin:"0 0 var(--space-1)"},children:d.client_name||d.name}),e.jsxs("p",{style:{color:"var(--fg-secondary)",fontSize:"var(--t-md, 0.95rem)",margin:"0 0 var(--space-6)"},children:["Your live dashboards",t?`, prepared by ${t}`:"",". These update automatically — bookmark this page."]}),x.length===0?e.jsx(C,{icon:E,category:"home",title:"No dashboards shared yet",description:t?`${t} has not published a dashboard to this portal yet. Check back soon — new boards appear here automatically.`:"No dashboards have been shared here yet. Check back soon — new boards appear here automatically."}):e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(280px, 1fr))",gap:"var(--space-4)"},children:x.map((a,i)=>e.jsx(W,{to:`/share/${a.share_token}`,style:{textDecoration:"none"},children:e.jsxs("div",{style:{background:"var(--bg-raised)",border:"1px solid var(--border-subtle)",borderRadius:"var(--r-lg, 14px)",padding:"var(--space-5)",height:"100%",boxShadow:"var(--elev-1)",transition:"box-shadow 150ms var(--motion-ease-out-quart), transform 150ms var(--motion-ease-out-quart), border-color 150ms ease",display:"flex",flexDirection:"column",gap:"var(--space-2)"},onMouseEnter:o=>{o.currentTarget.style.boxShadow="var(--elev-3)",o.currentTarget.style.transform="translateY(-2px)",o.currentTarget.style.borderColor=s},onMouseLeave:o=>{o.currentTarget.style.boxShadow="var(--elev-1)",o.currentTarget.style.transform="none",o.currentTarget.style.borderColor="var(--border-subtle)"},children:[e.jsx("div",{style:{width:38,height:38,borderRadius:"var(--r-md, 10
6px)",background:u,color:s,display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(A,{size:19,strokeWidth:2.2})}),e.jsx("div",{style:{fontWeight:800,color:"var(--fg-primary)",fontSize:"var(--t-md, 0.95rem)"},children:a.name}),a.description&&e.jsx("div",{style:{color:"var(--fg-secondary)",fontSize:"var(--t-sm, 0.85rem)",lineHeight:1.5},children:a.description}),e.jsxs("div",{style:{marginTop:"auto",paddingTop:"var(--space-2)",color:s,fontWeight:600,fontSize:"var(--t-sm, 0.85rem)",display:"inline-flex",alignItems:"center",gap:"var(--space-1)"},children:["Open dashboard ",e.jsx(D,{size:14,strokeWidth:2.4})]})]})},i))})]}),e.jsx("div",{style:{...n,padding:"var(--space-2) var(--space-6) var(--space-10)",color:"var(--fg-tertiary)",fontSize:"var(--t-xs, 0.75rem)"},children:t?`© ${t}`:""})]})}export{H 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.