@remit/web-client-dist 0.0.15 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{ComposeBody-cbdfcKhF.js → ComposeBody-Dxf7Xcn6.js} +1 -1
- package/assets/{ErrorState-DHyHWF2q.js → ErrorState-DTbu9FBO.js} +1 -1
- package/assets/{OnboardingWizard-DPMyUJqa.js → OnboardingWizard-z9T48972.js} +1 -1
- package/assets/{account-form-helpers-B7NczTLd.js → account-form-helpers-CBNs1CuK.js} +1 -1
- package/assets/accounts-C3fO3ByV.js +1 -0
- package/assets/{advanced-CgE2TR5F.js → advanced-BOw3cO4L.js} +1 -1
- package/assets/{appearance-BNojqeC4.js → appearance-BDf8BjWx.js} +1 -1
- package/assets/{avatar-BZ7nuEl-.js → avatar-CmNpdeZG.js} +1 -1
- package/assets/{browser-ponyfill-DFKGDBM2.js → browser-ponyfill-RFt62ULJ.js} +1 -1
- package/assets/{filter-status-CFRLuZFE.js → filter-status-4UYnt5_2.js} +1 -1
- package/assets/{filters-DrOwFh0y.js → filters-BT9p3-lN.js} +1 -1
- package/assets/{flagged-ws2tRi-I.js → flagged-Q2Lwoy7o.js} +1 -1
- package/assets/{folders-Cq4G7JWP.js → folders-D8JMfNoj.js} +1 -1
- package/assets/{index-DmHlZDE_.css → index-9Uw_PSW4.css} +1 -1
- package/assets/{index-BvnsSipC.js → index-BJoSTpkV.js} +60 -60
- package/assets/index-Dc5rQJ-_.js +1 -0
- package/assets/{index-CrgKAEgu.js → index-UBVwsOGx.js} +1 -1
- package/assets/{kbd--xScUofF.js → kbd-Cqt9oWri.js} +1 -1
- package/assets/mail-DhKGYHPd.js +112 -0
- package/assets/onboarding-BQuo7fLE.js +1 -0
- package/assets/{select-Bc2hq36R.js → select-DM0DMg2t.js} +1 -1
- package/assets/{send-CPh7ED6f.js → send-D3NtGfTI.js} +1 -1
- package/assets/{senders-BhmaTgvw.js → senders-B1hXmpDl.js} +1 -1
- package/assets/settings-DhsvFL1a.js +1 -0
- package/assets/{settings-screen-BWzRlxGH.js → settings-screen-DhBh2Lb0.js} +1 -1
- package/assets/{star-Czodp6pp.js → star-XmNKmgmr.js} +1 -1
- package/assets/{suggested-vips-CS2Yt0kc.js → suggested-vips-0jjDeWy0.js} +1 -1
- package/assets/{trash-2-B9g19Y70.js → trash-2-DfcQ4G5V.js} +1 -1
- package/assets/{useDebouncedValue-DSczIzgv.js → useDebouncedValue-CzuKj07y.js} +1 -1
- package/assets/{useMutation-CC4odMM8.js → useMutation-CztUJa3L.js} +1 -1
- package/assets/{useSignature-BLfV4NUM.js → useSignature-CaL30Llq.js} +1 -1
- package/index.html +2 -2
- package/package.json +1 -1
- package/assets/accounts-DqgX-SK1.js +0 -1
- package/assets/index-BpZF0dvL.js +0 -1
- package/assets/mail-D2UmLgVS.js +0 -112
- package/assets/onboarding-DwW4fG3F.js +0 -1
- package/assets/settings-C7Z4tbR0.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,I,O as A,r as j,
|
|
1
|
+
import{j as e,I,O as A,r as j,k as C,B as E,Z as k,a2 as v,a8 as L,bd as R,be as T,y as M,ag as P,a$ as _,bp as z,aj as w,bq as F,l as D}from"./index-BJoSTpkV.js";import{a as $,S as B,A as Q,M as q,F as G}from"./send-D3NtGfTI.js";import{T as H}from"./trash-2-DfcQ4G5V.js";import{S as K}from"./star-XmNKmgmr.js";import{S as V,C as Z}from"./select-DM0DMg2t.js";import{S as J}from"./settings-screen-DhBh2Lb0.js";import{u as N}from"./useMutation-CztUJa3L.js";import{E as y}from"./ErrorState-DTbu9FBO.js";import{C as U,N as W}from"./folder-roles-XnseeyyD.js";import"./avatar-CmNpdeZG.js";const X={inbox:"Inbox",drafts:"Drafts",sent:"Sent",archive:"Archive",junk:"Spam",trash:"Trash",flagged:"Starred",all:"All Mail"};function Y(s){return X[s]}function S(s){const r=s.split("/");return r[r.length-1]||s}function ee(s){return s==="inbox"?e.jsx(I,{className:"size-4"}):s==="drafts"?e.jsx($,{className:"size-4"}):s==="sent"?e.jsx(B,{className:"size-4"}):s==="archive"?e.jsx(Q,{className:"size-4"}):s==="junk"?e.jsx(A,{className:"size-4"}):s==="trash"?e.jsx(H,{className:"size-4"}):s==="flagged"?e.jsx(K,{className:"size-4"}):e.jsx(q,{className:"size-4"})}const se=["inbox","drafts","sent","archive","junk","trash"],x="";function ae(s){const r=s.messageCount===1?"msg":"msgs";return`${S(s.providerPath)} · ${s.messageCount} ${r}`}function te({role:s,folders:r,appointedId:o,displayName:l,onAppoint:d,onRename:u}){const[c,m]=j.useState(l),a=r.find(i=>i.mailboxId===o)??null,t=Y(s),p=a!=null&&c.trim()!==l.trim();return e.jsxs("div",{className:"flex flex-col gap-1 border-b border-line px-row-inset py-2.5 last:border-b-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"flex w-28 shrink-0 items-center gap-2 text-sm font-medium text-fg",children:[ee(s),t]}),e.jsxs(V,{className:"w-56 shrink-0",value:o??x,"aria-label":`Folder for ${t}`,onChange:i=>d(s,i.target.value===x?null:i.target.value),children:[e.jsx("option",{value:x,children:"None"}),r.map(i=>e.jsx("option",{value:i.mailboxId,children:ae(i)},i.mailboxId))]}),a&&e.jsxs(e.Fragment,{children:[e.jsx(C,{className:"flex-1",value:c,placeholder:t,"aria-label":`Display name for ${t}`,onChange:i=>m(i.target.value)}),p&&e.jsx(E,{variant:"ghost",size:"sm",className:"shrink-0",icon:e.jsx(Z,{className:"size-4"}),"aria-label":"Save display name",onClick:()=>u(a.mailboxId,c)})]})]}),a&&e.jsxs("span",{className:"truncate pl-[7.5rem] text-2xs text-fg-subtle",title:a.providerPath,children:[a.providerPath," · ",a.messageCount," ",a.messageCount===1?"message":"messages"]})]})}function re({accountEmail:s,folders:r,appointments:o,displayNames:l={},onAppoint:d,onRename:u}){const c=new Set(Object.values(o).filter(a=>a!=null)),m=r.filter(a=>!c.has(a.mailboxId));return e.jsxs("section",{className:"space-y-3",children:[e.jsxs("header",{className:"space-y-1",children:[e.jsxs("h2",{className:"text-sm font-semibold text-fg",children:["Folder roles — ",s]}),e.jsx("p",{className:"text-xs text-fg-muted",children:"Each role points to one folder. Pick the folder that holds the mail — the counts help you tell real folders from empty look-alikes. Appointing a folder here removes it from any other role."})]}),e.jsx("div",{className:"rounded-sm border border-line bg-surface",children:se.map(a=>{const t=o[a]??null;return e.jsx(te,{role:a,folders:r,appointedId:t,displayName:t?l[t]??"":"",onAppoint:d,onRename:u},a)})}),m.length>0&&e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("h3",{className:"text-xs font-medium text-fg-muted",children:"Other folders"}),e.jsx("ul",{className:"rounded-sm border border-line bg-surface",children:m.map(a=>e.jsxs("li",{className:"flex items-center gap-2 border-b border-line px-row-inset py-2 text-sm text-fg last:border-b-0",children:[e.jsx(G,{className:"size-4 shrink-0 text-fg-subtle"}),e.jsx("span",{className:"truncate",children:S(a.providerPath)}),e.jsxs("span",{className:"ml-auto shrink-0 text-2xs text-fg-subtle",children:[a.messageCount," ",a.messageCount===1?"message":"messages"]})]},a.mailboxId))})]})]})}const ne=e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{children:"Each canonical role — Inbox, Drafts, Sent, Archive, Spam, Trash — points at one of your account's real folders. Pick the one that actually holds the mail; the message counts tell real folders from empty look-alikes."}),e.jsx("p",{children:`Appointing a folder to a role here doesn't touch any other role, and doesn't move or rename anything on the server — it just tells Remit which folder to treat as e.g. "Drafts" everywhere (sidebar, unread badges, the compose flow).`}),e.jsxs("p",{children:[e.jsx("strong",{className:"text-fg",children:"Display name"})," renames the appointed folder for the sidebar. Leave it blank to use the role's canonical name."]})]});function oe({account:s}){const r=M(),o=s.accountId,{data:l,isPending:d,isError:u,error:c,refetch:m}=v(P({path:{accountId:o}})),a=N({...z(),onSuccess:()=>{r.invalidateQueries({queryKey:_()})}}),t=N({...F(),onSuccess:()=>{r.invalidateQueries({queryKey:w({path:{accountId:o}})})}}),p=(n,h)=>{a.mutate({path:{accountId:o,role:W[n]},body:{mailboxId:h}})},i=(n,h)=>{const b=h.trim();t.mutate({path:{accountId:o,mailboxId:n},body:{displayNameOverride:b===""?null:b}})};if(d)return e.jsx("div",{className:"h-24 animate-pulse rounded-sm border border-line bg-surface","aria-busy":"true","aria-label":`Loading folders for ${s.email}`});if(u)return e.jsx(y,{variant:"inline",title:`Couldn't load folders for ${s.email}`,error:c,onRetry:()=>{m()}});const O=l.items.map(n=>({mailboxId:n.mailboxId,providerPath:n.fullPath,messageCount:n.messageCount})),f={};for(const n of s.folderAppointments){const h=U[n.role];h&&(f[h]=n.mailboxId??null)}const g={};for(const n of l.items)n.displayNameOverride&&(g[n.mailboxId]=n.displayNameOverride);return e.jsxs("div",{className:"space-y-2",children:[(a.isError||t.isError)&&e.jsx(D,{tone:"danger",variant:"soft",children:"Couldn't save that change. Please try again."}),e.jsx(re,{accountEmail:s.email,folders:O,appointments:f,displayNames:g,onAppoint:p,onRename:i})]})}function ge(){const s=k(),[r,o]=j.useState(!0),{data:l,isPending:d,isError:u,error:c,refetch:m}=v(L()),a=t=>{const p=T[t];p&&s({to:p})};return e.jsx(J,{items:R,activeId:"folders",title:"Folder roles",description:"Appoint which real folder fills each canonical role, per account.",help:ne,helpOpen:r,onToggleHelp:()=>o(t=>!t),onSelect:a,onBackToMail:()=>{s({to:"/mail"})},children:d?e.jsx("div",{className:"h-24 animate-pulse rounded-sm border border-line bg-surface","aria-busy":"true","aria-label":"Loading accounts"}):u?e.jsx(y,{title:"Couldn't load accounts",error:c,onRetry:()=>{m()}}):l.accounts.length===0?e.jsx("p",{className:"py-12 text-sm text-fg-muted",children:"No accounts configured."}):e.jsx("div",{className:"space-y-8",children:l.accounts.map(t=>e.jsx(oe,{account:t},t.accountId))})})}export{ge as component};
|