Skip to content

Commit fdcdf7b

Browse files
committed
feat(notifications): improve logo_url and app_name fetching moving it to notifications package
1 parent 2f620c9 commit fdcdf7b

16 files changed

+61
-61
lines changed

coderd/notifications/dispatch/smtp/html.gotmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<body style="margin: 0; padding: 0; font-family: -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; color: #020617; background: #f8fafc;">
99
<div style="max-width: 600px; margin: 20px auto; padding: 60px; border: 1px solid #e2e8f0; border-radius: 8px; background-color: #fff; text-align: left; font-size: 14px; line-height: 1.5;">
1010
<div style="text-align: center;">
11-
<img src="{{ logo_url }}" alt="Company Logo" style="height: 40px;" />
11+
<img src="{{ logo_url }}" alt="Logo" style="height: 40px;" />
1212
<h1 style="text-align: center; font-size: 36px; font-weight: 400; margin: 8px 0 32px; line-height: 1.5;">
1313
{{ app_name }}
1414
</h1>

coderd/notifications/testdata/rendered-templates/smtp/TemplateTemplateDeleted.html.golden

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
From: system@coder.com
22
To: bobby@coder.com
33
Subject: Template "Bobby's Template" deleted
4-
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
5-
Date: Fri, 11 Oct 2024 09:03:06 +0000
4+
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
5+
Date: Fri, 11 Oct 2024 09:03:06 +0000
66
Content-Type: multipart/alternative; boundary=bbe61b741255b6098bb6b3c1f41b885773df633cb18d2a3002b68e4bc9c4
77
MIME-Version: 1.0
88

@@ -37,8 +37,8 @@ l', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; color: #020617=
3737
r: 1px solid #e2e8f0; border-radius: 8px; background-color: #fff; text-alig=
3838
n: left; font-size: 14px; line-height: 1.5;">
3939
<div style=3D"text-align: center;">
40-
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Cod=
41-
er Logo" style=3D"height: 40px;" />
40+
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Log=
41+
o" style=3D"height: 40px;" />
4242
</div>
4343
<h1 style=3D"text-align: center; font-size: 24px; font-weight: 400; m=
4444
argin: 8px 0 32px; line-height: 1.5;">

coderd/notifications/testdata/rendered-templates/smtp/TemplateUserAccountActivated.html.golden

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
From: system@coder.com
22
To: bobby@coder.com
33
Subject: User account "bobby" activated
4-
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
5-
Date: Fri, 11 Oct 2024 09:03:06 +0000
4+
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
5+
Date: Fri, 11 Oct 2024 09:03:06 +0000
66
Content-Type: multipart/alternative; boundary=bbe61b741255b6098bb6b3c1f41b885773df633cb18d2a3002b68e4bc9c4
77
MIME-Version: 1.0
88

@@ -40,8 +40,8 @@ l', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; color: #020617=
4040
r: 1px solid #e2e8f0; border-radius: 8px; background-color: #fff; text-alig=
4141
n: left; font-size: 14px; line-height: 1.5;">
4242
<div style=3D"text-align: center;">
43-
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Cod=
44-
er Logo" style=3D"height: 40px;" />
43+
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Log=
44+
o" style=3D"height: 40px;" />
4545
</div>
4646
<h1 style=3D"text-align: center; font-size: 24px; font-weight: 400; m=
4747
argin: 8px 0 32px; line-height: 1.5;">

coderd/notifications/testdata/rendered-templates/smtp/TemplateUserAccountCreated.html.golden

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
From: system@coder.com
22
To: bobby@coder.com
33
Subject: User account "bobby" created
4-
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
5-
Date: Fri, 11 Oct 2024 09:03:06 +0000
4+
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
5+
Date: Fri, 11 Oct 2024 09:03:06 +0000
66
Content-Type: multipart/alternative; boundary=bbe61b741255b6098bb6b3c1f41b885773df633cb18d2a3002b68e4bc9c4
77
MIME-Version: 1.0
88

@@ -39,8 +39,8 @@ l', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; color: #020617=
3939
r: 1px solid #e2e8f0; border-radius: 8px; background-color: #fff; text-alig=
4040
n: left; font-size: 14px; line-height: 1.5;">
4141
<div style=3D"text-align: center;">
42-
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Cod=
43-
er Logo" style=3D"height: 40px;" />
42+
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Log=
43+
o" style=3D"height: 40px;" />
4444
</div>
4545
<h1 style=3D"text-align: center; font-size: 24px; font-weight: 400; m=
4646
argin: 8px 0 32px; line-height: 1.5;">

coderd/notifications/testdata/rendered-templates/smtp/TemplateUserAccountDeleted.html.golden

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
From: system@coder.com
22
To: bobby@coder.com
33
Subject: User account "bobby" deleted
4-
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
5-
Date: Fri, 11 Oct 2024 09:03:06 +0000
4+
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
5+
Date: Fri, 11 Oct 2024 09:03:06 +0000
66
Content-Type: multipart/alternative; boundary=bbe61b741255b6098bb6b3c1f41b885773df633cb18d2a3002b68e4bc9c4
77
MIME-Version: 1.0
88

@@ -39,8 +39,8 @@ l', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; color: #020617=
3939
r: 1px solid #e2e8f0; border-radius: 8px; background-color: #fff; text-alig=
4040
n: left; font-size: 14px; line-height: 1.5;">
4141
<div style=3D"text-align: center;">
42-
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Cod=
43-
er Logo" style=3D"height: 40px;" />
42+
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Log=
43+
o" style=3D"height: 40px;" />
4444
</div>
4545
<h1 style=3D"text-align: center; font-size: 24px; font-weight: 400; m=
4646
argin: 8px 0 32px; line-height: 1.5;">

coderd/notifications/testdata/rendered-templates/smtp/TemplateUserAccountSuspended.html.golden

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
From: system@coder.com
22
To: bobby@coder.com
33
Subject: User account "bobby" suspended
4-
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
5-
Date: Fri, 11 Oct 2024 09:03:06 +0000
4+
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
5+
Date: Fri, 11 Oct 2024 09:03:06 +0000
66
Content-Type: multipart/alternative; boundary=bbe61b741255b6098bb6b3c1f41b885773df633cb18d2a3002b68e4bc9c4
77
MIME-Version: 1.0
88

@@ -41,8 +41,8 @@ l', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; color: #020617=
4141
r: 1px solid #e2e8f0; border-radius: 8px; background-color: #fff; text-alig=
4242
n: left; font-size: 14px; line-height: 1.5;">
4343
<div style=3D"text-align: center;">
44-
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Cod=
45-
er Logo" style=3D"height: 40px;" />
44+
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Log=
45+
o" style=3D"height: 40px;" />
4646
</div>
4747
<h1 style=3D"text-align: center; font-size: 24px; font-weight: 400; m=
4848
argin: 8px 0 32px; line-height: 1.5;">

coderd/notifications/testdata/rendered-templates/smtp/TemplateUserRequestedOneTimePasscode.html.golden

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
From: system@coder.com
22
To: bobby@coder.com
33
Subject: Your One-Time Passcode for Coder.
4-
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
5-
Date: Fri, 11 Oct 2024 09:03:06 +0000
4+
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
5+
Date: Fri, 11 Oct 2024 09:03:06 +0000
66
Content-Type: multipart/alternative; boundary=bbe61b741255b6098bb6b3c1f41b885773df633cb18d2a3002b68e4bc9c4
77
MIME-Version: 1.0
88

@@ -40,8 +40,8 @@ l', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; color: #020617=
4040
r: 1px solid #e2e8f0; border-radius: 8px; background-color: #fff; text-alig=
4141
n: left; font-size: 14px; line-height: 1.5;">
4242
<div style=3D"text-align: center;">
43-
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Cod=
44-
er Logo" style=3D"height: 40px;" />
43+
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Log=
44+
o" style=3D"height: 40px;" />
4545
</div>
4646
<h1 style=3D"text-align: center; font-size: 24px; font-weight: 400; m=
4747
argin: 8px 0 32px; line-height: 1.5;">

coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceAutoUpdated.html.golden

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
From: system@coder.com
22
To: bobby@coder.com
33
Subject: Workspace "bobby-workspace" updated automatically
4-
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
5-
Date: Fri, 11 Oct 2024 09:03:06 +0000
4+
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
5+
Date: Fri, 11 Oct 2024 09:03:06 +0000
66
Content-Type: multipart/alternative; boundary=bbe61b741255b6098bb6b3c1f41b885773df633cb18d2a3002b68e4bc9c4
77
MIME-Version: 1.0
88

@@ -40,8 +40,8 @@ l', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; color: #020617=
4040
r: 1px solid #e2e8f0; border-radius: 8px; background-color: #fff; text-alig=
4141
n: left; font-size: 14px; line-height: 1.5;">
4242
<div style=3D"text-align: center;">
43-
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Cod=
44-
er Logo" style=3D"height: 40px;" />
43+
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Log=
44+
o" style=3D"height: 40px;" />
4545
</div>
4646
<h1 style=3D"text-align: center; font-size: 24px; font-weight: 400; m=
4747
argin: 8px 0 32px; line-height: 1.5;">

coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceAutobuildFailed.html.golden

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
From: system@coder.com
22
To: bobby@coder.com
33
Subject: Workspace "bobby-workspace" autobuild failed
4-
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
5-
Date: Fri, 11 Oct 2024 09:03:06 +0000
4+
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
5+
Date: Fri, 11 Oct 2024 09:03:06 +0000
66
Content-Type: multipart/alternative; boundary=bbe61b741255b6098bb6b3c1f41b885773df633cb18d2a3002b68e4bc9c4
77
MIME-Version: 1.0
88

@@ -39,8 +39,8 @@ l', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; color: #020617=
3939
r: 1px solid #e2e8f0; border-radius: 8px; background-color: #fff; text-alig=
4040
n: left; font-size: 14px; line-height: 1.5;">
4141
<div style=3D"text-align: center;">
42-
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Cod=
43-
er Logo" style=3D"height: 40px;" />
42+
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Log=
43+
o" style=3D"height: 40px;" />
4444
</div>
4545
<h1 style=3D"text-align: center; font-size: 24px; font-weight: 400; m=
4646
argin: 8px 0 32px; line-height: 1.5;">

coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceBuildsFailedReport.html.golden

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
From: system@coder.com
22
To: bobby@coder.com
33
Subject: Workspace builds failed for template "Bobby First Template"
4-
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
5-
Date: Fri, 11 Oct 2024 09:03:06 +0000
4+
Message-Id: 02ee4935-73be-4fa1-a290-ff9999026b13@blush-whale-48
5+
Date: Fri, 11 Oct 2024 09:03:06 +0000
66
Content-Type: multipart/alternative; boundary=bbe61b741255b6098bb6b3c1f41b885773df633cb18d2a3002b68e4bc9c4
77
MIME-Version: 1.0
88

@@ -57,8 +57,8 @@ l', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; color: #020617=
5757
r: 1px solid #e2e8f0; border-radius: 8px; background-color: #fff; text-alig=
5858
n: left; font-size: 14px; line-height: 1.5;">
5959
<div style=3D"text-align: center;">
60-
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Cod=
61-
er Logo" style=3D"height: 40px;" />
60+
<img src=3D"https://coder.com/coder-logo-horizontal.png" alt=3D"Log=
61+
o" style=3D"height: 40px;" />
6262
</div>
6363
<h1 style=3D"text-align: center; font-size: 24px; font-weight: 400; m=
6464
argin: 8px 0 32px; line-height: 1.5;">

0 commit comments

Comments
 (0)