diff --git a/app/assets/stylesheets/setup-mode.scss b/app/assets/stylesheets/setup-mode.scss index 0ede02ccf..41e26862a 100644 --- a/app/assets/stylesheets/setup-mode.scss +++ b/app/assets/stylesheets/setup-mode.scss @@ -21,10 +21,3 @@ body.default-header { [data-creator-settings-target='previewLogo'] { max-height: 80px; } - -// This ID is tied the global "Setup not complete" banner -// and is necessary for the removal of the banner on the -// Creator Settings page -#setup-banner { - display: none; -} diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 0e38c2ead..cacbfc047 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -12,7 +12,6 @@ class ApplicationController < ActionController::Base include Pundit include CachingHeaders include ImageUploads - include VerifySetupCompleted include DevelopmentDependencyChecks if Rails.env.development? include EdgeCacheSafetyCheck unless Rails.env.production? include Devise::Controllers::Rememberable diff --git a/app/controllers/concerns/verify_setup_completed.rb b/app/controllers/concerns/verify_setup_completed.rb deleted file mode 100644 index 756da0a62..000000000 --- a/app/controllers/concerns/verify_setup_completed.rb +++ /dev/null @@ -1,44 +0,0 @@ -# Included in the ApplicationController to assist with creator onboarding -module VerifySetupCompleted - extend ActiveSupport::Concern - - module_function - - included do - # rubocop:disable Rails/LexicallyScopedActionFilter - before_action :verify_setup_completed, only: %i[index new edit show] - # rubocop:enable Rails/LexicallyScopedActionFilter - end - - def setup_completed? - missing_configs.empty? - end - - def missing_configs - @missing_configs ||= Settings::Mandatory.missing - end - - private - - def missing_configs_text - display_missing = missing_configs.size > 3 ? missing_configs.first(3) + ["others"] : missing_configs - display_missing.map { |config| config.to_s.tr("_", " ") }.to_sentence - end - - def verify_setup_completed - # This is the only flash in our application layout, don't override it if - # there's already another message. - return if flash[:global_notice].present? - return if config_path? || setup_completed? || Settings::General.waiting_on_first_user - - link = helpers.tag.a("the configuration page", href: admin_config_path, data: { "no-instant" => true }) - - flash[:global_notice] = helpers.safe_join(["Setup not completed yet, missing ", - missing_configs_text, - ". Please visit ", link, "."]) - end - - def config_path? - request.env["PATH_INFO"] == admin_config_path - end -end diff --git a/app/javascript/admin/controllers/config_controller.js b/app/javascript/admin/controllers/config_controller.js index 06fdf317f..2f8f57e50 100644 --- a/app/javascript/admin/controllers/config_controller.js +++ b/app/javascript/admin/controllers/config_controller.js @@ -402,7 +402,7 @@ export default class ConfigController extends Controller { activateMissingKeysModal(providers) { this.configModalAnchorTarget.innerHTML = adminModal({ - title: 'Setup not complete', + title: 'Getting started', controllerName: 'config', closeModalFunction: 'closeAdminModal', body: this.missingAuthKeysModalBody(providers), diff --git a/app/views/admin/settings/show.html.erb b/app/views/admin/settings/show.html.erb index 538e89594..16c6656a6 100644 --- a/app/views/admin/settings/show.html.erb +++ b/app/views/admin/settings/show.html.erb @@ -23,14 +23,13 @@ class="crayons-btn crayons-btn--secondary float-right" type="button" data-action="click->config#toggleAccordionButtonLabel"> - - <%= VerifySetupCompleted.setup_completed? ? "Show Getting Started" : "Hide Getting Started" %> + Hide Getting Started