feat: Super admin design improvements (#8517)
- Revamp the super admin design - Introduce a new settings page for support and billing settings - Move the access tokens into users, agent bots and platform app show pages Co-authored-by: Sojan <sojan@pepalo.com> Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
committed by
GitHub
parent
b1a68759cf
commit
f002870c6a
@@ -20,4 +20,13 @@ class SuperAdmin::ApplicationController < Administrate::ApplicationController
|
||||
params.fetch(resource_name, {}).fetch(:direction, 'desc')
|
||||
)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def invalid_action_perfomed
|
||||
# rubocop:disable Rails/I18nLocaleTexts
|
||||
flash[:error] = 'Invalid action performed'
|
||||
# rubocop:enable Rails/I18nLocaleTexts
|
||||
redirect_back(fallback_location: root_path)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
class SuperAdmin::InstallationConfigsController < SuperAdmin::ApplicationController
|
||||
rescue_from ActiveRecord::RecordNotUnique, :with => :invalid_action_perfomed
|
||||
# Overwrite any of the RESTful controller actions to implement custom behavior
|
||||
# For example, you may want to send an email after a foo is updated.
|
||||
#
|
||||
|
||||
10
app/controllers/super_admin/settings_controller.rb
Normal file
10
app/controllers/super_admin/settings_controller.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class SuperAdmin::SettingsController < SuperAdmin::ApplicationController
|
||||
def show; end
|
||||
|
||||
def refresh
|
||||
Internal::CheckNewVersionsJob.perform_now
|
||||
# rubocop:disable Rails/I18nLocaleTexts
|
||||
redirect_to super_admin_settings_path, notice: 'Instance status refreshed'
|
||||
# rubocop:enable Rails/I18nLocaleTexts
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user