Chore: Update mailer to remove hardcoded twitter link (#1103)
This commit is contained in:
@@ -11,7 +11,7 @@ class WidgetsController < ActionController::Base
|
|||||||
private
|
private
|
||||||
|
|
||||||
def set_global_config
|
def set_global_config
|
||||||
@global_config = GlobalConfig.get('LOGO_THUMBNAIL', 'INSTALLATION_NAME', 'WIDGET_BRAND_URL')
|
@global_config = GlobalConfig.get('LOGO_THUMBNAIL', 'BRAND_NAME', 'WIDGET_BRAND_URL')
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_web_widget
|
def set_web_widget
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
const {
|
const {
|
||||||
APP_VERSION: appVersion,
|
APP_VERSION: appVersion,
|
||||||
CREATE_NEW_ACCOUNT_FROM_DASHBOARD: createNewAccountFromDashboard,
|
CREATE_NEW_ACCOUNT_FROM_DASHBOARD: createNewAccountFromDashboard,
|
||||||
|
BRAND_NAME: brandName,
|
||||||
INSTALLATION_NAME: installationName,
|
INSTALLATION_NAME: installationName,
|
||||||
LOGO_THUMBNAIL: logoThumbnail,
|
LOGO_THUMBNAIL: logoThumbnail,
|
||||||
LOGO: logo,
|
LOGO: logo,
|
||||||
@@ -12,6 +13,7 @@ const {
|
|||||||
const state = {
|
const state = {
|
||||||
appVersion,
|
appVersion,
|
||||||
createNewAccountFromDashboard,
|
createNewAccountFromDashboard,
|
||||||
|
brandName,
|
||||||
installationName,
|
installationName,
|
||||||
logo,
|
logo,
|
||||||
logoThumbnail,
|
logoThumbnail,
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<a
|
<a
|
||||||
|
v-if="globalConfig.brandName"
|
||||||
class="branding"
|
class="branding"
|
||||||
:href="`${globalConfig.widgetBrandURL}?utm_source=widget_branding`"
|
:href="`${globalConfig.widgetBrandURL}?utm_source=widget_branding`"
|
||||||
rel="noreferrer noopener nofollow"
|
rel="noreferrer noopener nofollow"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
<img
|
<img :alt="globalConfig.brandName" :src="globalConfig.logoThumbnail" />
|
||||||
:alt="globalConfig.installationName"
|
|
||||||
:src="globalConfig.logoThumbnail"
|
|
||||||
/>
|
|
||||||
<span>
|
<span>
|
||||||
{{ useInstallationName($t('POWERED_BY'), globalConfig.installationName) }}
|
{{ useInstallationName($t('POWERED_BY'), globalConfig.brandName) }}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
<div v-else class="brand--alternative" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -58,4 +57,7 @@ export default {
|
|||||||
max-height: $space-slab;
|
max-height: $space-slab;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.brand--alternative {
|
||||||
|
padding: $space-slab;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ class ApplicationMailer < ActionMailer::Base
|
|||||||
helper :frontend_urls
|
helper :frontend_urls
|
||||||
helper do
|
helper do
|
||||||
def global_config
|
def global_config
|
||||||
@global_config ||= GlobalConfig.get('INSTALLATION_NAME', 'BRAND_URL')
|
@global_config ||= GlobalConfig.get('BRAND_NAME', 'BRAND_URL')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -82,13 +82,6 @@
|
|||||||
<meta itemprop="name" content="Confirm Email" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;" />
|
<meta itemprop="name" content="Confirm Email" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;" />
|
||||||
<table width="100%" cellpadding="0" cellspacing="0" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
|
<table width="100%" cellpadding="0" cellspacing="0" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
|
|
||||||
<tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
|
|
||||||
<td class="content-block" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top">
|
|
||||||
— Team <%= global_config['INSTALLATION_NAME'] %> <br/>
|
|
||||||
<a href="<%= global_config['BRAND_URL'] %>" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 12px; vertical-align: top; color: #999; text-align: center; margin: 0; padding: 0 0 20px;" align="center" valign="top"><%= global_config['BRAND_URL'] %></a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -96,10 +89,15 @@
|
|||||||
<div class="footer" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; width: 100%; clear: both; color: #999; margin: 0; padding: 20px;">
|
<div class="footer" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; width: 100%; clear: both; color: #999; margin: 0; padding: 20px;">
|
||||||
<table width="100%" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
|
<table width="100%" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
|
||||||
<tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
|
<tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
|
||||||
<% if global_config['INSTALLATION_NAME'] == 'Chatwoot' %>
|
<% if global_config['BRAND_NAME'].present? %>
|
||||||
<td class="aligncenter content-block" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 12px; vertical-align: top; color: #999; text-align: center; margin: 0; padding: 0 0 20px;" align="center" valign="top">
|
<tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
|
||||||
Follow <a href="http://twitter.com/chatwootapp" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 12px; color: #999; text-decoration: underline; margin: 0;">@chatwootapp</a> on Twitter.
|
<td class="content-block" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top">
|
||||||
</td>
|
Powered by
|
||||||
|
<a href="<%= global_config['BRAND_URL'] %>" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; color: #999; text-align: center; margin: 0; padding: 0 0 20px;" align="center" valign="top">
|
||||||
|
<%= global_config['BRAND_NAME'] %>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -20,3 +20,5 @@
|
|||||||
value:
|
value:
|
||||||
- name: CREATE_NEW_ACCOUNT_FROM_DASHBOARD
|
- name: CREATE_NEW_ACCOUNT_FROM_DASHBOARD
|
||||||
value: false
|
value: false
|
||||||
|
- name: BRAND_NAME
|
||||||
|
value: 'Chatwoot'
|
||||||
|
|||||||
Reference in New Issue
Block a user