diff options
author | Chocobozzz <me@florianbigard.com> | 2023-07-31 14:34:36 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-08-11 15:02:33 +0200 |
commit | 3a4992633ee62d5edfbb484d9c6bcb3cf158489d (patch) | |
tree | e4510b39bdac9c318fdb4b47018d08f15368b8f0 /server/lib/emails | |
parent | 04d1da5621d25d59bd5fa1543b725c497bf5d9a8 (diff) | |
download | PeerTube-3a4992633ee62d5edfbb484d9c6bcb3cf158489d.tar.gz PeerTube-3a4992633ee62d5edfbb484d9c6bcb3cf158489d.tar.zst PeerTube-3a4992633ee62d5edfbb484d9c6bcb3cf158489d.zip |
Migrate server to ESM
Sorry for the very big commit that may lead to git log issues and merge
conflicts, but it's a major step forward:
* Server can be faster at startup because imports() are async and we can
easily lazy import big modules
* Angular doesn't seem to support ES import (with .js extension), so we
had to correctly organize peertube into a monorepo:
* Use yarn workspace feature
* Use typescript reference projects for dependencies
* Shared projects have been moved into "packages", each one is now a
node module (with a dedicated package.json/tsconfig.json)
* server/tools have been moved into apps/ and is now a dedicated app
bundled and published on NPM so users don't have to build peertube
cli tools manually
* server/tests have been moved into packages/ so we don't compile
them every time we want to run the server
* Use isolatedModule option:
* Had to move from const enum to const
(https://www.typescriptlang.org/docs/handbook/enums.html#objects-vs-enums)
* Had to explictely specify "type" imports when used in decorators
* Prefer tsx (that uses esbuild under the hood) instead of ts-node to
load typescript files (tests with mocha or scripts):
* To reduce test complexity as esbuild doesn't support decorator
metadata, we only test server files that do not import server
models
* We still build tests files into js files for a faster CI
* Remove unmaintained peertube CLI import script
* Removed some barrels to speed up execution (less imports)
Diffstat (limited to 'server/lib/emails')
23 files changed, 0 insertions, 502 deletions
diff --git a/server/lib/emails/abuse-new-message/html.pug b/server/lib/emails/abuse-new-message/html.pug deleted file mode 100644 index c1d452e7d..000000000 --- a/server/lib/emails/abuse-new-message/html.pug +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | extends ../common/greetings | ||
2 | include ../common/mixins.pug | ||
3 | |||
4 | block title | ||
5 | | New message on abuse report | ||
6 | |||
7 | block content | ||
8 | p | ||
9 | | A new message by #{messageAccountName} was posted on #[a(href=abuseUrl) abuse report ##{abuseId}] on #{instanceName} | ||
10 | blockquote #{messageText} | ||
11 | br(style="display: none;") | ||
diff --git a/server/lib/emails/abuse-state-change/html.pug b/server/lib/emails/abuse-state-change/html.pug deleted file mode 100644 index bb243e729..000000000 --- a/server/lib/emails/abuse-state-change/html.pug +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | extends ../common/greetings | ||
2 | include ../common/mixins.pug | ||
3 | |||
4 | block title | ||
5 | | Abuse report state changed | ||
6 | |||
7 | block content | ||
8 | p | ||
9 | | #[a(href=abuseUrl) Your abuse report ##{abuseId}] on #{instanceName} has been #{isAccepted ? 'accepted' : 'rejected'} | ||
diff --git a/server/lib/emails/account-abuse-new/html.pug b/server/lib/emails/account-abuse-new/html.pug deleted file mode 100644 index e4c0366fb..000000000 --- a/server/lib/emails/account-abuse-new/html.pug +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | extends ../common/greetings | ||
2 | include ../common/mixins.pug | ||
3 | |||
4 | block title | ||
5 | | An account is pending moderation | ||
6 | |||
7 | block content | ||
8 | p | ||
9 | | #[a(href=WEBSERVER.URL) #{instanceName}] received an abuse report for the #{isLocal ? '' : 'remote '}account | ||
10 | a(href=accountUrl) #{accountDisplayName} | ||
11 | |||
12 | p The reporter, #{reporter}, cited the following reason(s): | ||
13 | blockquote #{reason} | ||
14 | br(style="display: none;") | ||
diff --git a/server/lib/emails/common/base.pug b/server/lib/emails/common/base.pug deleted file mode 100644 index 41e94564d..000000000 --- a/server/lib/emails/common/base.pug +++ /dev/null | |||
@@ -1,258 +0,0 @@ | |||
1 | //- | ||
2 | The email background color is defined in three places: | ||
3 | 1. body tag: for most email clients | ||
4 | 2. center tag: for Gmail and Inbox mobile apps and web versions of Gmail, GSuite, Inbox, Yahoo, AOL, Libero, Comcast, freenet, Mail.ru, Orange.fr | ||
5 | 3. mso conditional: For Windows 10 Mail | ||
6 | - var backgroundColor = "#fff"; | ||
7 | - var mainColor = "#f2690d"; | ||
8 | doctype html | ||
9 | head | ||
10 | // This template is heavily adapted from the Cerberus Fluid template. Kudos to them! | ||
11 | meta(charset='utf-8') | ||
12 | //- utf-8 works for most cases | ||
13 | meta(name='viewport' content='width=device-width') | ||
14 | //- Forcing initial-scale shouldn't be necessary | ||
15 | meta(http-equiv='X-UA-Compatible' content='IE=edge') | ||
16 | //- Use the latest (edge) version of IE rendering engine | ||
17 | meta(name='x-apple-disable-message-reformatting') | ||
18 | //- Disable auto-scale in iOS 10 Mail entirely | ||
19 | meta(name='format-detection' content='telephone=no,address=no,email=no,date=no,url=no') | ||
20 | //- Tell iOS not to automatically link certain text strings. | ||
21 | meta(name='color-scheme' content='light') | ||
22 | meta(name='supported-color-schemes' content='light') | ||
23 | //- The title tag shows in email notifications, like Android 4.4. | ||
24 | title #{subject} | ||
25 | //- What it does: Makes background images in 72ppi Outlook render at correct size. | ||
26 | //if gte mso 9 | ||
27 | xml | ||
28 | o:officedocumentsettings | ||
29 | o:allowpng | ||
30 | o:pixelsperinch 96 | ||
31 | //- CSS Reset : BEGIN | ||
32 | style. | ||
33 | /* What it does: Tells the email client that only light styles are provided but the client can transform them to dark. A duplicate of meta color-scheme meta tag above. */ | ||
34 | :root { | ||
35 | color-scheme: light; | ||
36 | supported-color-schemes: light; | ||
37 | } | ||
38 | /* What it does: Remove spaces around the email design added by some email clients. */ | ||
39 | /* Beware: It can remove the padding / margin and add a background color to the compose a reply window. */ | ||
40 | html, | ||
41 | body { | ||
42 | margin: 0 auto !important; | ||
43 | padding: 0 !important; | ||
44 | height: 100% !important; | ||
45 | width: 100% !important; | ||
46 | } | ||
47 | /* What it does: Stops email clients resizing small text. */ | ||
48 | * { | ||
49 | -ms-text-size-adjust: 100%; | ||
50 | -webkit-text-size-adjust: 100%; | ||
51 | } | ||
52 | /* What it does: Centers email on Android 4.4 */ | ||
53 | div[style*="margin: 16px 0"] { | ||
54 | margin: 0 !important; | ||
55 | } | ||
56 | /* What it does: forces Samsung Android mail clients to use the entire viewport */ | ||
57 | #MessageViewBody, #MessageWebViewDiv{ | ||
58 | width: 100% !important; | ||
59 | } | ||
60 | /* What it does: Stops Outlook from adding extra spacing to tables. */ | ||
61 | table, | ||
62 | td { | ||
63 | mso-table-lspace: 0pt !important; | ||
64 | mso-table-rspace: 0pt !important; | ||
65 | } | ||
66 | /* What it does: Fixes webkit padding issue. */ | ||
67 | table { | ||
68 | border-spacing: 0 !important; | ||
69 | border-collapse: collapse !important; | ||
70 | table-layout: fixed !important; | ||
71 | margin: 0 auto !important; | ||
72 | } | ||
73 | /* What it does: Uses a better rendering method when resizing images in IE. */ | ||
74 | img { | ||
75 | -ms-interpolation-mode:bicubic; | ||
76 | } | ||
77 | /* What it does: Prevents Windows 10 Mail from underlining links despite inline CSS. Styles for underlined links should be inline. */ | ||
78 | a { | ||
79 | text-decoration: none; | ||
80 | } | ||
81 | a:not(.nocolor) { | ||
82 | color: #{mainColor}; | ||
83 | } | ||
84 | a.nocolor { | ||
85 | color: inherit !important; | ||
86 | } | ||
87 | /* What it does: A work-around for email clients meddling in triggered links. */ | ||
88 | a[x-apple-data-detectors], /* iOS */ | ||
89 | .unstyle-auto-detected-links a, | ||
90 | .aBn { | ||
91 | border-bottom: 0 !important; | ||
92 | cursor: default !important; | ||
93 | color: inherit !important; | ||
94 | text-decoration: none !important; | ||
95 | font-size: inherit !important; | ||
96 | font-family: inherit !important; | ||
97 | font-weight: inherit !important; | ||
98 | line-height: inherit !important; | ||
99 | } | ||
100 | /* What it does: Prevents Gmail from displaying a download button on large, non-linked images. */ | ||
101 | .a6S { | ||
102 | display: none !important; | ||
103 | opacity: 0.01 !important; | ||
104 | } | ||
105 | /* What it does: Prevents Gmail from changing the text color in conversation threads. */ | ||
106 | .im { | ||
107 | color: inherit !important; | ||
108 | } | ||
109 | /* If the above doesn't work, add a .g-img class to any image in question. */ | ||
110 | img.g-img + div { | ||
111 | display: none !important; | ||
112 | } | ||
113 | /* What it does: Removes right gutter in Gmail iOS app: https://github.com/TedGoas/Cerberus/issues/89 */ | ||
114 | /* Create one of these media queries for each additional viewport size you'd like to fix */ | ||
115 | /* iPhone 4, 4S, 5, 5S, 5C, and 5SE */ | ||
116 | @media only screen and (min-device-width: 320px) and (max-device-width: 374px) { | ||
117 | u ~ div .email-container { | ||
118 | min-width: 320px !important; | ||
119 | } | ||
120 | } | ||
121 | /* iPhone 6, 6S, 7, 8, and X */ | ||
122 | @media only screen and (min-device-width: 375px) and (max-device-width: 413px) { | ||
123 | u ~ div .email-container { | ||
124 | min-width: 375px !important; | ||
125 | } | ||
126 | } | ||
127 | /* iPhone 6+, 7+, and 8+ */ | ||
128 | @media only screen and (min-device-width: 414px) { | ||
129 | u ~ div .email-container { | ||
130 | min-width: 414px !important; | ||
131 | } | ||
132 | } | ||
133 | //- CSS Reset : END | ||
134 | //- CSS for PeerTube : START | ||
135 | style. | ||
136 | blockquote { | ||
137 | margin-left: 0; | ||
138 | padding-left: 20px; | ||
139 | border-left: 2px solid #f2690d; | ||
140 | } | ||
141 | //- CSS for PeerTube : END | ||
142 | //- Progressive Enhancements : BEGIN | ||
143 | style. | ||
144 | /* What it does: Hover styles for buttons */ | ||
145 | .button-td, | ||
146 | .button-a { | ||
147 | transition: all 100ms ease-in; | ||
148 | } | ||
149 | .button-td-primary:hover, | ||
150 | .button-a-primary:hover { | ||
151 | background: #555555 !important; | ||
152 | border-color: #555555 !important; | ||
153 | } | ||
154 | /* Media Queries */ | ||
155 | @media screen and (max-width: 600px) { | ||
156 | /* What it does: Adjust typography on small screens to improve readability */ | ||
157 | .email-container p { | ||
158 | font-size: 17px !important; | ||
159 | } | ||
160 | } | ||
161 | //- Progressive Enhancements : END | ||
162 | |||
163 | body(width="100%" style="margin: 0; padding: 0 !important; mso-line-height-rule: exactly; background-color: #{backgroundColor};") | ||
164 | center(role='article' aria-roledescription='email' lang='en' style='width: 100%; background-color: #{backgroundColor};') | ||
165 | //if mso | IE | ||
166 | table(role='presentation' border='0' cellpadding='0' cellspacing='0' width='100%' style='background-color: #fff;') | ||
167 | tr | ||
168 | td | ||
169 | //- Visually Hidden Preheader Text : BEGIN | ||
170 | div(style='max-height:0; overflow:hidden; mso-hide:all;' aria-hidden='true') | ||
171 | block preheader | ||
172 | //- Visually Hidden Preheader Text : END | ||
173 | |||
174 | //- Create white space after the desired preview text so email clients don’t pull other distracting text into the inbox preview. Extend as necessary. | ||
175 | //- Preview Text Spacing Hack : BEGIN | ||
176 | div(style='display: none; font-size: 1px; line-height: 1px; max-height: 0px; max-width: 0px; opacity: 0; overflow: hidden; mso-hide: all; font-family: sans-serif;') | ||
177 | | ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ | ||
178 | //- Preview Text Spacing Hack : END | ||
179 | |||
180 | //- | ||
181 | Set the email width. Defined in two places: | ||
182 | 1. max-width for all clients except Desktop Windows Outlook, allowing the email to squish on narrow but never go wider than 600px. | ||
183 | 2. MSO tags for Desktop Windows Outlook enforce a 600px width. | ||
184 | .email-container(style='max-width: 600px; margin: 0 auto;') | ||
185 | //if mso | ||
186 | table(align='center' role='presentation' cellspacing='0' cellpadding='0' border='0' width='600') | ||
187 | tr | ||
188 | td | ||
189 | //- Email Body : BEGIN | ||
190 | table(align='center' role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%' style='margin: auto;') | ||
191 | //- 1 Column Text + Button : BEGIN | ||
192 | tr | ||
193 | td(style='background-color: #ffffff;') | ||
194 | table(role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%') | ||
195 | tr | ||
196 | td(style='padding: 20px; font-family: sans-serif; font-size: 15px; line-height: 20px; color: #555555;') | ||
197 | table(role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%") | ||
198 | tr | ||
199 | td(width="40px") | ||
200 | img(src=`${WEBSERVER.URL}/client/assets/images/icons/icon-192x192.png` width="auto" height="30px" alt="" border="0" style="height: 30px; background: #ffffff; font-family: sans-serif; font-size: 15px; line-height: 15px; color: #555555;") | ||
201 | td | ||
202 | h1(style='margin: 10px 0 10px 0; font-family: sans-serif; font-size: 25px; line-height: 30px; color: #333333; font-weight: normal;') | ||
203 | block title | ||
204 | if title | ||
205 | | #{title} | ||
206 | else | ||
207 | | Something requires your attention | ||
208 | p(style='margin: 0;') | ||
209 | block body | ||
210 | if action | ||
211 | tr | ||
212 | td(style='padding: 0 20px;') | ||
213 | //- Button : BEGIN | ||
214 | table(align='center' role='presentation' cellspacing='0' cellpadding='0' border='0' style='margin: auto;') | ||
215 | tr | ||
216 | td.button-td.button-td-primary(style='border-radius: 4px; background: #222222;') | ||
217 | a.button-a.button-a-primary(href=action.url style='background: #222222; border: 1px solid #000000; font-family: sans-serif; font-size: 15px; line-height: 15px; text-decoration: none; padding: 13px 17px; color: #ffffff; display: block; border-radius: 4px;') #{action.text} | ||
218 | //- Button : END | ||
219 | //- 1 Column Text + Button : END | ||
220 | //- Clear Spacer : BEGIN | ||
221 | tr | ||
222 | td(aria-hidden='true' height='20' style='font-size: 0px; line-height: 0px;') | ||
223 | br | ||
224 | //- Clear Spacer : END | ||
225 | //- Email Body : END | ||
226 | //- Email Footer : BEGIN | ||
227 | unless hideNotificationPreferencesLink | ||
228 | table(align='center' role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%' style='margin: auto;') | ||
229 | tr | ||
230 | td(style='padding: 20px; padding-bottom: 0px; font-family: sans-serif; font-size: 12px; line-height: 15px; text-align: center; color: #888888;') | ||
231 | webversion | ||
232 | a.nocolor(href=`${WEBSERVER.URL}/my-account/notifications` style='color: #cccccc; font-weight: bold;') View in your notifications | ||
233 | br | ||
234 | tr | ||
235 | td(style='padding: 20px; padding-top: 10px; font-family: sans-serif; font-size: 12px; line-height: 15px; text-align: center; color: #888888;') | ||
236 | unsubscribe | ||
237 | a.nocolor(href=`${WEBSERVER.URL}/my-account/settings#notifications` style='color: #888888;') Manage your notification preferences in your profile | ||
238 | br | ||
239 | //- Email Footer : END | ||
240 | //if mso | ||
241 | //- Full Bleed Background Section : BEGIN | ||
242 | table(role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%' style=`background-color: ${mainColor};`) | ||
243 | tr | ||
244 | td | ||
245 | .email-container(align='center' style='max-width: 600px; margin: auto;') | ||
246 | //if mso | ||
247 | table(role='presentation' cellspacing='0' cellpadding='0' border='0' width='600' align='center') | ||
248 | tr | ||
249 | td | ||
250 | table(role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%') | ||
251 | tr | ||
252 | td(style='padding: 20px; text-align: left; font-family: sans-serif; font-size: 12px; line-height: 20px; color: #ffffff;') | ||
253 | table(role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%") | ||
254 | tr | ||
255 | td(valign="top") #[a(href="https://github.com/Chocobozzz/PeerTube" style="color: white !important") PeerTube © 2015-#{new Date().getFullYear()}] #[a(href="https://github.com/Chocobozzz/PeerTube/blob/master/CREDITS.md" style="color: white !important") PeerTube Contributors] | ||
256 | //if mso | ||
257 | //- Full Bleed Background Section : END | ||
258 | //if mso | IE | ||
diff --git a/server/lib/emails/common/greetings.pug b/server/lib/emails/common/greetings.pug deleted file mode 100644 index 5efe29dfb..000000000 --- a/server/lib/emails/common/greetings.pug +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | extends base | ||
2 | |||
3 | block body | ||
4 | if username | ||
5 | p Hi #{username}, | ||
6 | else | ||
7 | p Hi, | ||
8 | block content | ||
9 | p | ||
10 | | Cheers,#[br] | ||
11 | | #{EMAIL.BODY.SIGNATURE} \ No newline at end of file | ||
diff --git a/server/lib/emails/common/html.pug b/server/lib/emails/common/html.pug deleted file mode 100644 index d76168b85..000000000 --- a/server/lib/emails/common/html.pug +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | extends greetings | ||
2 | |||
3 | block content | ||
4 | p !{text} \ No newline at end of file | ||
diff --git a/server/lib/emails/common/mixins.pug b/server/lib/emails/common/mixins.pug deleted file mode 100644 index 831211864..000000000 --- a/server/lib/emails/common/mixins.pug +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | mixin channel(channel) | ||
2 | - var handle = `${channel.name}@${channel.host}` | ||
3 | | #[a(href=`${WEBSERVER.URL}/video-channels/${handle}` title=handle) #{channel.displayName}] | ||
4 | |||
5 | mixin account(account) | ||
6 | - var handle = `${account.name}@${account.host}` | ||
7 | | #[a(href=`${WEBSERVER.URL}/accounts/${handle}` title=handle) #{account.displayName}] | ||
diff --git a/server/lib/emails/contact-form/html.pug b/server/lib/emails/contact-form/html.pug deleted file mode 100644 index 5a24fa6f1..000000000 --- a/server/lib/emails/contact-form/html.pug +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | extends ../common/greetings | ||
2 | |||
3 | block title | ||
4 | | Someone just used the contact form | ||
5 | |||
6 | block content | ||
7 | p #{fromName} sent you a message via the contact form on #[a(href=WEBSERVER.URL) #{instanceName}]: | ||
8 | blockquote(style='white-space: pre-wrap') #{body} | ||
9 | p You can contact them at #[a(href=`mailto:${fromEmail}`) #{fromEmail}], or simply reply to this email to get in touch. \ No newline at end of file | ||
diff --git a/server/lib/emails/follower-on-channel/html.pug b/server/lib/emails/follower-on-channel/html.pug deleted file mode 100644 index 8a352e90f..000000000 --- a/server/lib/emails/follower-on-channel/html.pug +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | extends ../common/greetings | ||
2 | |||
3 | block title | ||
4 | | New follower on your channel | ||
5 | |||
6 | block content | ||
7 | p. | ||
8 | Your #{followType} #[a(href=followingUrl) #{followingName}] has a new subscriber: | ||
9 | #[a(href=followerUrl) #{followerName}]. \ No newline at end of file | ||
diff --git a/server/lib/emails/password-create/html.pug b/server/lib/emails/password-create/html.pug deleted file mode 100644 index afa30ae97..000000000 --- a/server/lib/emails/password-create/html.pug +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | extends ../common/greetings | ||
2 | |||
3 | block title | ||
4 | | Password creation for your account | ||
5 | |||
6 | block content | ||
7 | p. | ||
8 | Welcome to #[a(href=WEBSERVER.URL) #{instanceName}]. Your username is: #{username}. | ||
9 | Please set your password by following #[a(href=createPasswordUrl) this link]: #[a(href=createPasswordUrl) #{createPasswordUrl}] | ||
10 | (this link will expire within seven days). \ No newline at end of file | ||
diff --git a/server/lib/emails/password-reset/html.pug b/server/lib/emails/password-reset/html.pug deleted file mode 100644 index 2af2885bc..000000000 --- a/server/lib/emails/password-reset/html.pug +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | extends ../common/greetings | ||
2 | |||
3 | block title | ||
4 | | Password reset for your account | ||
5 | |||
6 | block content | ||
7 | p. | ||
8 | A reset password procedure for your account #{username} has been requested on #[a(href=WEBSERVER.URL) #{instanceName}]. | ||
9 | Please follow #[a(href=resetPasswordUrl) this link] to reset it: #[a(href=resetPasswordUrl) #{resetPasswordUrl}] | ||
10 | (the link will expire within 1 hour). | ||
11 | p. | ||
12 | If you are not the person who initiated this request, please ignore this email. | ||
diff --git a/server/lib/emails/peertube-version-new/html.pug b/server/lib/emails/peertube-version-new/html.pug deleted file mode 100644 index 2f4d9399d..000000000 --- a/server/lib/emails/peertube-version-new/html.pug +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | extends ../common/greetings | ||
2 | |||
3 | block title | ||
4 | | New PeerTube version available | ||
5 | |||
6 | block content | ||
7 | p | ||
8 | | A new version of PeerTube is available: #{latestVersion}. | ||
9 | | You can check the latest news on #[a(href="https://joinpeertube.org/news") JoinPeerTube]. | ||
diff --git a/server/lib/emails/plugin-version-new/html.pug b/server/lib/emails/plugin-version-new/html.pug deleted file mode 100644 index 86d3d87e8..000000000 --- a/server/lib/emails/plugin-version-new/html.pug +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | extends ../common/greetings | ||
2 | |||
3 | block title | ||
4 | | New plugin version available | ||
5 | |||
6 | block content | ||
7 | p | ||
8 | | A new version of the plugin/theme #{pluginName} is available: #{latestVersion}. | ||
9 | | You might want to upgrade it on #[a(href=pluginUrl) the PeerTube admin interface]. | ||
diff --git a/server/lib/emails/user-registered/html.pug b/server/lib/emails/user-registered/html.pug deleted file mode 100644 index 20f62125e..000000000 --- a/server/lib/emails/user-registered/html.pug +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | extends ../common/greetings | ||
2 | |||
3 | block title | ||
4 | | A new user registered | ||
5 | |||
6 | block content | ||
7 | - var mail = user.email || user.pendingEmail; | ||
8 | p | ||
9 | | User #[a(href=`${WEBSERVER.URL}/accounts/${user.username}`) #{user.username}] just registered. | ||
10 | | You might want to contact them at #[a(href=`mailto:${mail}`) #{mail}]. \ No newline at end of file | ||
diff --git a/server/lib/emails/user-registration-request-accepted/html.pug b/server/lib/emails/user-registration-request-accepted/html.pug deleted file mode 100644 index 7a52c3fe1..000000000 --- a/server/lib/emails/user-registration-request-accepted/html.pug +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | extends ../common/greetings | ||
2 | |||
3 | block title | ||
4 | | Congratulation #{username}, your registration request has been accepted! | ||
5 | |||
6 | block content | ||
7 | p Your registration request has been accepted. | ||
8 | p Moderators sent you the following message: | ||
9 | blockquote(style='white-space: pre-wrap') #{moderationResponse} | ||
10 | p Your account has been created and you can login on #[a(href=loginLink) #{loginLink}] | ||
diff --git a/server/lib/emails/user-registration-request-rejected/html.pug b/server/lib/emails/user-registration-request-rejected/html.pug deleted file mode 100644 index ec0aa8dfe..000000000 --- a/server/lib/emails/user-registration-request-rejected/html.pug +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | extends ../common/greetings | ||
2 | |||
3 | block title | ||
4 | | Registration request of your account #{username} has rejected | ||
5 | |||
6 | block content | ||
7 | p Your registration request has been rejected. | ||
8 | p Moderators sent you the following message: | ||
9 | blockquote(style='white-space: pre-wrap') #{moderationResponse} | ||
diff --git a/server/lib/emails/user-registration-request/html.pug b/server/lib/emails/user-registration-request/html.pug deleted file mode 100644 index 64898f3f2..000000000 --- a/server/lib/emails/user-registration-request/html.pug +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | extends ../common/greetings | ||
2 | |||
3 | block title | ||
4 | | A new user wants to register | ||
5 | |||
6 | block content | ||
7 | p User #{registration.username} wants to register on your PeerTube instance with the following reason: | ||
8 | blockquote(style='white-space: pre-wrap') #{registration.registrationReason} | ||
9 | p You can accept or reject the registration request in the #[a(href=`${WEBSERVER.URL}/admin/moderation/registrations/list`) administration]. | ||
diff --git a/server/lib/emails/verify-email/html.pug b/server/lib/emails/verify-email/html.pug deleted file mode 100644 index 19ef65f75..000000000 --- a/server/lib/emails/verify-email/html.pug +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | extends ../common/greetings | ||
2 | |||
3 | block title | ||
4 | | Email verification | ||
5 | |||
6 | block content | ||
7 | if isRegistrationRequest | ||
8 | p You just requested an account on #[a(href=WEBSERVER.URL) #{instanceName}]. | ||
9 | else | ||
10 | p You just created an account on #[a(href=WEBSERVER.URL) #{instanceName}]. | ||
11 | |||
12 | if isRegistrationRequest | ||
13 | p To complete your registration request you must verify your email first! | ||
14 | else | ||
15 | p To start using your account you must verify your email first! | ||
16 | |||
17 | p Please follow #[a(href=verifyEmailUrl) this link] to verify this email belongs to you. | ||
18 | p If you can't see the verification link above you can use the following link #[a(href=verifyEmailUrl) #{verifyEmailUrl}] | ||
19 | p If you are not the person who initiated this request, please ignore this email. | ||
diff --git a/server/lib/emails/video-abuse-new/html.pug b/server/lib/emails/video-abuse-new/html.pug deleted file mode 100644 index a085b4b38..000000000 --- a/server/lib/emails/video-abuse-new/html.pug +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | extends ../common/greetings | ||
2 | include ../common/mixins.pug | ||
3 | |||
4 | block title | ||
5 | | A video is pending moderation | ||
6 | |||
7 | block content | ||
8 | p | ||
9 | | #[a(href=WEBSERVER.URL) #{instanceName}] received an abuse report for the #{isLocal ? '' : 'remote '}video " | ||
10 | a(href=videoUrl) #{videoName} | ||
11 | | " by #[+channel(videoChannel)] | ||
12 | if videoPublishedAt | ||
13 | | , published the #{videoPublishedAt}. | ||
14 | else | ||
15 | | , uploaded the #{videoCreatedAt} but not yet published. | ||
16 | p The reporter, #{reporter}, cited the following reason(s): | ||
17 | blockquote #{reason} | ||
18 | br(style="display: none;") | ||
diff --git a/server/lib/emails/video-auto-blacklist-new/html.pug b/server/lib/emails/video-auto-blacklist-new/html.pug deleted file mode 100644 index 07c8dfd16..000000000 --- a/server/lib/emails/video-auto-blacklist-new/html.pug +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | extends ../common/greetings | ||
2 | include ../common/mixins | ||
3 | |||
4 | block title | ||
5 | | A video is pending moderation | ||
6 | |||
7 | block content | ||
8 | p | ||
9 | | A recently added video was auto-blacklisted and requires moderator review before going public: | ||
10 | | | ||
11 | a(href=videoUrl) #{videoName} | ||
12 | | | ||
13 | | by #[+channel(channel)]. | ||
14 | p. | ||
15 | Apart from the publisher and the moderation team, no one will be able to see the video until you | ||
16 | unblacklist it. If you trust the publisher, any admin can whitelist the user for later videos so | ||
17 | that they don't require approval before going public. | ||
diff --git a/server/lib/emails/video-comment-abuse-new/html.pug b/server/lib/emails/video-comment-abuse-new/html.pug deleted file mode 100644 index 752bf7c10..000000000 --- a/server/lib/emails/video-comment-abuse-new/html.pug +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | extends ../common/greetings | ||
2 | include ../common/mixins.pug | ||
3 | |||
4 | block title | ||
5 | | A comment is pending moderation | ||
6 | |||
7 | block content | ||
8 | p | ||
9 | | #[a(href=WEBSERVER.URL) #{instanceName}] received an abuse report for the #{isLocal ? '' : 'remote '} | ||
10 | a(href=commentUrl) comment on video "#{videoName}" | ||
11 | | of #{flaggedAccount} | ||
12 | | created on #{commentCreatedAt} | ||
13 | |||
14 | p The reporter, #{reporter}, cited the following reason(s): | ||
15 | blockquote #{reason} | ||
16 | br(style="display: none;") | ||
diff --git a/server/lib/emails/video-comment-mention/html.pug b/server/lib/emails/video-comment-mention/html.pug deleted file mode 100644 index a34c6b090..000000000 --- a/server/lib/emails/video-comment-mention/html.pug +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | extends ../common/greetings | ||
2 | |||
3 | block title | ||
4 | | Someone mentioned you | ||
5 | |||
6 | block content | ||
7 | p. | ||
8 | #[a(href=accountUrl title=handle) #{accountName}] mentioned you in a comment on video | ||
9 | "#[a(href=videoUrl) #{video.name}]": | ||
10 | blockquote !{commentHtml} | ||
11 | br(style="display: none;") | ||
diff --git a/server/lib/emails/video-comment-new/html.pug b/server/lib/emails/video-comment-new/html.pug deleted file mode 100644 index cbb683fee..000000000 --- a/server/lib/emails/video-comment-new/html.pug +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | extends ../common/greetings | ||
2 | |||
3 | block title | ||
4 | | Someone commented your video | ||
5 | |||
6 | block content | ||
7 | p. | ||
8 | #[a(href=accountUrl title=handle) #{accountName}] added a comment on your video | ||
9 | "#[a(href=videoUrl) #{video.name}]": | ||
10 | blockquote !{commentHtml} | ||
11 | br(style="display: none;") | ||