feat: add show_support_links UI visibility toggle to hide support section (#25)

Co-authored-by: Bob Develop <developbob50@gmail.com>
pull/640/head
devin-ai-integration[bot] 1 week ago committed by GitHub
parent 6b98a4a205
commit 39d65b2597
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -63,6 +63,7 @@ class AccountConfig < ApplicationRecord
SHOW_CONSOLE_LINK_KEY = 'show_console_link'
SHOW_API_LINK_KEY = 'show_api_link'
SHOW_TEST_MODE_KEY = 'show_test_mode'
SHOW_SUPPORT_LINKS_KEY = 'show_support_links'
BRAND_NAME_KEY = 'brand_name'
BRAND_NAME_FONT_KEY = 'brand_name_font'
IP_ALLOWLIST_KEY = 'ip_allowlist'

@ -3,7 +3,8 @@
<% [
[AccountConfig::SHOW_CONSOLE_LINK_KEY, t('show_console_link')],
[AccountConfig::SHOW_API_LINK_KEY, t('show_api_link')],
[AccountConfig::SHOW_TEST_MODE_KEY, t('show_test_mode')]
[AccountConfig::SHOW_TEST_MODE_KEY, t('show_test_mode')],
[AccountConfig::SHOW_SUPPORT_LINKS_KEY, t('show_support_links')]
].each do |key, label| %>
<% env_var_name = "DOCUSEAL_CONFIG_#{key.upcase}" %>
<% locked = ENV.fetch(env_var_name, nil).present? %>

@ -105,7 +105,7 @@
<% end %>
</ul>
</menu-active>
<% if Docuseal.multitenant? || cannot?(:manage, :tenants) %>
<% if (Docuseal.multitenant? || cannot?(:manage, :tenants)) && current_account.ui_visible?(AccountConfig::SHOW_SUPPORT_LINKS_KEY) %>
<div id="support_channels" class="mx-4 border-t border-base-300 hidden md:block">
<div class="text-sm mt-3">
<%= t('need_help_ask_a_question_') %>

@ -3,6 +3,7 @@ en: &en
show_console_link: Show Console Link
show_api_link: Show API Link
show_test_mode: Show Test Mode
show_support_links: Show Support Links
locked_by_env: Locked by environment variable
storage_is_configured_via_environment_variables: Storage is configured via environment variables. These settings are read-only.
visibility: Visibility

Loading…
Cancel
Save