first wokring prototype

This commit is contained in:
2026-06-10 04:10:02 +02:00
parent 50d779a537
commit 7491c0a1b4
90 changed files with 10799 additions and 1 deletions

View File

@@ -0,0 +1,49 @@
import type { CampaignWorkspaceSection } from "../types";
const campaignItems: { id: CampaignWorkspaceSection; label: string }[] = [
{ id: "campaign", label: "General" },
{ id: "fields", label: "Fields" },
{ id: "recipients", label: "Recipients" },
{ id: "template", label: "Template" },
{ id: "files", label: "Attachments" }
];
const sendItems: { id: CampaignWorkspaceSection; label: string }[] = [
{ id: "mail-settings", label: "Server settings" },
{ id: "global-settings", label: "Global settings" },
{ id: "review", label: "Review" },
{ id: "send", label: "Send" },
{ id: "report", label: "Report" },
{ id: "audit", label: "Audit log" }
];
export default function SectionSidebar({
active,
onSelect
}: {
active: CampaignWorkspaceSection;
onSelect: (section: CampaignWorkspaceSection) => void;
}) {
return (
<aside className="section-sidebar">
<button className={`section-link section-link-primary ${active === "overview" ? "active" : ""}`} onClick={() => onSelect("overview")}>Overview</button>
<div className="section-title section-title-lower">CAMPAIGN</div>
{campaignItems.map((item) => (
<button key={item.id} className={`section-link ${active === item.id ? "active" : ""}`} onClick={() => onSelect(item.id)}>
{item.label}
</button>
))}
<div className="section-title section-title-lower">SEND CAMPAIGN</div>
{sendItems.map((item) => (
<button key={item.id} className={`section-link ${active === item.id ? "active" : ""}`} onClick={() => onSelect(item.id)}>
{item.label}
</button>
))}
<div className="section-title section-title-lower">ADVANCED</div>
<button className={`section-link subtle ${active === "json" ? "active" : ""}`} onClick={() => onSelect("json")}>JSON</button>
</aside>
);
}