diff options
author | kibigo! <marrus-sh@users.noreply.github.com> | 2017-12-04 21:54:36 -0800 |
---|---|---|
committer | kibigo! <marrus-sh@users.noreply.github.com> | 2017-12-04 21:58:10 -0800 |
commit | 5bed0f10ed4628049ca14fb188804654574be1bf (patch) | |
tree | 22712adce094c3a2d6d975393308035524e3c8ff | |
parent | a807e3b71bcc052d4b0859dd42739b4ae7def098 (diff) |
Various fixes
-rw-r--r-- | app/controllers/settings/preferences_controller.rb | 2 | ||||
-rw-r--r-- | app/javascript/core/settings.js | 2 | ||||
-rw-r--r-- | app/lib/user_settings_decorator.rb | 6 | ||||
-rw-r--r-- | app/views/layouts/_theme.html.haml | 2 | ||||
-rw-r--r-- | config/locales/simple_form.en.yml | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/app/controllers/settings/preferences_controller.rb b/app/controllers/settings/preferences_controller.rb index 56baebed2..277f0f657 100644 --- a/app/controllers/settings/preferences_controller.rb +++ b/app/controllers/settings/preferences_controller.rb @@ -38,7 +38,7 @@ class Settings::PreferencesController < Settings::BaseController :setting_reduce_motion, :setting_system_font_ui, :setting_noindex, - :setting_theme, + :setting_flavour, :setting_skin, notification_emails: %i(follow follow_request reblog favourite mention digest), interactions: %i(must_be_follower must_be_following) diff --git a/app/javascript/core/settings.js b/app/javascript/core/settings.js index 1e4bb4ced..ada5fba2b 100644 --- a/app/javascript/core/settings.js +++ b/app/javascript/core/settings.js @@ -38,6 +38,6 @@ delegate(document, '#account_header', 'change', ({ target }) => { header.style.backgroundImage = `url(${url})`; }); -delegate(document, '#user_setting_theme', 'change', ({ target }) => { +delegate(document, '#user_setting_flavour, #user_setting_skin', 'change', ({ target }) => { target.form.submit(); }); diff --git a/app/lib/user_settings_decorator.rb b/app/lib/user_settings_decorator.rb index 730c70177..8af384a2d 100644 --- a/app/lib/user_settings_decorator.rb +++ b/app/lib/user_settings_decorator.rb @@ -26,7 +26,7 @@ class UserSettingsDecorator user.settings['reduce_motion'] = reduce_motion_preference if change?('setting_reduce_motion') user.settings['system_font_ui'] = system_font_ui_preference if change?('setting_system_font_ui') user.settings['noindex'] = noindex_preference if change?('setting_noindex') - user.settings['theme'] = theme_preference if change?('setting_theme') + user.settings['flavour'] = flavour_preference if change?('setting_flavour') user.settings['skin'] = skin_preference if change?('setting_skin') end @@ -74,8 +74,8 @@ class UserSettingsDecorator boolean_cast_setting 'setting_noindex' end - def theme_preference - settings['setting_theme'] + def flavour_preference + settings['setting_flavour'] end def skin_preference diff --git a/app/views/layouts/_theme.html.haml b/app/views/layouts/_theme.html.haml index 39727953d..066d9de42 100644 --- a/app/views/layouts/_theme.html.haml +++ b/app/views/layouts/_theme.html.haml @@ -7,7 +7,7 @@ - if !theme[:flavour] || theme[:skin] == 'default' = stylesheet_pack_tag theme[:flavour] ? "flavours/#{theme[:flavour]}/#{theme[:pack]}" : "core/#{theme[:pack]}", integrity: true, media: 'all' - else - = stylesheet_pack_tag "skins/#{theme[:name]}/#{theme[:skin]}/#{theme[:pack]}" + = stylesheet_pack_tag "skins/#{theme[:flavour]}/#{theme[:skin]}/#{theme[:pack]}" - if theme[:preload] - theme[:preload].each do |link| %link{ href: asset_pack_path("#{link}.js"), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/ diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 35b45fbc9..756f6b119 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -46,7 +46,7 @@ en: setting_default_privacy: Post privacy setting_default_sensitive: Always mark media as sensitive setting_delete_modal: Show confirmation dialog before deleting a toot - setting_flavour: Mastodon Flavour + setting_flavour: Flavour setting_noindex: Opt-out of search engine indexing setting_reduce_motion: Reduce motion in animations setting_skin: Skin |