Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
jitsi-meet/react/features/salesforce/actions.ts

37 lines
1.3 KiB

import { IStore } from '../app/types';
import { openDialog } from '../base/dialog/actions';
import { hideNotification, showNotification } from '../notifications/actions';
import {
NOTIFICATION_TIMEOUT_TYPE,
NOTIFICATION_TYPE,
SALESFORCE_LINK_NOTIFICATION_ID
} from '../notifications/constants';
// @ts-ignore
import { SalesforceLinkDialog } from './components';
import { isSalesforceEnabled } from './functions';
/**
* Displays the notification for linking the meeting to Salesforce.
*
* @returns {void}
*/
export function showSalesforceNotification() {
return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
if (!isSalesforceEnabled(getState())) {
return;
}
dispatch(showNotification({
descriptionKey: 'notify.linkToSalesforceDescription',
titleKey: 'notify.linkToSalesforce',
uid: SALESFORCE_LINK_NOTIFICATION_ID,
customActionNameKey: [ 'notify.linkToSalesforceKey' ],
customActionHandler: [ () => {
dispatch(hideNotification(SALESFORCE_LINK_NOTIFICATION_ID));
dispatch(openDialog(SalesforceLinkDialog));
} ],
appearance: NOTIFICATION_TYPE.NORMAL
}, NOTIFICATION_TIMEOUT_TYPE.STICKY));
};
}