Skip to content

Commit

Permalink
Bump faf-java-api to v2.18.1
Browse files Browse the repository at this point in the history
Also add email templates
  • Loading branch information
Brutus5000 committed Feb 14, 2022
1 parent 252fb7c commit ee40112
Show file tree
Hide file tree
Showing 5 changed files with 908 additions and 8 deletions.
8 changes: 1 addition & 7 deletions config.template/faf-java-api/faf-java-api.env
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
FAF_DOMAIN=faforever.com
AVATAR_ALLOWED_FILE_EXTENSIONS=png,gif
AVATAR_DOWNLOAD_URL_FORMAT=http://localhost/avatars/%s
AVATAR_IMAGE_HEIGHT=20
AVATAR_IMAGE_WIDTH=40
AVATAR_MAX_SIZE_BYTES=4096
AVATAR_TARGET_DIRECTORY=/content/avatars
ACTIVATION_URL_FORMAT=http://localhost:8020/account/activate?username=%s&token=%s
API_PORT=8010
Expand All @@ -19,7 +17,6 @@ LEAGUE_DATABASE_PASSWORD=banana
LEAGUE_DATABASE_USERNAME=faf-league-service
EMAIL_FROM_ADDRESS=admin@localhost
EMAIL_FROM_NAME=Your localhost FAF team
FEATURED_MOD_BIREUS_URL_FORMAT=http://localhost/bireus/%s
FEATURED_MOD_URL_FORMAT=http://localhost/featured_mods/%s/%s
FEATURED_MODS_TARGET_DIRECTORY=/content/legacy-featured-mod-files
FORGED_ALLIANCE_EXE_PATH=/legacy-featured-mod-files/updates_faf_files/ForgedAlliance.exe
Expand All @@ -29,7 +26,6 @@ GITHUB_WEBHOOK_SECRET=false
JAVA_TOOL_OPTIONS=-Xms256m -Xmx256m
JWT_PRIVATE_KEY_PATH=/pki/secret.key
JWT_PUBLIC_KEY_PATH=/pki/public.key
LOG_FILE_DIRECTORY=/logs
MANDRILL_API_KEY=false
MAP_DOWNLOAD_URL_FORMAT=http://localhost/maps/%s
MAP_LARGE_PREVIEWS_URL_FORMAT=http://localhost/maps/previews/large/%s
Expand All @@ -49,10 +45,8 @@ MOD_DOWNLOAD_URL_FORMAT=http://localhost/mods/%s
MOD_PREVIEW_URL_FORMAT=http://localhost/mods/thumbs/%s
MOD_TARGET_DIRECTORY=/content/mods
MOD_THUMBNAIL_TARGET_DIRECTORY=/content/mods/thumbs
PASSWORD_RESET_EMAIL_BODY=Dear {0},\n\na new password was requested for your user.\nIf you did not request a new password, please delete this email.\n\nOtherwise please click on the following link to reset your password:\n-----------------------\n{1}\n-----------------------\n\nThanks,\n-- The FA Forever team"
PASSWORD_RESET_EMAIL_SUBJECT=FAForever - Password reset
PASSWORD_RESET_URL_FORMAT=http://localhost:8000/account/confirmPasswordReset?username=%s&token=%s
REGISTRATION_EMAIL_BODY=Dear {0},\n\nwelcome to the FAForever community.\nPlease visit the following link to activate your FAF account:\n\n-----------------------\n{1}\n-----------------------\n\nThanks,\n-- The FA Forever team
REGISTRATION_EMAIL_SUBJECT=FAForever - Account validation
REPLAY_DOWNLOAD_URL_FORMAT=http://localhost/replays/%s
REPOSITORIES_DIRECTORY=/repositories
Expand Down
244 changes: 244 additions & 0 deletions config.template/faf-java-api/mail/account-activation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,244 @@
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<title>

</title>
<!--[if !mso]><!-->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!--<![endif]-->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">
#outlook a { padding:0; }
body { margin:0;padding:0;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%; }
table, td { border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt; }
img { border:0;height:auto;line-height:100%; outline:none;text-decoration:none;-ms-interpolation-mode:bicubic; }
p { display:block;margin:13px 0; }
</style>
<!--[if mso]>
<noscript>
<xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
</noscript>
<![endif]-->
<!--[if lte mso 11]>
<style type="text/css">
.mj-outlook-group-fix { width:100% !important; }
</style>
<![endif]-->
<!--[if !mso]><!-->
<link href="https://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz" rel="stylesheet" type="text/css">
<style type="text/css">
@import url(https://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700);
@import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz);
</style>
<!--<![endif]-->
<style type="text/css">
@media only screen and (min-width:480px) {
.mj-column-per-100 { width:100% !important; max-width: 100%; }
}
</style>
<style media="screen and (min-width:480px)">
.moz-text-html .mj-column-per-100 { width:100% !important; max-width: 100%; }
</style>
<style type="text/css">



@media only screen and (max-width:480px) {
table.mj-full-width-mobile { width: 100% !important; }
td.mj-full-width-mobile { width: auto !important; }
}

</style>
<style type="text/css">.footer li {
display: inline-block;
padding: 0 1px;
}

.footer ul {
padding: 0;
list-style-type: none;
}

.footer a {
text-decoration: none;
}

a, a:visited {
color: white;
}

.footer a:hover {
color: #d32a0e;
}</style>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css" integrity="sha512-HK5fgLBL+xu6dm/Ii3z4xhlSUyZgTT9tuc/hSrtw6uzJOvgRr2a9jyxxT1ely+B+xFAmJKVSTbpM/CuL7qxO8w==" crossorigin="anonymous">
</head>
<body style="word-spacing:normal;background-color:#fafafa;">
<div style="display:none;font-size:1px;color:#ffffff;line-height:1px;max-height:0px;max-width:0px;opacity:0;overflow:hidden;">
FAForever account activation
</div>
<div style="background-color:#fafafa;">
<!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><v:rect style="width:600px;" xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false"><v:fill origin="0.5, 0" position="0.5, 0" src="https://faforever.com/images/index-background.jpg" type="tile" size="1,1" aspect="atleast" /><v:textbox style="mso-fit-shape-to-text:true" inset="0,0,0,0"><![endif]-->
<div style="background:url('https://faforever.com/images/index-background.jpg') center top / cover repeat;background-position:center top;background-repeat:repeat;background-size:cover;margin:0px auto;max-width:600px;">
<div style="line-height:0;font-size:0;">
<table align="center" background="https://faforever.com/images/index-background.jpg" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:url('https://faforever.com/images/index-background.jpg') center top / cover repeat;background-position:center top;background-repeat:repeat;background-size:cover;width:100%;">
<tbody>
<tr>
<td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;">
<!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]-->
<div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
<tbody>
<tr>
<td style="font-size:0px;word-break:break-word;">
<div style="height:50px;line-height:50px;">
&#x200a;
</div> </td>
</tr>
<tr>
<td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;">
<tbody>
<tr>
<td style="width:100px;"> <img alt="FAF Logo" height="100" src="https://faforever.com/images/vector_faf_logo.png" style="border:0;display:block;outline:none;text-decoration:none;height:100px;width:100%;font-size:13px;" width="100"> </td>
</tr>
</tbody>
</table> </td>
</tr>
<tr>
<td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;">
<div style="font-family:Yanone Kaffeesatz;font-size:40px;line-height:1;text-align:center;color:white;">
Forged Alliance Forever
</div> </td>
</tr>
<tr>
<td style="font-size:0px;word-break:break-word;">
<div style="height:50px;line-height:50px;">
&#x200a;
</div> </td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table><![endif]--> </td>
</tr>
</tbody>
</table>
</div>
</div>
<!--[if mso | IE]></v:textbox></v:rect></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#ffffff" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="background:#ffffff;background-color:#ffffff;margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#ffffff;background-color:#ffffff;width:100%;">
<tbody>
<tr>
<td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;">
<!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]-->
<div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
<tbody>
<tr>
<td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;">
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:left;color:#000000;">
<h1>Activate your account</h1>
<p>Dear {{username}},</p>
<p>welcome to the FAForever community. To finish your registration please activate your account and select a password. </p>
</div> </td>
</tr>
<tr>
<td align="center" vertical-align="middle" style="font-size:0px;padding:10px 25px;word-break:break-word;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:separate;line-height:100%;">
<tbody>
<tr>
<td align="center" bgcolor="#414141" role="presentation" style="border:none;border-radius:3px;cursor:auto;mso-padding-alt:10px 25px;background:#414141;" valign="middle"> <a href="{{activationUrl}}" style="display:inline-block;background:#414141;color:#ffffff;font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;font-weight:normal;line-height:120%;margin:0;text-decoration:none;text-transform:none;padding:10px 25px;mso-padding-alt:0px;border-radius:3px;" target="_blank"> Activate account </a> </td>
</tr>
</tbody>
</table> </td>
</tr>
<tr>
<td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;">
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:left;color:#000000;">
<p>Further information will be provided to you after activation.</p>
</div> </td>
</tr>
<tr>
<td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;">
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:left;color:#000000;">
<p>Thanks,</p>
<p>-- The FAForever team</p>
</div> </td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table><![endif]--> </td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="gray" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="background:gray;background-color:gray;margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:gray;background-color:gray;width:100%;">
<tbody>
<tr>
<td style="direction:ltr;font-size:0px;padding:0;text-align:center;">
<!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]-->
<div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
<tbody>
<tr>
<td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;">
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:left;color:#d3d3d3;">
<p>You don't know where this email is coming from?</p>
<p>Someone used your email address in the registration form on faforever.com. If you do not wish to be part of our community, just ignore or delete this email. No account was created yet. </p>
</div> </td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table><![endif]--> </td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="footer-outlook" style="width:600px;" width="600" bgcolor="#000000" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div class="footer" style="background:#000000;background-color:#000000;margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#000000;background-color:#000000;width:100%;">
<tbody>
<tr>
<td style="direction:ltr;font-size:0px;padding:2px;text-align:center;">
<!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:596px;" ><![endif]-->
<div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
<tbody>
<tr>
<td align="center" style="font-size:0px;padding:2px;word-break:break-word;">
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:center;color:white;">
<ul>
<li> <a target="_blank" href="https://discord.com/invite/hgvj6Af"> <i class="fab fa-discord" aria-label="FAF Discord"></i> </a> </li>
<li> <a target="_blank" href="https://www.youtube.com/c/ForgedAllianceForever"> <i class="fab fa-youtube" aria-label="FAF Youtube"></i> </a> </li>
<li> <a target="_blank" href="https://www.facebook.com/ForgedAllianceForever"> <i class="fab fa-facebook" aria-label="FAF Facebook"></i> </a> </li>
<li> <a target="_blank" href="https://github.com/FAForever/"> <i class="fab fa-github" aria-label="FAF Github"></i> </a> </li>
<li> <a target="_blank" href="https://www.patreon.com/faf"> <i class="fab fa-patreon" aria-label="FAF Patreon"></i> </a> </li>
</ul>
<p> <a href="https://wwww.faforever.com">www.faforever.com</a> </p>
</div> </td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table><![endif]--> </td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table><![endif]-->
</div>
</body>
</html>
Loading

0 comments on commit ee40112

Please sign in to comment.