Openstatus www.openstatus.dev

fix: email

+15 -21
+10 -16
packages/emails/emails/monitor-alert.tsx
··· 2 2 3 3 import { 4 4 Body, 5 - Button, 6 5 CodeInline, 7 6 Column, 8 - Container, 9 7 Head, 10 8 Heading, 11 9 Html, 12 - Img, 13 10 Link, 14 11 Preview, 15 12 Row, ··· 62 59 <Preview>Your monitor's status is: {props.type}</Preview> 63 60 <Body style={styles.main}> 64 61 <Layout> 65 - <Container 66 - style={{ 67 - backgroundColor: getIcon(props.type).color, 68 - display: "flex", 69 - alignItems: "center", 70 - justifyContent: "center", 71 - width: "40px", 72 - height: "40px", 73 - borderRadius: "50%", 74 - }} 75 - > 76 - <Img src={getIcon(props.type).src} width="24" height="24" /> 77 - </Container> 78 62 <Row> 79 63 <Column> 80 64 <Heading as="h4">{props.name}</Heading> ··· 126 110 <Text>{props.region}</Text> 127 111 </Column> 128 112 </Row> 113 + {props.latency ? ( 114 + <Row style={styles.row}> 115 + <Column> 116 + <Text style={styles.bold}>Latency</Text> 117 + </Column> 118 + <Column style={{ textAlign: "right" }}> 119 + <Text>{props.latency}</Text> 120 + </Column> 121 + </Row> 122 + ) : null} 129 123 <Row style={styles.row}> 130 124 <Column> 131 125 <Text style={styles.bold}>Timestamp</Text>
+5 -5
packages/emails/src/client.tsx
··· 51 51 const html = await render(<StatusReportEmail {...req} />); 52 52 const result = await this.client.batch.send( 53 53 req.to.map((subscriber) => ({ 54 - from: `${req.pageTitle} <notifications@openstatus.dev>`, 54 + from: `${req.pageTitle} <notifications@notifications.openstatus.dev>`, 55 55 subject: req.reportTitle, 56 56 to: subscriber, 57 57 html, ··· 78 78 try { 79 79 const html = await render(<TeamInvitationEmail {...req} />); 80 80 const result = await this.client.emails.send({ 81 - from: `${req.workspaceName ?? "OpenStatus"} <notifications@openstatus.dev>`, 81 + from: `${req.workspaceName ?? "OpenStatus"} <notifications@notifications.openstatus.dev>`, 82 82 subject: `You've been invited to join ${req.workspaceName ?? "OpenStatus"}`, 83 83 to: req.to, 84 84 html, ··· 101 101 try { 102 102 const html = await render(<MonitorAlertEmail {...req} />); 103 103 const result = await this.client.emails.send({ 104 - from: "OpenStatus <notifications@openstatus.dev>", 104 + from: "OpenStatus <notifications@notifications.openstatus.dev>", 105 105 subject: `${req.name}: ${req.type.toUpperCase()}`, 106 106 to: req.to, 107 107 html, ··· 126 126 try { 127 127 const html = await render(<PageSubscriptionEmail {...req} />); 128 128 const result = await this.client.emails.send({ 129 - from: `${req.page} <notifications@openstatus.dev>`, 130 - subject: "Status page subscription", 129 + from: "Status Page <notifications@notifications.openstatus.dev>", 130 + subject: `Confirm your subscription to ${req.page}`, 131 131 to: req.to, 132 132 html, 133 133 });