Update Biome formatting settings, improved self-hosting capability and reformatted all files
This commit is contained in:
@@ -52,38 +52,18 @@ export default function Index() {
|
||||
</span>
|
||||
<div className="flex-1 truncate">
|
||||
<div className="flex items-center space-x-3">
|
||||
<h3 className="truncate text-lg font-bold text-neutral-800">
|
||||
{c.subject}
|
||||
</h3>
|
||||
<h3 className="truncate text-lg font-bold text-neutral-800">{c.subject}</h3>
|
||||
</div>
|
||||
<div className={"mb-6"}>
|
||||
<h2
|
||||
className={
|
||||
"text col-span-2 truncate font-semibold text-neutral-700"
|
||||
}
|
||||
>
|
||||
Quick Stats
|
||||
</h2>
|
||||
<h2 className={"text col-span-2 truncate font-semibold text-neutral-700"}>Quick Stats</h2>
|
||||
<div className={"grid grid-cols-2 gap-3"}>
|
||||
{c.status === "DELIVERED" ? (
|
||||
<>
|
||||
<div>
|
||||
<label
|
||||
className={
|
||||
"text-xs font-medium text-neutral-500"
|
||||
}
|
||||
>
|
||||
Open rate
|
||||
</label>
|
||||
<label className={"text-xs font-medium text-neutral-500"}>Open rate</label>
|
||||
<p className="mt-1 truncate text-sm text-neutral-500">
|
||||
{c.emails.length > 0
|
||||
? Math.round(
|
||||
(c.emails.filter(
|
||||
(e) => e.status === "OPENED",
|
||||
).length /
|
||||
c.emails.length) *
|
||||
100,
|
||||
)
|
||||
? Math.round((c.emails.filter((e) => e.status === "OPENED").length / c.emails.length) * 100)
|
||||
: 0}
|
||||
%
|
||||
</p>
|
||||
@@ -91,81 +71,37 @@ export default function Index() {
|
||||
|
||||
{c.tasks.length > 0 && (
|
||||
<div>
|
||||
<label
|
||||
className={
|
||||
"text-xs font-medium text-neutral-500"
|
||||
}
|
||||
>
|
||||
Emails in queue
|
||||
</label>
|
||||
<p className="mt-1 truncate text-sm text-neutral-500">
|
||||
{c.tasks.length}
|
||||
</p>
|
||||
<label className={"text-xs font-medium text-neutral-500"}>Emails in queue</label>
|
||||
<p className="mt-1 truncate text-sm text-neutral-500">{c.tasks.length}</p>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<div>
|
||||
<label
|
||||
className={
|
||||
"text-xs font-medium text-neutral-500"
|
||||
}
|
||||
>
|
||||
Open rate
|
||||
</label>
|
||||
<p className="mt-1 truncate text-sm text-neutral-500">
|
||||
Awaiting delivery
|
||||
</p>
|
||||
<label className={"text-xs font-medium text-neutral-500"}>Open rate</label>
|
||||
<p className="mt-1 truncate text-sm text-neutral-500">Awaiting delivery</p>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className={"my-4"}>
|
||||
<h2
|
||||
className={
|
||||
"col-span-2 truncate font-semibold text-neutral-700"
|
||||
}
|
||||
>
|
||||
Properties
|
||||
</h2>
|
||||
<h2 className={"col-span-2 truncate font-semibold text-neutral-700"}>Properties</h2>
|
||||
<div className={"grid grid-cols-2 gap-3"}>
|
||||
<div>
|
||||
<label
|
||||
className={
|
||||
"text-xs font-medium text-neutral-500"
|
||||
}
|
||||
>
|
||||
Recipients
|
||||
</label>
|
||||
<p className="mt-1 truncate text-sm text-neutral-500">
|
||||
{c.recipients.length}
|
||||
</p>
|
||||
<label className={"text-xs font-medium text-neutral-500"}>Recipients</label>
|
||||
<p className="mt-1 truncate text-sm text-neutral-500">{c.recipients.length}</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label
|
||||
className={
|
||||
"text-xs font-medium text-neutral-500"
|
||||
}
|
||||
>
|
||||
Status
|
||||
</label>
|
||||
<label className={"text-xs font-medium text-neutral-500"}>Status</label>
|
||||
<p className="mt-1 truncate text-sm text-neutral-500">
|
||||
{c.status === "DRAFT" ? (
|
||||
<Badge type={"info"}>Draft</Badge>
|
||||
) : (
|
||||
<Badge
|
||||
type={
|
||||
c.tasks.length > 0
|
||||
? "info"
|
||||
: "success"
|
||||
}
|
||||
>
|
||||
{c.tasks.length > 0
|
||||
? "Sending"
|
||||
: "Delivered"}
|
||||
<Badge type={c.tasks.length > 0 ? "info" : "success"}>
|
||||
{c.tasks.length > 0 ? "Sending" : "Delivered"}
|
||||
</Badge>
|
||||
)}
|
||||
</p>
|
||||
@@ -181,12 +117,7 @@ export default function Index() {
|
||||
href={`/campaigns/${c.id}`}
|
||||
className="relative inline-flex w-0 flex-1 items-center justify-center rounded-bl rounded-br py-4 text-sm font-medium text-neutral-800 transition hover:bg-neutral-50 hover:text-neutral-700"
|
||||
>
|
||||
<svg
|
||||
width="24"
|
||||
height="24"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<svg width="24" height="24" fill="none" viewBox="0 0 24 24">
|
||||
{c.status === "DELIVERED" ? (
|
||||
<>
|
||||
<path
|
||||
@@ -226,9 +157,7 @@ export default function Index() {
|
||||
)}
|
||||
</svg>
|
||||
|
||||
<span className="ml-3">
|
||||
{c.status === "DELIVERED" ? "View" : "Edit"}
|
||||
</span>
|
||||
<span className="ml-3">{c.status === "DELIVERED" ? "View" : "Edit"}</span>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
@@ -240,12 +169,7 @@ export default function Index() {
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
<Empty
|
||||
title={"No campaigns found"}
|
||||
description={
|
||||
"Send your contacts emails in bulk with a few clicks"
|
||||
}
|
||||
/>
|
||||
<Empty title={"No campaigns found"} description={"Send your contacts emails in bulk with a few clicks"} />
|
||||
)
|
||||
) : (
|
||||
<Skeleton type={"table"} />
|
||||
|
||||
Reference in New Issue
Block a user