Add warning to dashboard if using default logo or favicon
This commit is contained in:
parent
439877bdb9
commit
7257d65082
|
@ -48,7 +48,8 @@ class AdminDashboardData
|
|||
facebook_config_check,
|
||||
twitter_config_check,
|
||||
github_config_check,
|
||||
failing_emails_check ].compact
|
||||
failing_emails_check,
|
||||
default_logo_check ].compact
|
||||
end
|
||||
|
||||
def rails_env_check
|
||||
|
@ -97,4 +98,12 @@ class AdminDashboardData
|
|||
num_failed_jobs = Jobs.num_email_retry_jobs
|
||||
I18n.t('dashboard.failing_emails_warning', num_failed_jobs: num_failed_jobs) if num_failed_jobs > 0
|
||||
end
|
||||
|
||||
def default_logo_check
|
||||
if SiteSetting.logo_url == SiteSetting.defaults[:logo_url] or
|
||||
SiteSetting.logo_small_url == SiteSetting.defaults[:logo_small_url] or
|
||||
SiteSetting.favicon_url == SiteSetting.defaults[:favicon_url]
|
||||
I18n.t('dashboard.default_logo_warning')
|
||||
end
|
||||
end
|
||||
end
|
|
@ -347,6 +347,7 @@ en:
|
|||
twitter_config_warning: 'The server is configured to allow signup and log in with Twitter (enable_twitter_logins), but the key and secret values are not set. Go to <a href="/admin/site_settings">the Site Settings</a> and update the settings. <a href="https://github.com/discourse/discourse/wiki/The-Discourse-Admin-Quick-Start-Guide#enable-twitter-logins" target="_blank">See this guide to learn more</a>.'
|
||||
github_config_warning: 'The server is configured to allow signup and log in with GitHub (enable_github_logins), but the client id and secret values are not set. Go to <a href="/admin/site_settings">the Site Settings</a> and update the settings. <a href="https://github.com/discourse/discourse/wiki/The-Discourse-Admin-Quick-Start-Guide" target="_blank">See this guide to learn more</a>.'
|
||||
failing_emails_warning: "There are %{num_failed_jobs} email jobs that failed. Check your config/production.rb file and ensure that the config.action_mailer settings are correct."
|
||||
default_logo_warning: "You haven't customized the logo images for your site. Update logo_url, logo_small_url, and favicon_url in the <a href='/admin/site_settings'>Site Settings</a>."
|
||||
|
||||
content_types:
|
||||
education_new_reply:
|
||||
|
|
Loading…
Reference in New Issue