Skip to content

Commit

Permalink
feat: Updates branding logo and name in public portal footer (#8745)
Browse files Browse the repository at this point in the history
- Use white-label settings for Chatwoot Help Center

Co-authored-by: Sojan <sojan@pepalo.com>
  • Loading branch information
nithindavid and sojan-official committed Jan 19, 2024
1 parent 0ac015c commit c29a9ad
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
5 changes: 5 additions & 0 deletions 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

Expand Down Expand Up @@ -60,4 +61,8 @@ def render_404
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
11 changes: 0 additions & 11 deletions app/views/icons/_chatwoot-logo.html.erb

This file was deleted.

12 changes: 10 additions & 2 deletions app/views/public/api/v1/portals/_footer.html.erb
Expand Up @@ -2,9 +2,17 @@
<footer class="pt-16 pb-8 flex flex-col items-center justify-center">
<div class="mx-auto max-w-2xl text-center py-2">
<div class="flex items-center gap-2">
<%= render partial: 'icons/chatwoot-logo' %>

<img
class="w-4 h-4"
alt="<%= @global_config['BRAND_NAME'] %>"
src="<%= @global_config['LOGO_THUMBNAIL'] %>"
/>
<p class="text-slate-700 dark:text-slate-300 text-sm font-medium text-center">
<%= I18n.t('public_portal.footer.made_with') %> <a class="hover:underline" href="https://www.chatwoot.com" target="_blank" rel="noopener noreferrer nofoll/ow">Chatwoot</a>
<%= I18n.t('public_portal.footer.made_with') %>

<a class="hover:underline" href="<%= @global_config['BRAND_URL'] %>" target="_blank" rel="noopener noreferrer nofoll/ow"><%= @global_config['BRAND_NAME'] %></a>

</p>
</div>
</div>
Expand Down

0 comments on commit c29a9ad

Please sign in to comment.