about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authorkibigo! <marrus-sh@users.noreply.github.com>2017-12-10 17:56:17 -0800
committerkibigo! <marrus-sh@users.noreply.github.com>2017-12-10 20:32:27 -0800
commitdabf66e676c693e7e26a6035e0c6296e6804e776 (patch)
tree58a88b897ae5c905425669547d7272f53801ef73 /config
parent08b0861b961a0f5e68ccd6a21db463671723652d (diff)
Moved flavour UI into own prefs tab
Diffstat (limited to 'config')
-rw-r--r--config/locales/en.yml2
-rw-r--r--config/locales/simple_form.en.yml2
-rw-r--r--config/navigation.rb6
-rw-r--r--config/routes.rb4
4 files changed, 11 insertions, 3 deletions
diff --git a/config/locales/en.yml b/config/locales/en.yml
index c8acc237a..804f9b199 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -424,6 +424,7 @@ en:
     changes_saved_msg: Changes successfully saved!
     powered_by: powered by %{link}
     save_changes: Save changes
+    use_this: Use this
     validation_errors:
       one: Something isn't quite right yet! Please review the error below
       other: Something isn't quite right yet! Please review %{count} errors below
@@ -587,6 +588,7 @@ en:
     development: Development
     edit_profile: Edit profile
     export: Data export
+    flavours: Flavours
     followers: Authorized followers
     import: Import
     keyword_mutes: Muted keywords
diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml
index 1722eea7b..aa6940e91 100644
--- a/config/locales/simple_form.en.yml
+++ b/config/locales/simple_form.en.yml
@@ -13,7 +13,6 @@ en:
         note:
           one: <span class="note-counter">1</span> character left
           other: <span class="note-counter">%{count}</span> characters left
-        setting_flavour: Affects how Mastodon looks when you're logged in from any device
         setting_noindex: Affects your public profile and status pages
         setting_skin: Reskins the selected Mastodon flavour
       imports:
@@ -47,7 +46,6 @@ en:
         setting_default_sensitive: Always mark media as sensitive
         setting_delete_modal: Show confirmation dialog before deleting a toot
         setting_favourite_modal: Show confirmation dialog before favouriting
-        setting_flavour: Flavour
         setting_noindex: Opt-out of search engine indexing
         setting_reduce_motion: Reduce motion in animations
         setting_skin: Skin
diff --git a/config/navigation.rb b/config/navigation.rb
index 3f4c00dfa..b08b1769d 100644
--- a/config/navigation.rb
+++ b/config/navigation.rb
@@ -17,6 +17,12 @@ SimpleNavigation::Configuration.run do |navigation|
       settings.item :follower_domains, safe_join([fa_icon('users fw'), t('settings.followers')]), settings_follower_domains_url
     end
 
+    primary.item :flavours, safe_join([fa_icon('paint-brush fw'), t('settings.flavours')]), settings_flavours_url do |flavours|
+      Themes.instance.flavours.each do |flavour|
+        flavours.item flavour.to_sym, safe_join([fa_icon('star fw'), t("flavours.#{flavour}.name", default: flavour)]), settings_flavour_url(flavour)
+      end
+    end
+
     primary.item :invites, safe_join([fa_icon('user-plus fw'), t('invites.title')]), invites_path, if: proc { Setting.min_invite_role == 'user' }
 
     primary.item :development, safe_join([fa_icon('code fw'), t('settings.development')]), settings_applications_url do |development|
diff --git a/config/routes.rb b/config/routes.rb
index a41e76c2c..75b9c2d58 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -102,6 +102,8 @@ Rails.application.routes.draw do
       end
     end
 
+    resources :flavours, only: [:index, :show, :update], param: :flavour
+
     resource :delete, only: [:show, :destroy]
     resource :migration, only: [:show, :update]
 
@@ -240,7 +242,7 @@ Rails.application.routes.draw do
       resources :media,      only: [:create, :update]
       resources :blocks,     only: [:index]
       resources :mutes,      only: [:index] do
-        collection do 
+        collection do
           get 'details'
         end
       end