diff --git a/apps/web/src/app/dashboard/events/[id]/sign/studio.tsx b/apps/web/src/app/dashboard/events/[id]/sign/studio.tsx index ae2a589..3c431ad 100644 --- a/apps/web/src/app/dashboard/events/[id]/sign/studio.tsx +++ b/apps/web/src/app/dashboard/events/[id]/sign/studio.tsx @@ -24,7 +24,7 @@ export function GuestSignStudio({ eventId, title, guestUrl, qr, warning, savedUr eventId: string; title: string; guestUrl: string; qr: SignQr; warning: string | null; savedUrl: string | null; savedRevision: string | null; canSave: boolean; }) { - const [design, setDesign] = useState({ title, headline: "Share your favorite moments", message: "Help us see the day through your eyes. Add your photos to our shared album.", paper: "letter", ink: "indigo", font: "funnel", layout: "typography", background: brandPalette.primary, accent: "#ffffff", decoration: "minimal", showBrand: true, customWidth: 8.5, customHeight: 11, unit: "in" }); + const [design, setDesign] = useState({ title, headline: "Share your photos", message: "We’d love to see what you captured.", paper: "card6x4", ink: "black", font: "funnel", layout: "compact", background: brandPalette.background, accent: brandPalette.ink, decoration: "minimal", showBrand: true, customWidth: 8.5, customHeight: 11, unit: "in" }); const [fontError, setFontError] = useState(false); const [assetBusy, setAssetBusy] = useState(false); const [loadingDesign, setLoadingDesign] = useState(Boolean(savedUrl)); diff --git a/apps/web/src/lib/guest-sign.test.ts b/apps/web/src/lib/guest-sign.test.ts index e92fd12..48594b6 100644 --- a/apps/web/src/lib/guest-sign.test.ts +++ b/apps/web/src/lib/guest-sign.test.ts @@ -18,6 +18,10 @@ test("text controls change each text independently without resizing the QR", () const url = "https://ma.hadlock.tech/e/demo", qr = signQr(url); const base: SignDesign = { ...design, layout: "compact", paper: "card6x4", title: "Event", headline: "Share", message: "Welcome" }; const normal = guestSignSvg(base, url, qr); + expect(normal).toContain("Scan to upload"); + expect(normal).not.toContain("Your photos. Our story."); + expect(normal).not.toContain("Photos and notes welcome."); + expect(normal).not.toContain("No app or account needed."); for (const [key, label] of [["titleScale", "Event"], ["headlineScale", "Share"], ["messageScale", "Welcome"]] as const) { const sized = { ...base, [key]: 150 }; const svg = guestSignSvg(sized, url, qr); diff --git a/apps/web/src/lib/guest-sign.ts b/apps/web/src/lib/guest-sign.ts index 6af5baf..f81b918 100644 --- a/apps/web/src/lib/guest-sign.ts +++ b/apps/web/src/lib/guest-sign.ts @@ -101,6 +101,28 @@ export function guestSignSvg(design: SignDesign, guestUrl: string, qr: SignQr) { const qrY = compact ? (landscape ? 260 : 530) : landscape ? (photoLed ? 415 : 235) : (photoLed ? 755 : 605); const messageY = top + (compact ? 310 : photoLed ? 250 : 445); const brandMarkup = logo ? `` : design.showBrand !== false ? `Manyangles` : ""; + if (!photoLed) { + const textX = landscape ? 100 : 85; + const textWidth = landscape ? 530 : 680; + const codeX = landscape ? 760 : (w - qrSize) / 2; + const codeY = landscape ? 210 : 475; + const footerY = landscape ? 655 : 955; + return ` + ${escapeXml(design.title)} — guest photo sign + + + + ${sizedText(design.headline, textX, landscape ? 260 : 170, 76, design.headlineScale ?? 100, textWidth, 185, 600)} + + ${sizedText(design.message, textX, landscape ? 450 : 355, 29, design.messageScale ?? 100, textWidth, landscape ? 150 : 100)} + + ${sizedText("Scan to upload", codeX + qrSize / 2, codeY + qrSize + 45, 25, 100, qrSize, 40, 500, true)} + ${sizedText(guestUrl.replace(/^https?:\/\//, ""), codeX + qrSize / 2, codeY + qrSize + 78, 16, 100, qrSize + 40, 50, 400, true)} + ${sizedText(design.title, textX, footerY, 23, design.titleScale ?? 100, landscape ? 530 : 480, 65, 500)} + ${brandMarkup} + + `; + } return ` ${escapeXml(design.title)} — guest photo sign