From c29a9ad0627e91dc6727d42dd115551a55f9431d Mon Sep 17 00:00:00 2001 From: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com> Date: Fri, 19 Jan 2024 01:37:24 -0800 Subject: [PATCH] feat: Updates branding logo and name in public portal footer (#8745) - Use white-label settings for Chatwoot Help Center Co-authored-by: Sojan --- .../public/api/v1/portals/base_controller.rb | 5 +++++ app/views/icons/_chatwoot-logo.html.erb | 11 ----------- app/views/public/api/v1/portals/_footer.html.erb | 12 ++++++++++-- 3 files changed, 15 insertions(+), 13 deletions(-) delete mode 100644 app/views/icons/_chatwoot-logo.html.erb diff --git a/app/controllers/public/api/v1/portals/base_controller.rb b/app/controllers/public/api/v1/portals/base_controller.rb index e003a62ba..4d3cc56b8 100644 --- a/app/controllers/public/api/v1/portals/base_controller.rb +++ b/app/controllers/public/api/v1/portals/base_controller.rb @@ -1,6 +1,7 @@ class Public::Api::V1::Portals::BaseController < PublicController before_action :show_plain_layout before_action :set_color_scheme + before_action :set_global_config around_action :set_locale after_action :allow_iframe_requests @@ -60,4 +61,8 @@ class Public::Api::V1::Portals::BaseController < PublicController portal render 'public/api/v1/portals/error/404', status: :not_found end + + def set_global_config + @global_config = GlobalConfig.get('LOGO_THUMBNAIL', 'BRAND_NAME', 'BRAND_URL') + end end diff --git a/app/views/icons/_chatwoot-logo.html.erb b/app/views/icons/_chatwoot-logo.html.erb deleted file mode 100644 index 5377a0a02..000000000 --- a/app/views/icons/_chatwoot-logo.html.erb +++ /dev/null @@ -1,11 +0,0 @@ - - - woot-log - Created with Sketch. - - \ No newline at end of file diff --git a/app/views/public/api/v1/portals/_footer.html.erb b/app/views/public/api/v1/portals/_footer.html.erb index 162f0d9b6..8de87b8f2 100644 --- a/app/views/public/api/v1/portals/_footer.html.erb +++ b/app/views/public/api/v1/portals/_footer.html.erb @@ -2,9 +2,17 @@