Skip to content

AlexanderKanakis/Rocket.Chat.Livechat

 
 

Repository files navigation

Rocket.Chat.Livechat

When making changes, run yarn build to create a new build before merging with master

This branch contains a button component @ /src/components/Messages/MessageAction.

Screenshot 2020-06-09 at 8 43 21 PM

For example you can send a following rich message payload to use with this component:


const msgObject = {
	_id: Random.id(),
	rid: item.rid,
	msg: 'Sorry I am not sure of your request. Please select one of the following options:',
	attachments: [{
		actions: [
			{
			   type: 'button',
			   msg_in_chat_window: true,
			   msg_processing_type: 'sendMessage',
			   text: 'Contact Salesforce Agent',
			   msg: 'getSessionId',
			},
			{
			   type: 'button',
			   msg_in_chat_window: true,
			   msg_processing_type: 'sendMessage',
			   text: 'Send Random String',
			   msg: 'randomWord',
			 },
			 {
			   type: 'button',
		           msg_in_chat_window: true,
			   msg_processing_type: 'sendMessage',
	                   text: 'Close Chat',
			   msg: 'closeChat',
			 },
	],
  }],
};

Language grade: JavaScript Total alerts Storybook

CLI Commands

# install dependencies
yarn

# serve with hot reload at localhost:8080
yarn dev

# build for production with minification
yarn build

# test the production build locally
yarn serve

# run tests with jest and preact-render-spy
yarn test

# run the storybook
yarn storybook

# before commit run
yarn i18n

Screens:

image image image image image image image

About

New Livechat client written in Preact

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 85.6%
  • SCSS 12.2%
  • HTML 2.2%