Chore: Use installation config in frontend (#847)
* Use installation config in widget * Add configuration for installation in UI * Add config for mailer Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
@@ -85,8 +85,8 @@
|
||||
|
||||
<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 Chatwoot <br/>
|
||||
<a href="https://www.chatwoot.com" 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">https://www.chatwoot.com</a>
|
||||
— 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>
|
||||
@@ -96,9 +96,11 @@
|
||||
<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;">
|
||||
<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' %>
|
||||
<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">
|
||||
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>
|
||||
<% end %>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -22,13 +22,6 @@
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
<%= csrf_meta_tags %>
|
||||
<%= javascript_pack_tag 'application' %>
|
||||
<%= stylesheet_pack_tag 'application' %>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<noscript id="noscript">This app works best with JavaScript enabled.</noscript>
|
||||
<%= yield %>
|
||||
<script>
|
||||
window.chatwootConfig = {
|
||||
hostURL: '<%= ENV.fetch('FRONTEND_URL', '') %>',
|
||||
@@ -40,6 +33,14 @@
|
||||
<% end %>
|
||||
enabledLanguages: <%= available_locales_with_name.to_json.html_safe %>
|
||||
}
|
||||
window.globalConfig = <%= raw GlobalConfig.get('LOGO', 'INSTALLATION_NAME', 'WIDGET_BRAND_URL', 'TERMS_URL', 'PRIVACY_URL').to_json %>
|
||||
</script>
|
||||
<%= javascript_pack_tag 'application' %>
|
||||
<%= stylesheet_pack_tag 'application' %>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<noscript id="noscript">This app works best with JavaScript enabled.</noscript>
|
||||
<%= yield %>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
}
|
||||
window.chatwootPubsubToken = '<%= @contact.pubsub_token %>'
|
||||
window.authToken = '<%= @token %>'
|
||||
window.globalConfig = <%= raw GlobalConfig.get('LOGO_THUMBNAIL', 'INSTALLATION_NAME', 'WIDGET_BRAND_URL').to_json %>
|
||||
</script>
|
||||
<%= javascript_pack_tag 'widget' %>
|
||||
<%= stylesheet_pack_tag 'widget' %>
|
||||
|
||||
Reference in New Issue
Block a user