PageSourceSearch

https://meetborderless.com/build/assets/index-DJtSW0F0.js

js meetborderless.com collected 2026-10-09 22:42:36 UTC 7,233 bytes, 1 lines download raw bytes

1import{j as e}from"./app-C1iegf7Q.js";import{u as m,H as p,L as b,f as n}from"./inertia-BpyZy4w-.js";import{I as u}from"./input-DJt0nBB3.js";import{a as h}from"./admin-layout-BhXWbUlP.js";import{a as g}from"./utils-BiuKVCuu.js";import{M as f}from"./megaphone-opizzcRj.js";import{S as i}from"./shield-off-KOaPd0RW.js";import{T as j}from"./trash-2-CrI9a2Po.js";/* empty css            */import"./app-logo-Dz0wogSq.js";import"./logo-light-DU4bWymm.js";import"./flash-toast-C6O0iVL1.js";import"./createLucideIcon-wqc1LSWg.js";import"./info-D2ZN_yLm.js";import"./triangle-alert-C7AVwNi-.js";import"./circle-x-Bp6Mbpgt.js";import"./circle-check-BMWvzPMx.js";import"./x-DQSeRCcH.js";import"./arrow-left-DCX0fhKH.js";import"./menu-BR3Nc3Gr.js";import"./users-BCcupCXV.js";import"./folder-open-I72SPUVk.js";import"./pound-sterling-D16GLaAZ.js";import"./book-open-DVFlG_9t.js";const N={unsubscribe:"bg-bg-2 text-ink-3",manual:"bg-teal/10 text-teal",bounce:"bg-amber/12 text-amber-ink",complaint:"bg-red/10 text-red"};function O({suppressions:s,filters:l,stats:r}){const a=m({emails:""}),o=t=>new Date(t).toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"}),d=t=>{t.preventDefault(),a.post("/admin/email-suppressions",{preserveScroll:!0,onSuccess:()=>a.reset("emails")})},c=t=>{n.get("/admin/email-suppressions",{...l,search:t},{preserveState:!0,replace:!0,preserveScroll:!0})},x=t=>{confirm(`Remove ${t.email} from the suppression list? They will be able to receive marketing email again.`)&&n.delete(`/admin/email-suppressions/${t.id}`,{preserveScroll:!0})};return e.jsxs(h,{children:[e.jsx(p,{title:"Email Suppressions · Admin"}),e.jsxs("div",{className:"px-4 py-5 sm:px-6 sm:py-7",children:[e.jsxs("div",{className:"mb-5 flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-xl font-semibold text-ink",children:"Email Suppression List"}),e.jsx("p",{className:"mt-0.5 text-sm text-ink-3",children:"Addresses we will never email — unsubscribes, bounces, spam complaints, and manual additions."})]}),e.jsxs(b,{href:"/admin/broadcasts",className:"inline-flex items-center gap-1.5 rounded-lg border border-line bg-white px-3 py-1.5 text-sm font-medium text-ink-2 hover:bg-bg-2",children:[e.jsx(f,{className:"h-3.5 w-3.5"}),"Broadcasts"]})]}),e.jsx("div",{className:"mb-5 grid grid-cols-3 gap-3 sm:grid-cols-5",children:[{label:"Total",value:r.total},{label:"Manual",value:r.manual},{label:"Unsubscribed",value:r.unsubscribe},{label:"Bounced",value:r.bounce},{label:"Complaints",value:r.complaint}].map(t=>e.jsxs("div",{className:"rounded-card border border-line bg-white p-4",children:[e.jsx("p",{className:"text-2xs font-bold uppercase tracking-eyebrow text-ink-3",children:t.label}),e.jsx("p",{className:"mt-1.5 font-serif text-3xl leading-none text-ink",children:t.value})]},t.label))}),e.jsxs("div",{className:"mb-5 overflow-hidden rounded-card border border-line bg-white",children:[e.jsx("div",{className:"border-b border-line-2 px-4 py-3",children:e.jsx("h2",{className:"text-2xs font-bold uppercase tracking-eyebrow text-ink-3",children:"Add addresses"})}),e.jsxs("form",{onSubmit:d,className:"p-4 space-y-3",children:[e.jsx("textarea",{value:a.data.emails,onChange:t=>a.setData("emails",t.target.value),placeholder:"Paste one or more emails, separated by new lines, commas or semicolons",rows:3,className:"w-full rounded-md border border-line bg-bg px-3 py-2 text-sm text-ink focus:border-line-strong focus:outline-none"}),a.errors.emails&&e.jsx("p",{className:"text-xs text-red",children:a.errors.emails}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("button",{type:"submit",disabled:a.processing||!a.data.emails.trim(),className:"inline-flex items-center gap-1.5 rounded-lg bg-ink px-4 py-2 text-sm font-medium text-white hover:bg-ink/90 disabled:opacity-50",children:[e.jsx(i,{className:"h-3.5 w-3.5"}),"Suppress"]}),e.jsx("p",{className:"text-xs text-ink-3",children:"Known users are also flipped to unsubscribed."})]})]})]}),e.jsx("div",{className:"mb-4 max-w-xs",children:e.jsx(u,{type:"search",defaultValue:l.search,placeholder:"Search by email",onChange:t=>c(t.target.value),className:"h-8 text-sm"})}),e.jsxs("div",{className:"overflow-hidden rounded-card border border-line bg-white",children:[e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-line-2 bg-bg-2",children:[e.jsx("th",{className:"px-4 py-2.5 text-left text-2xs font-bold uppercase tracking-eyebrow text-ink-3",children:"Email"}),e.jsx("th",{className:"px-4 py-2.5 text-left text-2xs font-bold uppercase tracking-eyebrow text-ink-3",children:"User"}),e.jsx("th",{className:"px-4 py-2.5 text-left text-2xs font-bold uppercase tracking-eyebrow text-ink-3",children:"Reason"}),e.jsx("th",{className:"px-4 py-2.5 text-left text-2xs font-bold uppercase tracking-eyebrow text-ink-3",children:"Source"}),e.jsx("th",{className:"px-4 py-2.5 text-left text-2xs font-bold uppercase tracking-eyebrow text-ink-3",children:"Added"}),e.jsx("th",{className:"px-4 py-2.5 text-right text-2xs font-bold uppercase tracking-eyebrow text-ink-3",children:"Actions"})]})}),e.jsx("tbody",{children:s.data.length===0?e.jsx("tr",{children:e.jsxs("td",{colSpan:6,className:"py-12 text-center",children:[e.jsx(i,{className:"mx-auto mb-3 h-8 w-8 text-ink-3 op
1acity-50"}),e.jsx("p",{className:"text-sm text-ink-3",children:"No suppressed addresses"})]})}):s.data.map(t=>e.jsxs("tr",{className:"border-b border-line-2 last:border-0 hover:bg-bg-2",children:[e.jsx("td",{className:"px-4 py-3 text-sm font-semibold text-ink",children:t.email}),e.jsx("td",{className:"px-4 py-3 text-sm text-ink-3",children:t.user?t.user.name:"Guest / non-user"}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:g("rounded-tag px-2 py-0.5 text-2xs font-bold capitalize",N[t.reason]??"bg-bg-2 text-ink-3"),children:t.reason})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:"rounded-tag bg-bg-2 px-2 py-0.5 text-2xs font-bold capitalize text-ink-3",children:t.source})}),e.jsx("td",{className:"px-4 py-3 text-sm text-ink-3",children:o(t.created_at)}),e.jsx("td",{className:"px-4 py-3 text-right",children:e.jsx("button",{type:"button",onClick:()=>x(t),className:"flex h-7 w-7 items-center justify-center rounded-md border border-line bg-white text-ink-3 hover:border-red/30 hover:bg-red/10 hover:text-red ml-auto",children:e.jsx(j,{className:"h-3.5 w-3.5"})})})]},t.id))})]})}),s.last_page>1&&e.jsxs("div",{className:"flex items-center justify-center gap-3 border-t border-line-2 px-4 py-3",children:[s.current_page>1&&e.jsx("button",{type:"button",onClick:()=>n.get("/admin/email-suppressions",{...l,page:s.current_page-1}),className:"text-xs font-medium text-ink-3 hover:text-ink",children:"Previous"}),e.jsxs("span",{className:"text-xs text-ink-3",children:["Page ",s.current_page," of ",s.last_page]}),s.current_page<s.last_page&&e.jsx("button",{type:"button",onClick:()=>n.get("/admin/email-suppressions",{...l,page:s.current_page+1}),className:"text-xs font-medium text-ink-3 hover:text-ink",children:"Next"})]})]})]})]})}export{O 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.