diff --git a/apps/web/src/components/ActivityFeed.tsx b/apps/web/src/components/ActivityFeed.tsx index 213108d..59849fd 100644 --- a/apps/web/src/components/ActivityFeed.tsx +++ b/apps/web/src/components/ActivityFeed.tsx @@ -1,8 +1,7 @@ -import {Button, IconSpinner} from '@plunk/ui'; +import {Button, EmptyState, IconSpinner} from '@plunk/ui'; import type {Activity, CursorPaginatedResponse} from '@plunk/types'; import {network} from '../lib/network'; import {ActivityItem} from './ActivityItem'; -import {EmptyState} from './EmptyState'; import {Activity as ActivityIcon} from 'lucide-react'; import {useCallback, useEffect, useMemo, useState} from 'react'; diff --git a/apps/web/src/components/ActivityItem.tsx b/apps/web/src/components/ActivityItem.tsx index 9d90c98..b66892d 100644 --- a/apps/web/src/components/ActivityItem.tsx +++ b/apps/web/src/components/ActivityItem.tsx @@ -133,8 +133,8 @@ function getActivityConfig(activity: Activity): ActivityConfig { case 'event.triggered': return { icon: Zap, - color: 'text-blue-600', - bgColor: 'bg-blue-100', + color: 'text-neutral-600', + bgColor: 'bg-neutral-100', title: (typeof metadata.eventName === 'string' ? metadata.eventName : undefined) || 'Event triggered', description: undefined, badge: { @@ -150,8 +150,8 @@ function getActivityConfig(activity: Activity): ActivityConfig { case 'email.sent': return { icon: Send, - color: 'text-green-600', - bgColor: 'bg-green-100', + color: 'text-green-700', + bgColor: 'bg-green-50', title: (typeof metadata.subject === 'string' ? metadata.subject : undefined) || 'Email sent', description: metadata.campaignName ? `Campaign: ${String(metadata.campaignName)}` @@ -169,8 +169,8 @@ function getActivityConfig(activity: Activity): ActivityConfig { case 'email.delivered': return { icon: CheckCircle, - color: 'text-green-600', - bgColor: 'bg-green-100', + color: 'text-green-700', + bgColor: 'bg-green-50', title: (typeof metadata.subject === 'string' ? metadata.subject : undefined) || 'Email delivered', description: metadata.campaignName ? `Campaign: ${String(metadata.campaignName)}` @@ -186,8 +186,8 @@ function getActivityConfig(activity: Activity): ActivityConfig { case 'email.received': return { icon: Inbox, - color: 'text-blue-600', - bgColor: 'bg-blue-100', + color: 'text-neutral-600', + bgColor: 'bg-neutral-100', title: (typeof metadata.subject === 'string' ? metadata.subject : undefined) || 'Email received', description: typeof metadata.from === 'string' ? `From: ${metadata.from}` : 'Inbound email', badge: { @@ -199,8 +199,8 @@ function getActivityConfig(activity: Activity): ActivityConfig { case 'email.opened': return { icon: Eye, - color: 'text-purple-600', - bgColor: 'bg-purple-100', + color: 'text-neutral-600', + bgColor: 'bg-neutral-100', title: (typeof metadata.subject === 'string' ? metadata.subject : undefined) || 'Email opened', description: typeof metadata.totalOpens === 'number' && metadata.totalOpens > 1 @@ -219,8 +219,8 @@ function getActivityConfig(activity: Activity): ActivityConfig { case 'email.clicked': return { icon: MousePointerClick, - color: 'text-orange-600', - bgColor: 'bg-orange-100', + color: 'text-neutral-600', + bgColor: 'bg-neutral-100', title: (typeof metadata.subject === 'string' ? metadata.subject : undefined) || 'Email clicked', description: typeof metadata.totalClicks === 'number' && metadata.totalClicks > 1 @@ -239,8 +239,8 @@ function getActivityConfig(activity: Activity): ActivityConfig { case 'email.bounced': return { icon: XCircle, - color: 'text-red-600', - bgColor: 'bg-red-100', + color: 'text-red-700', + bgColor: 'bg-red-50', title: (typeof metadata.subject === 'string' ? metadata.subject : undefined) || 'Email bounced', description: (typeof metadata.error === 'string' ? metadata.error : undefined) || 'Email failed to deliver', badge: { @@ -252,8 +252,8 @@ function getActivityConfig(activity: Activity): ActivityConfig { case 'email.complaint': return { icon: ShieldAlert, - color: 'text-red-600', - bgColor: 'bg-red-100', + color: 'text-red-700', + bgColor: 'bg-red-50', title: (typeof metadata.subject === 'string' ? metadata.subject : undefined) || 'Spam complaint', description: metadata.campaignName ? `Campaign: ${String(metadata.campaignName)}` @@ -269,8 +269,8 @@ function getActivityConfig(activity: Activity): ActivityConfig { case 'workflow.started': return { icon: Workflow, - color: 'text-indigo-600', - bgColor: 'bg-indigo-100', + color: 'text-neutral-600', + bgColor: 'bg-neutral-100', title: (typeof metadata.workflowName === 'string' ? metadata.workflowName : undefined) || 'Workflow started', description: `Status: ${String(metadata.status || 'unknown')}`, badge: { @@ -282,8 +282,8 @@ function getActivityConfig(activity: Activity): ActivityConfig { case 'workflow.completed': return { icon: CheckCheck, - color: 'text-green-600', - bgColor: 'bg-green-100', + color: 'text-green-700', + bgColor: 'bg-green-50', title: (typeof metadata.workflowName === 'string' ? metadata.workflowName : undefined) || 'Workflow completed', description: metadata.exitReason ? `Exit: ${String(metadata.exitReason)}` @@ -297,8 +297,8 @@ function getActivityConfig(activity: Activity): ActivityConfig { case 'campaign.scheduled': return { icon: Calendar, - color: 'text-blue-600', - bgColor: 'bg-blue-50', + color: 'text-neutral-600', + bgColor: 'bg-neutral-100', title: (typeof metadata.campaignName === 'string' ? metadata.campaignName : undefined) || 'Campaign scheduled', description: metadata.subject ? `${String(metadata.subject)}${metadata.totalRecipients ? ` • ${metadata.totalRecipients} recipients` : ''}` @@ -314,8 +314,8 @@ function getActivityConfig(activity: Activity): ActivityConfig { case 'workflow.email.scheduled': return { icon: Calendar, - color: 'text-indigo-600', - bgColor: 'bg-indigo-50', + color: 'text-neutral-600', + bgColor: 'bg-neutral-100', title: (typeof metadata.stepName === 'string' ? metadata.stepName : undefined) || 'Workflow email scheduled', description: metadata.workflowName ? `Workflow: ${String(metadata.workflowName)}${metadata.subject ? ` • ${String(metadata.subject)}` : ''}` @@ -353,7 +353,7 @@ export const ActivityItem = memo(function ActivityItem({activity, isUpcoming = f
Total Emails Sent
@@ -123,19 +123,19 @@ export function BillingConsumption({projectId, hasSubscription}: BillingConsumpt {/* Account Credits */} {consumptionData.credits && consumptionData.credits.hasCredits && ( -Account Credits
-+
Account Credits
+{formatCurrency(consumptionData.credits.creditAmount, consumptionData.credits.currency)}
+
Credits will be automatically applied to your upcoming invoices
+
Amount Due:{' '} {formatCurrency(invoice.amountDue, invoice.currency)}
diff --git a/apps/web/src/components/BillingLimits.tsx b/apps/web/src/components/BillingLimits.tsx index eb9013c..48e52ab 100644 --- a/apps/web/src/components/BillingLimits.tsx +++ b/apps/web/src/components/BillingLimits.tsx @@ -384,15 +384,15 @@ interface UsageDisplayProps { const UsageDisplay = memo(function UsageDisplay({category, usage, currency}: UsageDisplayProps) { const statusColor = useMemo(() => { - if (usage.isBlocked) return 'text-red-600'; - if (usage.isWarning) return 'text-orange-600'; - return 'text-green-600'; + if (usage.isBlocked) return 'text-red-700'; + if (usage.isWarning) return 'text-amber-700'; + return 'text-neutral-600'; }, [usage.isBlocked, usage.isWarning]); const progressColor = useMemo(() => { if (usage.isBlocked) return 'bg-red-600'; - if (usage.isWarning) return 'bg-orange-500'; - return 'bg-green-600'; + if (usage.isWarning) return 'bg-amber-500'; + return 'bg-neutral-900'; }, [usage.isBlocked, usage.isWarning]); const statusIcon = useMemo(() => { @@ -440,10 +440,10 @@ const UsageDisplay = memo(function UsageDisplay({category, usage, currency}: Usa {usage.isBlocked && ( -+
Limit reached: No more {category.toLowerCase()} emails can be sent this month.
diff --git a/apps/web/src/components/CampaignSelectionDialog.tsx b/apps/web/src/components/CampaignSelectionDialog.tsx
index e4e8841..94f37dc 100644
--- a/apps/web/src/components/CampaignSelectionDialog.tsx
+++ b/apps/web/src/components/CampaignSelectionDialog.tsx
@@ -12,6 +12,7 @@ import {
DialogDescription,
DialogHeader,
DialogTitle,
+ EmptyState,
Label,
Select,
SelectContent,
@@ -26,7 +27,6 @@ import type {PaginatedResponse} from '@plunk/types';
import {ArrowLeft, Calendar, Mail, Users} from 'lucide-react';
import {useState} from 'react';
import useSWR from 'swr';
-import {EmptyState} from './EmptyState';
interface CampaignSelectionDialogProps {
open: boolean;
@@ -97,23 +97,16 @@ export function CampaignSelectionDialog({open, onOpenChange, onSelectCampaign}:
};
const getStatusBadge = (status: CampaignStatus) => {
- const variants: Record<
- CampaignStatus,
- {variant: 'default' | 'secondary' | 'destructive' | 'outline'; label: string; className?: string}
- > = {
- DRAFT: {variant: 'secondary', label: 'Draft', className: 'bg-neutral-100 text-neutral-700'},
- SCHEDULED: {variant: 'default', label: 'Scheduled', className: 'bg-blue-100 text-blue-700'},
- SENDING: {variant: 'default', label: 'Sending', className: 'bg-purple-100 text-purple-700'},
- SENT: {variant: 'default', label: 'Sent', className: 'bg-green-100 text-green-700'},
- CANCELLED: {variant: 'destructive', label: 'Cancelled', className: 'bg-red-100 text-red-700'},
+ const variants: Record {description}{title}
-
Open Rate
@@ -470,8 +470,8 @@ export default function AnalyticsPage() {Click Rate
@@ -483,8 +483,8 @@ export default function AnalyticsPage() {Engagement
@@ -509,8 +509,8 @@ export default function AnalyticsPage() {{stats?.totalEvents?.toLocaleString() || '0'}
Total Events
{segment.description}
}{segmentType === 'DYNAMIC' ? 'Build complex audience filters with AND/OR logic' diff --git a/apps/web/src/pages/settings/index.tsx b/apps/web/src/pages/settings/index.tsx index c2e814e..d449460 100644 --- a/apps/web/src/pages/settings/index.tsx +++ b/apps/web/src/pages/settings/index.tsx @@ -375,7 +375,7 @@ export default function Settings() {
Manage your project settings and preferences
@@ -586,12 +586,7 @@ export default function Settings() { API keys, domains, billing information
{body}
); diff --git a/packages/ui/src/components/atoms/RadioGroup.tsx b/packages/ui/src/components/atoms/RadioGroup.tsx index fbb44f6..f7642e9 100644 --- a/packages/ui/src/components/atoms/RadioGroup.tsx +++ b/packages/ui/src/components/atoms/RadioGroup.tsx @@ -22,7 +22,7 @@ const RadioGroupItem = React.forwardRef<{description}
} - {action && ( -{description}
)} + {action}