PageSourceSearch

https://blancdigital.lovable.app/assets/Drive-CVxckpHz.js

js blancdigital.lovable.app collected 2026-10-03 03:26:04 UTC 3,365 bytes, 1 lines download raw bytes

1import{O as u,j as e,aq as h,a4 as j,S as g,C as c,L as f,A as p}from"./index-C5Vzn6xm.js";import{u as N}from"./useClientDrive-DXGvXKgY.js";import{H as v}from"./hard-drive-C14vKRnk.js";import{F as d}from"./folder-open-CifWDQMj.js";function m(a){if(!a)return"0 B";const i=["B","KB","MB","GB","TB"];let t=0,r=a;for(;r>=1024&&t<i.length-1;)r/=1024,t++;return`${r.toFixed(r>=100?0:1)} ${i[t]}`}function S(){const{data:a=[],isLoading:i}=N(),[t,r]=u.useState(""),n=a.filter(s=>s.client_name.toLowerCase().includes(t.toLowerCase())),o=a.reduce((s,l)=>s+Number(l.total_size||0),0),x=a.reduce((s,l)=>s+Number(l.files_count||0),0);return e.jsxs("div",{className:"container mx-auto p-6 space-y-6",children:[e.jsxs("header",{className:"flex items-start justify-between gap-4 flex-wrap",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-12 w-12 rounded-xl bg-primary/10 flex items-center justify-center",children:e.jsx(v,{className:"h-6 w-6 text-primary"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Drive"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Central de mídia por cliente — identidade visual, materiais entregues, anexos."})]})]}),e.jsxs("div",{className:"flex gap-3 text-sm",children:[e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:"text-muted-foreground",children:"Total armazenado"}),e.jsx("div",{className:"font-semibold text-base",children:m(o)})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:"text-muted-foreground",children:"Arquivos"}),e.jsx("div",{className:"font-semibold text-base",children:x})]})]})]}),e.jsxs("div",{className:"relative max-w-md",children:[e.jsx(h,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(j,{placeholder:"Buscar cliente...",value:t,onChange:s=>r(s.target.value),className:"pl-9"})]}),i?e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:Array.from({length:8}).map((s,l)=>e.jsx(g,{className:"h-36 w-full"},l))}):n.length===0?e.jsxs(c,{className:"p-12 text-center text-muted-foreground",children:[e.jsx(d,{className:"h-12 w-12 mx-auto mb-3 opacity-30"}),e.jsx("p",{children:"Nenhum cliente encontrado."})]}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:n.map(s=>e.jsx(f,{to:`/drive/${s.business_client_id}`,className:"block",children:e.jsxs(c,{className:"p-4 hover:border-primary/50 hover:shadow-md transition cursor-pointer h-full",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[s.logo_url?e.jsx("img",{src:s.logo_url,alt:s.client_name,className:"h-10 w-10 rounded-lg object-cover bg-muted"}):e.jsx("div",{className:"h-10 w-10 rounded-lg bg-primary/10 flex items-center justify-center",children:e.jsx(d,{className:"h-5 w-5 text-primary"})}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("div",{className:"font-semibold truncate",children:s.client_name})})]}),e.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(p,{className:"h-3 w-3"}),Number(s.files_count)," arq."]}),e.jsx("span",{children:m(Number(s.total_size))})]})]})},s.business_client_id))})]})}export{S 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.