mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Replace welcome image in email templates
This commit is contained in:
parent
77b031083e
commit
dd09dfa721
@ -45,7 +45,7 @@ export async function handler(req, res) {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
debug(error)
|
debug(error)
|
||||||
return res.status(500).json({
|
return res.status(500).json({
|
||||||
error: `Something went terribly wrong. Please contact ${CONFIG.EMAIL_SUPPORT}`,
|
error: `Something went terribly wrong. Please visit ${CONFIG.SUPPORT_URL}`,
|
||||||
})
|
})
|
||||||
} finally {
|
} finally {
|
||||||
session.close()
|
session.close()
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
import dotenv from 'dotenv'
|
import dotenv from 'dotenv'
|
||||||
|
import links from './links.js'
|
||||||
|
|
||||||
if (require.resolve) {
|
if (require.resolve) {
|
||||||
// are we in a nodejs environment?
|
// are we in a nodejs environment?
|
||||||
try {
|
try {
|
||||||
@ -37,7 +39,6 @@ const {
|
|||||||
REDIS_PORT,
|
REDIS_PORT,
|
||||||
REDIS_PASSWORD,
|
REDIS_PASSWORD,
|
||||||
EMAIL_DEFAULT_SENDER,
|
EMAIL_DEFAULT_SENDER,
|
||||||
EMAIL_SUPPORT,
|
|
||||||
} = env
|
} = env
|
||||||
|
|
||||||
export const requiredConfigs = {
|
export const requiredConfigs = {
|
||||||
@ -92,7 +93,7 @@ export const s3Configs = {
|
|||||||
|
|
||||||
export const customConfigs = {
|
export const customConfigs = {
|
||||||
EMAIL_DEFAULT_SENDER,
|
EMAIL_DEFAULT_SENDER,
|
||||||
EMAIL_SUPPORT,
|
SUPPORT_URL: links.SUPPORT,
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
6
backend/src/config/links.js
Normal file
6
backend/src/config/links.js
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
export default {
|
||||||
|
ORGANIZATION: 'https://human-connection.org/',
|
||||||
|
DONATE: 'https://human-connection.org/spenden/',
|
||||||
|
FAQ: 'https://faq.human-connection.org/',
|
||||||
|
SUPPORT: 'https://human-connection.org/support'
|
||||||
|
}
|
||||||
@ -4,7 +4,8 @@ import CONFIG from '../../config'
|
|||||||
import * as templates from './templates'
|
import * as templates from './templates'
|
||||||
|
|
||||||
const from = CONFIG.EMAIL_DEFAULT_SENDER
|
const from = CONFIG.EMAIL_DEFAULT_SENDER
|
||||||
const supportUrl = 'https://human-connection.org/en/contact'
|
const supportUrl = CONFIG.SUPPORT_URL
|
||||||
|
const welcomeImageUrl = new URL(`/img/custom/welcome.svg`, CONFIG.CLIENT_URI)
|
||||||
|
|
||||||
export const signupTemplate = ({ email, nonce }) => {
|
export const signupTemplate = ({ email, nonce }) => {
|
||||||
const subject = 'Willkommen, Bienvenue, Welcome to Human Connection!'
|
const subject = 'Willkommen, Bienvenue, Welcome to Human Connection!'
|
||||||
@ -18,7 +19,7 @@ export const signupTemplate = ({ email, nonce }) => {
|
|||||||
subject,
|
subject,
|
||||||
html: mustache.render(
|
html: mustache.render(
|
||||||
templates.layout,
|
templates.layout,
|
||||||
{ actionUrl, nonce, supportUrl, subject },
|
{ actionUrl, nonce, supportUrl, welcomeImageUrl, subject },
|
||||||
{ content: templates.signup },
|
{ content: templates.signup },
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
@ -36,7 +37,7 @@ export const emailVerificationTemplate = ({ email, nonce, name }) => {
|
|||||||
subject,
|
subject,
|
||||||
html: mustache.render(
|
html: mustache.render(
|
||||||
templates.layout,
|
templates.layout,
|
||||||
{ actionUrl, name, nonce, supportUrl, subject },
|
{ actionUrl, name, nonce, supportUrl, welcomeImageUrl, subject },
|
||||||
{ content: templates.emailVerification },
|
{ content: templates.emailVerification },
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
@ -54,7 +55,7 @@ export const resetPasswordTemplate = ({ email, nonce, name }) => {
|
|||||||
subject,
|
subject,
|
||||||
html: mustache.render(
|
html: mustache.render(
|
||||||
templates.layout,
|
templates.layout,
|
||||||
{ actionUrl, name, nonce, supportUrl, subject },
|
{ actionUrl, name, nonce, supportUrl, welcomeImageUrl, subject },
|
||||||
{ content: templates.passwordReset },
|
{ content: templates.passwordReset },
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
@ -70,7 +71,7 @@ export const wrongAccountTemplate = ({ email }) => {
|
|||||||
subject,
|
subject,
|
||||||
html: mustache.render(
|
html: mustache.render(
|
||||||
templates.layout,
|
templates.layout,
|
||||||
{ actionUrl, supportUrl },
|
{ actionUrl, supportUrl, welcomeImageUrl },
|
||||||
{ content: templates.wrongAccount },
|
{ content: templates.wrongAccount },
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td style="background-color: #ffffff;">
|
<td style="background-color: #ffffff;">
|
||||||
<img
|
<img
|
||||||
src="https://firebasestorage.googleapis.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LcGvGRsW6DrZn7FWRzF%2F-LcGv6EiVcsjYLfQ_2YE%2F-LcGv8UtmAWc61fxGveg%2Flets_get_together.png?generation=1555078880410873&alt=media"
|
src="{{{ welcomeImageUrl }}}"
|
||||||
width="600" height="" alt="Human Connection community logo" border="0"
|
width="600" height="" alt="Human Connection community logo" border="0"
|
||||||
style="width: 100%; max-width: 600px; height: auto; background: #ffffff; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; color: #555555; margin: auto; display: block;"
|
style="width: 100%; max-width: 600px; height: auto; background: #ffffff; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; color: #555555; margin: auto; display: block;"
|
||||||
class="g-img">
|
class="g-img">
|
||||||
@ -104,7 +104,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td style="background-color: #ffffff;">
|
<td style="background-color: #ffffff;">
|
||||||
<img
|
<img
|
||||||
src="https://firebasestorage.googleapis.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LcGvGRsW6DrZn7FWRzF%2F-LcGv6EiVcsjYLfQ_2YE%2F-LcGv8UtmAWc61fxGveg%2Flets_get_together.png?generation=1555078880410873&alt=media"
|
src="{{{ welcomeImageUrl }}}"
|
||||||
width="600" height="" alt="Human Connection community logo" border="0"
|
width="600" height="" alt="Human Connection community logo" border="0"
|
||||||
style="width: 100%; max-width: 600px; height: auto; background: #ffffff; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; color: #555555; margin: auto; display: block;"
|
style="width: 100%; max-width: 600px; height: auto; background: #ffffff; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; color: #555555; margin: auto; display: block;"
|
||||||
class="g-img">
|
class="g-img">
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td style="background-color: #ffffff;">
|
<td style="background-color: #ffffff;">
|
||||||
<img
|
<img
|
||||||
src="https://firebasestorage.googleapis.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LcGvGRsW6DrZn7FWRzF%2F-LcGv6EiVcsjYLfQ_2YE%2F-LcGv8UtmAWc61fxGveg%2Flets_get_together.png?generation=1555078880410873&alt=media"
|
src="{{{ welcomeImageUrl }}}"
|
||||||
width="600" height="" alt="Human Connection community logo" border="0"
|
width="600" height="" alt="Human Connection community logo" border="0"
|
||||||
style="width: 100%; max-width: 600px; height: auto; background: #ffffff; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; color: #555555; margin: auto; display: block;"
|
style="width: 100%; max-width: 600px; height: auto; background: #ffffff; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; color: #555555; margin: auto; display: block;"
|
||||||
class="g-img">
|
class="g-img">
|
||||||
@ -104,7 +104,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td style="background-color: #ffffff;">
|
<td style="background-color: #ffffff;">
|
||||||
<img
|
<img
|
||||||
src="https://firebasestorage.googleapis.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LcGvGRsW6DrZn7FWRzF%2F-LcGv6EiVcsjYLfQ_2YE%2F-LcGv8UtmAWc61fxGveg%2Flets_get_together.png?generation=1555078880410873&alt=media"
|
src="{{{ welcomeImageUrl }}}"
|
||||||
width="600" height="" alt="Human Connection community logo" border="0"
|
width="600" height="" alt="Human Connection community logo" border="0"
|
||||||
style="width: 100%; max-width: 600px; height: auto; background: #ffffff; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; color: #555555; margin: auto; display: block;"
|
style="width: 100%; max-width: 600px; height: auto; background: #ffffff; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; color: #555555; margin: auto; display: block;"
|
||||||
class="g-img">
|
class="g-img">
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td style="background-color: #ffffff;">
|
<td style="background-color: #ffffff;">
|
||||||
<img
|
<img
|
||||||
src="https://firebasestorage.googleapis.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LcGvGRsW6DrZn7FWRzF%2F-LcGv6EiVcsjYLfQ_2YE%2F-LcGv8UtmAWc61fxGveg%2Flets_get_together.png?generation=1555078880410873&alt=media"
|
src="{{{ welcomeImageUrl }}}"
|
||||||
width="600" height="" alt="Human Connection community logo" border="0"
|
width="600" height="" alt="Human Connection community logo" border="0"
|
||||||
style="width: 100%; max-width: 600px; height: auto; background: #ffffff; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; color: #555555; margin: auto; display: block;"
|
style="width: 100%; max-width: 600px; height: auto; background: #ffffff; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; color: #555555; margin: auto; display: block;"
|
||||||
class="g-img">
|
class="g-img">
|
||||||
@ -117,7 +117,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td style="background-color: #ffffff;">
|
<td style="background-color: #ffffff;">
|
||||||
<img
|
<img
|
||||||
src="https://firebasestorage.googleapis.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LcGvGRsW6DrZn7FWRzF%2F-LcGv6EiVcsjYLfQ_2YE%2F-LcGv8UtmAWc61fxGveg%2Flets_get_together.png?generation=1555078880410873&alt=media"
|
src="{{{ welcomeImageUrl }}}"
|
||||||
width="600" height="" alt="Human Connection community logo" border="0"
|
width="600" height="" alt="Human Connection community logo" border="0"
|
||||||
style="width: 100%; max-width: 600px; height: auto; background: #ffffff; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; color: #555555; margin: auto; display: block;"
|
style="width: 100%; max-width: 600px; height: auto; background: #ffffff; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; color: #555555; margin: auto; display: block;"
|
||||||
class="g-img">
|
class="g-img">
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td style="background-color: #ffffff;">
|
<td style="background-color: #ffffff;">
|
||||||
<img
|
<img
|
||||||
src="https://firebasestorage.googleapis.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LcGvGRsW6DrZn7FWRzF%2F-LcGv6EiVcsjYLfQ_2YE%2F-LcGv8UtmAWc61fxGveg%2Flets_get_together.png?generation=1555078880410873&alt=media"
|
src="{{{ welcomeImageUrl }}}"
|
||||||
width="600" height="" alt="Human Connection community logo" border="0"
|
width="600" height="" alt="Human Connection community logo" border="0"
|
||||||
style="width: 100%; max-width: 600px; height: auto; background: #ffffff; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; color: #555555; margin: auto; display: block;"
|
style="width: 100%; max-width: 600px; height: auto; background: #ffffff; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; color: #555555; margin: auto; display: block;"
|
||||||
class="g-img">
|
class="g-img">
|
||||||
|
|||||||
@ -45,7 +45,6 @@ services:
|
|||||||
- MAPBOX_TOKEN=pk.eyJ1IjoiaHVtYW4tY29ubmVjdGlvbiIsImEiOiJjajl0cnBubGoweTVlM3VwZ2lzNTNud3ZtIn0.KZ8KK9l70omjXbEkkbHGsQ
|
- MAPBOX_TOKEN=pk.eyJ1IjoiaHVtYW4tY29ubmVjdGlvbiIsImEiOiJjajl0cnBubGoweTVlM3VwZ2lzNTNud3ZtIn0.KZ8KK9l70omjXbEkkbHGsQ
|
||||||
- PRIVATE_KEY_PASSPHRASE=a7dsf78sadg87ad87sfagsadg78
|
- PRIVATE_KEY_PASSPHRASE=a7dsf78sadg87ad87sfagsadg78
|
||||||
- "DEBUG=${DEBUG}"
|
- "DEBUG=${DEBUG}"
|
||||||
- EMAIL_SUPPORT=support@human-connection.org
|
|
||||||
- EMAIL_DEFAULT_SENDER=info@human-connection.org
|
- EMAIL_DEFAULT_SENDER=info@human-connection.org
|
||||||
neo4j:
|
neo4j:
|
||||||
image: schoolsinmotion/neo4j:latest
|
image: schoolsinmotion/neo4j:latest
|
||||||
|
|||||||
@ -2,4 +2,5 @@ export default {
|
|||||||
ORGANIZATION: 'https://human-connection.org/',
|
ORGANIZATION: 'https://human-connection.org/',
|
||||||
DONATE: 'https://human-connection.org/spenden/',
|
DONATE: 'https://human-connection.org/spenden/',
|
||||||
FAQ: 'https://faq.human-connection.org/',
|
FAQ: 'https://faq.human-connection.org/',
|
||||||
|
SUPPORT: 'https://human-connection.org/support'
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user