[Feature] Website live chat (#187)

Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
Co-authored-by: Sojan Jose <sojan@pepalo.com>
This commit is contained in:
Pranav Raj S
2019-10-29 12:50:54 +05:30
committed by GitHub
parent a4114288f3
commit 16fe912fbd
80 changed files with 2040 additions and 106 deletions

View File

@@ -22,5 +22,9 @@ module Chatwoot
# the framework and any gems in your application.
config.generators.javascripts = false
config.generators.stylesheets = false
config.action_dispatch.default_headers = {
'X-Frame-Options' => 'ALLOWALL'
}
end
end

View File

@@ -11,6 +11,8 @@ Rails.application.routes.draw do
match '/status', to: 'home#status', via: [:get]
resources :widgets, only: [:index]
namespace :api, :defaults => { :format => 'json' } do
namespace :v1 do
resources :callbacks, only: [] do
@@ -23,12 +25,8 @@ Rails.application.routes.draw do
end
namespace :widget do
resources :messages, only: [] do
collection do
post :create_incoming
post :create_outgoing
end
end
resources :messages, only: [:index, :create]
resources :inboxes, only: [:create]
end
resources :accounts, only: [:create]

View File

@@ -1,9 +1,5 @@
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
const dotenv = require('dotenv');
dotenv.config({ path: '.env', silent: true });
const environment = require('./environment');
module.exports = environment.toWebpackConfig();

View File

@@ -15,5 +15,10 @@ environment.loaders.append('audio', {
});
environment.config.merge({ resolve });
environment.config.set('output.filename', chunkData => {
return chunkData.chunk.name === 'sdk'
? 'js/[name].js'
: 'js/[name]-[hash].js';
});
module.exports = environment;

View File

@@ -5,6 +5,7 @@ const resolve = {
alias: {
vue$: 'vue/dist/vue.common.js',
dashboard: path.resolve('./app/javascript/dashboard'),
widget: path.resolve('./app/javascript/widget'),
assets: path.resolve('./app/javascript/dashboard/assets'),
components: path.resolve('./app/javascript/dashboard/components'),
},