From 2f33dbcb2d720b33ae91f3179b5c3189c4f600ac Mon Sep 17 00:00:00 2001 From: nicholas Date: Fri, 18 Oct 2024 11:45:28 -0400 Subject: [PATCH 1/2] Remove saleforce chat plugin and styles --- src/main.js | 1 - src/plugins/salesforceChat.js | 63 ----------------------------------- src/styles/global.scss | 60 --------------------------------- 3 files changed, 124 deletions(-) delete mode 100644 src/plugins/salesforceChat.js diff --git a/src/main.js b/src/main.js index 875a8aca0..0b571a687 100644 --- a/src/main.js +++ b/src/main.js @@ -65,7 +65,6 @@ export const setStartupTenant = async () => { if (process.env.VUE_APP_BACKEND === 'CLOUD') { await store.dispatch('license/getLicense') - initializeSalesforceChat() } } diff --git a/src/plugins/salesforceChat.js b/src/plugins/salesforceChat.js deleted file mode 100644 index 6589515ff..000000000 --- a/src/plugins/salesforceChat.js +++ /dev/null @@ -1,63 +0,0 @@ -import store from '@/store' - -const { - VUE_APP_ENVIRONMENT, - VUE_APP_SF_SFCID, - VUE_APP_SF_TEAM, - VUE_APP_SF_URL1, - VUE_APP_SF_URL2, - VUE_APP_SF_BASE_LIVE_AGENT_CONTENT_URL, - VUE_APP_SF_DEPLOYMENT_ID, - VUE_APP_SF_BUTTON_ID, - VUE_APP_SF_BASE_LIVE_AGENT_URL, - VUE_APP_SF_URL3 -} = process.env - -export const initializeSalesforceChat = () => { - if (VUE_APP_ENVIRONMENT == 'development') { - return - } - - const user = store.getters['user/user'] - - const initESW = function (gslbBaseURL) { - window.embedded_svc.settings.displayHelpButton = false - window.embedded_svc.settings.language = '' // For example, enter 'en' or 'en-US' - window.embedded_svc.settings.defaultMinimizedText = 'Chat With Us' - window.embedded_svc.settings.enabledFeatures = ['LiveAgent'] - window.embedded_svc.settings.entryFeature = 'LiveAgent' - window.embedded_svc.settings.extraPrechatFormDetails = [ - { - label: 'User ID', - transcriptFields: ['Cloud1_User_External_Id__c'], - value: user?.id || '' - } - ] - window.embedded_svc.init( - VUE_APP_SF_URL1, - VUE_APP_SF_URL2, - gslbBaseURL, - VUE_APP_SF_SFCID, - VUE_APP_SF_TEAM, - { - baseLiveAgentContentURL: VUE_APP_SF_BASE_LIVE_AGENT_CONTENT_URL, - deploymentId: VUE_APP_SF_DEPLOYMENT_ID, - buttonId: VUE_APP_SF_BUTTON_ID, - baseLiveAgentURL: VUE_APP_SF_BASE_LIVE_AGENT_URL, - eswLiveAgentDevName: VUE_APP_SF_TEAM, - isOfflineSupportEnabled: false - } - ) - } - - if (!window.embedded_svc) { - const s = document.createElement('script') - s.setAttribute('src', VUE_APP_SF_URL3) - s.onload = function () { - initESW(null) - } - document.body.appendChild(s) - } else { - initESW('https://service.force.com') - } -} diff --git a/src/styles/global.scss b/src/styles/global.scss index aa703d0af..6e1f35896 100644 --- a/src/styles/global.scss +++ b/src/styles/global.scss @@ -675,64 +675,4 @@ $fa-cc-visa: #0157a2; .fa-cc-visa { color: $fa-cc-visa !important; -} - -// Chat widget styles -[embeddedservice-chatheader_chatheader-host] { - background-color: var(--v-primary-base) !important; -} - -.embeddedServiceSidebar { - box-sizing: content-box !important; - - a { - color: var(--v-anchor-base); - text-decoration: none; - } - - .plainText { - color: rgba(0, 0, 0, 0.87) !important; - } - - .chasitor[c-chatMessage_chatMessage] { - background: var(--v-primary-base) !important; - - a { - color: var(--v-white-base) !important; - text-decoration: underline; - } - } - - .slds-icon { - max-height: 16px; - max-width: 16px; - } - - .messageArea { - border: 1px solid transparent; - } - - .embeddedServiceLiveAgentStateChatItem.chatMessage button:hover, - .embeddedServiceLiveAgentStateChatItem.chatMessage button:hover:focus { - background: var(--v-primary-base) !important; - color: var(--v-secondaryGrayLight-base) !important; - } -} - -.embeddedServiceHelpButton { - .uiButton { - background-color: var(--v-primary-base) !important; - } -} - - - -:root { - --lwc-esColorBackgroundAlt2: var(--v-primary-base) !important; - --lwc-colorBackgroundAlt2Darken20: var(--v-primary-lighten1) !important; - --lwc-colorBrandSecondaryLuminance0: var(--v-prefect-base) !important; - --lwc-colorTextDefault: rgba(0, 0, 0, 0.87) !important; - --lwc-colorBackgroundContrastPrimary: var(--v-primary-base) !important; - --lwc-colorBrandSecondary: var(--v-primaryDark-base) !important; - --lwc-colorBrandSecondaryDarken40: var(--v-primaryDark-lighten1) !important; } \ No newline at end of file From eafd467447af79416c7a32c26b036b72e9b86b3a Mon Sep 17 00:00:00 2001 From: nicholas Date: Fri, 18 Oct 2024 11:49:46 -0400 Subject: [PATCH 2/2] Also remove import --- src/main.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main.js b/src/main.js index 0b571a687..29dd07a11 100644 --- a/src/main.js +++ b/src/main.js @@ -4,7 +4,6 @@ import { CreatePrefectUI } from '@/app.js' import store from '@/store' import jwt_decode from 'jwt-decode' import LogRocket from 'logrocket' -import { initializeSalesforceChat } from '@/plugins/salesforceChat.js' export const setStartupTenant = async () => { const path = window.location.pathname