diff --git a/app/controllers/api/v1/accounts/portals_controller.rb b/app/controllers/api/v1/accounts/portals_controller.rb index b12f89c0a..8800d09ff 100644 --- a/app/controllers/api/v1/accounts/portals_controller.rb +++ b/app/controllers/api/v1/accounts/portals_controller.rb @@ -79,7 +79,8 @@ class Api::V1::Accounts::PortalsController < Api::V1::Accounts::BaseController def portal_params params.require(:portal).permit( :id, :color, :custom_domain, :header_text, :homepage_link, - :name, :page_title, :slug, :archived, { config: [:default_locale, :show_author, { allowed_locales: [] }] } + :name, :page_title, :slug, :archived, :custom_head_html, :custom_body_html, + { config: [:default_locale, :show_author, { allowed_locales: [] }] } ) end diff --git a/app/javascript/dashboard/components-next/HelpCenter/Pages/PortalSettingsPage/PortalBaseSettings.vue b/app/javascript/dashboard/components-next/HelpCenter/Pages/PortalSettingsPage/PortalBaseSettings.vue index 3258162dc..c39523882 100644 --- a/app/javascript/dashboard/components-next/HelpCenter/Pages/PortalSettingsPage/PortalBaseSettings.vue +++ b/app/javascript/dashboard/components-next/HelpCenter/Pages/PortalSettingsPage/PortalBaseSettings.vue @@ -47,6 +47,8 @@ const state = reactive({ logoUrl: '', avatarBlobId: '', showAuthor: true, + customHeadHtml: '', + customBodyHtml: '', }); const originalState = reactive({ ...state }); @@ -120,6 +122,8 @@ watch( slug: newVal.slug, liveChatWidgetInboxId: newVal.inbox?.id || '', showAuthor: newVal.config?.show_author !== false, + customHeadHtml: newVal.custom_head_html || '', + customBodyHtml: newVal.custom_body_html || '', }); if (newVal.logo) { const { @@ -153,6 +157,8 @@ const handleUpdatePortal = () => { blob_id: state.avatarBlobId, inbox_id: state.liveChatWidgetInboxId, config: { show_author: state.showAuthor }, + custom_head_html: state.customHeadHtml, + custom_body_html: state.customBodyHtml, }; emit('updatePortal', portal); }; @@ -354,6 +360,54 @@ const handleAvatarDelete = () => { +
+ +
+