2019-08-14 09:48:44 +00:00
<!DOCTYPE html>
<html>
<head>
2020-05-12 07:15:28 +00:00
<title>
<%= @global_config['INSTALLATION_NAME'] %>
</title>
2019-10-18 07:07:09 +00:00
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
2020-05-12 07:15:28 +00:00
<% if @global_config['DISPLAY_MANIFEST'] %>
<meta name="msapplication-TileColor" content="#1f93ff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#1f93ff">
<meta name="description" content="Chatwoot is a customer support solution that helps companies engage customers over Messenger, Twitter, Telegram, WeChat, Whatsapp. Simply connect your channels and converse with your customers from a single place. Easily add new agents to your system and have them own and resolve conversations with customers.Chatwoot also gives you real-time reports to measure your team's performance, canned responses to easily respond to frequently asked questions and private notes for agents to collaborate among themselves.">
2020-12-20 06:22:40 +00:00
<% if ENV['IOS_APP_IDENTIFIER'].present? %>
<meta name="apple-itunes-app" content='app-id=<%= ENV['IOS_APP_IDENTIFIER'] %>'>
<% end %>
2020-05-12 07:15:28 +00:00
<link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/android-icon-192x192.png">
2021-04-13 13:55:19 +00:00
<link class="favicon" rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link class="favicon" rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png">
<link class="favicon" rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
2020-05-12 07:15:28 +00:00
<link rel="manifest" href="/manifest.json">
<% end %>
<link rel="icon" type="image/png" sizes="512x512" href="<%= @global_config['LOGO_THUMBNAIL'] %>">
2019-08-14 09:48:44 +00:00
<%= csrf_meta_tags %>
2019-10-25 06:31:05 +00:00
<script>
window.chatwootConfig = {
2020-04-05 16:41:27 +00:00
hostURL: '<%= ENV.fetch('FRONTEND_URL', '') %>',
2020-02-29 05:50:33 +00:00
fbAppId: '<%= ENV.fetch('FB_APP_ID', nil) %>',
2020-05-05 18:40:56 +00:00
signupEnabled: '<%= ENV.fetch('ENABLE_ACCOUNT_SIGNUP', true) %>',
<% if ENV['VAPID_PUBLIC_KEY'] %>
vapidPublicKey: new Uint8Array(<%= Base64.urlsafe_decode64(ENV['VAPID_PUBLIC_KEY']).bytes %>),
<% end %>
2020-11-24 13:04:31 +00:00
enabledLanguages: <%= available_locales_with_name.to_json.html_safe %>,
selectedLocale: '<%= I18n.locale %>'
2019-10-25 06:31:05 +00:00
}
2020-05-12 07:15:28 +00:00
window.globalConfig = <%= raw @global_config.to_json %>
2021-02-08 11:09:15 +00:00
window.browserConfig = {
browser_name: '<%= browser.name %>',
is_safari: '<%= browser.safari? %>'
}
2021-02-06 07:29:19 +00:00
window.errorLoggingConfig = '<%= ENV.fetch('SENTRY_DSN', '')%>'
2019-10-25 06:31:05 +00:00
</script>
2021-09-07 17:41:01 +00:00
<% if @global_config['ANALYTICS_TOKEN'].present? && @global_config['ANALYTICS_HOST'].present? %>
<script>
window.analyticsConfig = {
token: '<%= @global_config['ANALYTICS_TOKEN'] %>',
host: '<%= @global_config['ANALYTICS_HOST'] %>',
}
</script>
<% end %>
2020-05-11 20:01:40 +00:00
<%= 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 %>
2021-09-07 17:41:01 +00:00
<% if @global_config['CHATWOOT_INBOX_TOKEN'].present? %>
2021-02-08 11:08:35 +00:00
<script>
2021-09-07 17:41:01 +00:00
window.chatwootSettings = { hideMessageBubble: true, position: 'left' };
2021-02-08 11:08:35 +00:00
(function(d,t) {
2021-09-07 17:41:01 +00:00
var BASE_URL="https://app.chatwoot.com";
2021-02-08 11:08:35 +00:00
var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
2021-09-07 17:41:01 +00:00
g.src=BASE_URL+"/packs/js/sdk.js"; g.defer=true; g.async=true;
2021-02-08 11:08:35 +00:00
s.parentNode.insertBefore(g,s);
g.onload=function(){
window.chatwootSDK.run({
websiteToken: '<%= @global_config['CHATWOOT_INBOX_TOKEN'] %>',
baseUrl: BASE_URL,
});
}
})(document,"script");
</script>
<% end %>
2019-08-14 09:48:44 +00:00
</body>
</html>