PageSourceSearch

https://leader-suite.com/assets/SettingsPage-6xA035tX.js

js leader-suite.com collected 2026-10-02 01:34:14 UTC 6,350 bytes, 1 lines download raw bytes

1import{r as g,j as e}from"./tanstack-BSsNbvyX.js";import{fV as v,eb as j,bC as w,bx as y,M as $,fF as A,bO as C,fv as k,fL as p,g8 as E,g2 as S,g6 as L,gq as n,eQ as r,c_ as M,t as o,bu as P,C as I,ao as R,bA as W,ck as _,d8 as B}from"./index-BWm0SmA2.js";import{u as O}from"./useCalendar-D-dTpQRa.js";import{L as c}from"./react-vendor-DDabrWhA.js";import"./dnd-CN6HRQaQ.js";function V(){const{current:s}=v(),[i,m]=g.useState((s==null?void 0:s.name)??""),[a,l]=g.useState(!1);g.useEffect(()=>{m((s==null?void 0:s.name)??"")},[s==null?void 0:s.id,s==null?void 0:s.name]);const d=i.trim(),f=d.length>j,x=d.length===0,u=d===((s==null?void 0:s.name)??""),t=a||x||f||u,N=async()=>{l(!0);try{await k(i),p.success("C'est à jour")}catch(h){const b=h instanceof Error?h.message:"erreur inconnue";p.error(`Quelque chose cloche : ${b}`)}finally{l(!1)}};return s?e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsx(w,{htmlFor:"ws-name",className:"text-sm shrink-0",children:"Nom de votre espace"}),e.jsx(y,{id:"ws-name",value:i,onChange:h=>m(h.target.value),disabled:a,maxLength:j+20,placeholder:"Mon espace",className:"h-11 min-w-[200px] max-w-md flex-1"}),e.jsxs($,{variant:"ghost",size:"sm",className:`h-11 px-4 ${A}`,onClick:N,disabled:t,children:[a&&e.jsx(C,{className:"h-3.5 w-3.5 mr-1.5 animate-spin"}),"Enregistrer"]})]}):null}function D(){E({title:"Paramètres",meta:"Configuration"});const{isAdmin:s}=S(),{accounts:i}=L(),{accounts:m}=O(),a=i.filter(t=>t.status==="connected"||t.status==="syncing").length,l=m.filter(t=>t.status==="connected"||t.status==="syncing").length,d=i.some(t=>t.status==="error"),f=m.some(t=>t.status==="error"),x=d||f,u=a+l;return e.jsxs("div",{className:"max-w-4xl space-y-8",children:[e.jsx(V,{}),e.jsxs("section",{className:"space-y-4",children:[e.jsx("h2",{className:"font-display text-lg font-semibold tracking-[-0.02em]",children:"Personnalisation"}),e.jsxs(c,{to:"/settings/preferences",className:`flex items-center justify-between ${n} p-4 transition-colors hover:bg-secondary ${r}`,children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(M,{className:"mt-0.5 h-4 w-4 text-foreground"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-medium",children:"Mes préférences"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Style de communication, ton des drafts, contraintes de temps et format des tâches."})]})]}),e.jsx(o,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs(c,{to:"/settings/inbox",className:`flex items-center justify-between ${n} p-4 transition-colors hover:bg-secondary ${r}`,children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(P,{className:"mt-0.5 h-4 w-4 text-foreground"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-medium",children:"Règles de la boîte de réception"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Archiver, ranger, analyser — par expéditeur ou par domaine."})]})]}),e.jsx(o,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs(c,{to:"/settings/notifications",className:`flex items-center justify-between ${n} p-4 transition-colors hover:bg-secondary ${r}`,children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(I,{className:"mt-0.5 h-4 w-4 text-foreground"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-medium",children:"Notifications"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Échéances, mails à traiter, veille AO, abonnement."})]})]}),e.jsx(o,{className:"h-4 w-4 text-muted-foreground"})]})]}),e.jsxs("section",{className:"space-y-4",children:[e.jsx("h2",{className:"font-display text-lg font-semibold tracking-[-0.02em]",children:"Votre compte"}),e.jsxs(c,{to:"/settings/abonnement",className:`flex items-center justify-between ${n} p-4 transition-colors hover:bg-secondary ${r}`,children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(R,{className:"mt-0.5 h-4 w-4 text-foreground"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-medium",children:"Abonnement"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Votre plan, votre usage du mois (actions IA et mails) et l'offre Pro."})]})]}),e.jsx(o,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs(c,{to:"/settings/account",className:`flex items-center justify-between ${n} p-4 transition-colors hover:bg-secondary ${r}`,children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(W,{className:"mt-0.5 h-4 w-4 text-foreground"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-medium",children:"Sécurité"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Email, changement de mot de passe."})]})]}),e.jsx(o,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs(c,{to:"/settings/integrations",className:`flex items-center justify-between ${n} p-4 transition-colors hover:bg-secondary ${r}`,children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(_,{className:"mt-0.5 h-4 w-4 text-foreground"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-medium",children:"Intégrations"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:u===0?"Aucune boîte mail ni calendrier connecté":`${a} boîte${a>
11?"s":""} mail · ${l} calendrier${l>1?"s":""}${x?" · erreur":""}`})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[u>0&&!x&&e.jsx("span",{className:"h-2 w-2 rounded-full bg-success"}),x&&e.jsx("span",{className:"h-2 w-2 rounded-full bg-destructive"}),e.jsx(o,{className:"h-4 w-4 text-muted-foreground"})]})]})]}),s&&e.jsxs("section",{className:"space-y-4",children:[e.jsx("h2",{className:"font-display text-lg font-semibold tracking-[-0.02em]",children:"Administration"}),e.jsxs(c,{to:"/admin",className:`flex items-center justify-between ${n} p-4 transition-colors hover:bg-secondary ${r}`,children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(B,{className:"mt-0.5 h-4 w-4 text-foreground"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-medium",children:"Abonnements & usage"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Les plans et l'usage IA de tous les workspaces."})]})]}),e.jsx(o,{className:"h-4 w-4 text-muted-foreground"})]})]})]})}export{D 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.