feat: add onboarding welcome letter overlay
CI / Generate Certificates (pull_request) Successful in 27s
CI / Frontend CI (pull_request) Successful in 1m13s
CI / Backend CI (pull_request) Successful in 1m10s
CI / E2E Tests (pull_request) Successful in 5m42s

This commit is contained in:
me
2026-05-06 21:17:14 +05:30
parent 8af9eab6ea
commit 0104703852
2 changed files with 178 additions and 0 deletions
+101
View File
@@ -0,0 +1,101 @@
import type { CanvasJSON } from "../components/editor/ComposeCanvas";
export function getWelcomeLetterContent(userName: string): CanvasJSON {
return {
objects: [
{
fontSize: 18,
fontWeight: 500,
fontFamily: "Kavivanar",
fontStyle: "normal",
lineHeight: 1.5,
text: `\nDear ${userName}, \n\nYou made it this far, which means something already brought you here. \nA name, maybe. A feeling you haven't been able to shake. Something you typed and deleted too many times to count.\n\nMost people carry it quietly. They tell themselves it doesn't matter anymore, or that too much time has passed, or that the other person wouldn't understand anyway. And maybe they're right. \n\nBut the thing is — the unsaid thing doesn't really care about any of that. \nIt just stays.\n\nSo here you are.\n\nYou don't have to know what you want to say yet. \nYou don't have to have it figured out — who it's for, or why it still matters, or what you're hoping will happen after. \n\nA lot of letters written here start without any of that. They find their way.\n\nTake your time. \nNo one's watching. \n\nWhen you're ready, write a letter.\n\nSometimes the wrong train takes you to the right station.\n- S.F.`,
charSpacing: 0,
textAlign: "left",
styles: [],
pathStartOffset: 0,
pathSide: "left",
pathAlign: "baseline",
underline: false,
overline: false,
linethrough: false,
textBackgroundColor: "",
direction: "ltr",
textDecorationThickness: 66.667,
minWidth: 20,
splitByGrapheme: false,
type: "Textbox",
version: "7.2.0",
originX: "left",
originY: "top",
left: 36,
top: 36,
width: 608,
height: 813.6,
fill: "#111e67",
stroke: null,
strokeWidth: 1,
strokeDashArray: null,
strokeLineCap: "butt",
strokeDashOffset: 0,
strokeLineJoin: "miter",
strokeUniform: false,
strokeMiterLimit: 4,
scaleX: 1,
scaleY: 1,
angle: 0,
flipX: false,
flipY: false,
opacity: 1,
shadow: null,
visible: true,
backgroundColor: "",
fillRule: "nonzero",
paintFirst: "fill",
globalCompositeOperation: "source-over",
skewX: 0,
skewY: 0,
},
{
cropX: 0,
cropY: 0,
type: "Image",
version: "7.2.0",
originX: "left",
originY: "top",
left: 298.4065,
top: 660.2853,
width: 512,
height: 400,
fill: "rgb(0,0,0)",
stroke: null,
strokeWidth: 0,
strokeDashArray: null,
strokeLineCap: "butt",
strokeDashOffset: 0,
strokeLineJoin: "miter",
strokeUniform: false,
strokeMiterLimit: 4,
scaleX: 0.4753,
scaleY: 0.4753,
angle: 355.5436,
flipX: false,
flipY: false,
opacity: 1,
shadow: null,
visible: true,
backgroundColor: "",
fillRule: "nonzero",
paintFirst: "fill",
globalCompositeOperation: "source-over",
skewX: 0,
skewY: 0,
src: "/screenshots/train.png",
crossOrigin: null,
filters: [],
},
],
canvasWidth: 680,
canvasHeight: 900,
};
}