about summary refs log tree commit diff
path: root/app/controllers/admin/settings_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/admin/settings_controller.rb')
-rw-r--r--app/controllers/admin/settings_controller.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/app/controllers/admin/settings_controller.rb b/app/controllers/admin/settings_controller.rb
index 4a049fc23..9624df96b 100644
--- a/app/controllers/admin/settings_controller.rb
+++ b/app/controllers/admin/settings_controller.rb
@@ -16,7 +16,9 @@ module Admin
       timeline_preview
       show_staff_badge
       bootstrap_timeline_accounts
-      theme
+      flavour
+      skin
+      flavour_and_skin
       thumbnail
       hero
       mascot
@@ -27,6 +29,7 @@ module Admin
       preview_sensitive_media
       custom_css
       profile_directory
+      hide_followers_count
     ).freeze
 
     BOOLEAN_SETTINGS = %w(
@@ -39,6 +42,7 @@ module Admin
       show_known_fediverse_at_about_page
       preview_sensitive_media
       profile_directory
+      hide_followers_count
     ).freeze
 
     UPLOAD_SETTINGS = %w(
@@ -55,7 +59,13 @@ module Admin
     def update
       authorize :settings, :update?
 
-      settings_params.each do |key, value|
+      settings = settings_params
+      flavours_and_skin = settings.delete('flavour_and_skin')
+      if flavours_and_skin
+        settings['flavour'], settings['skin'] = flavours_and_skin.split('/', 2)
+      end
+
+      settings.each do |key, value|
         if UPLOAD_SETTINGS.include?(key)
           upload = SiteUpload.where(var: key).first_or_initialize(var: key)
           upload.update(file: value)