diff options
-rw-r--r-- | app/controllers/settings/preferences_controller.rb | 1 | ||||
-rw-r--r-- | app/lib/user_settings_decorator.rb | 5 | ||||
-rw-r--r-- | app/models/account.rb | 1 | ||||
-rw-r--r-- | app/models/user.rb | 5 | ||||
-rwxr-xr-x | app/views/layouts/application.html.haml | 4 | ||||
-rw-r--r-- | app/views/settings/preferences/show.html.haml | 1 | ||||
-rw-r--r-- | config/locales/simple_form.en.yml | 1 |
7 files changed, 18 insertions, 0 deletions
diff --git a/app/controllers/settings/preferences_controller.rb b/app/controllers/settings/preferences_controller.rb index 0a7b1326d..530d54a41 100644 --- a/app/controllers/settings/preferences_controller.rb +++ b/app/controllers/settings/preferences_controller.rb @@ -37,6 +37,7 @@ class Settings::PreferencesController < Settings::BaseController :setting_larger_menus, :setting_larger_buttons, :setting_larger_drawer, + :setting_larger_emoji, :setting_remove_filtered, :setting_hide_replies_muted, :setting_hide_replies_blocked, diff --git a/app/lib/user_settings_decorator.rb b/app/lib/user_settings_decorator.rb index 69a8338d8..e47794072 100644 --- a/app/lib/user_settings_decorator.rb +++ b/app/lib/user_settings_decorator.rb @@ -35,6 +35,7 @@ class UserSettingsDecorator user.settings['hide_captions'] = hide_captions_preference if change?('setting_hide_captions') user.settings['hide_mascot'] = hide_mascot_preference if change?('setting_hide_mascot') user.settings['hide_interactions'] = hide_interactions_preference if change?('setting_hide_interactions') + user.settings['larger_emoji'] = larger_emoji_preference if change?('setting_larger_emoji') user.settings['notification_emails'] = merged_notification_emails if change?('notification_emails') user.settings['interactions'] = merged_interactions if change?('interactions') @@ -72,6 +73,10 @@ class UserSettingsDecorator boolean_cast_setting 'setting_larger_drawer' end + def larger_emoji_preference + boolean_cast_setting 'setting_larger_emoji' + end + def remove_filtered_preference boolean_cast_setting 'setting_remove_filtered' end diff --git a/app/models/account.rb b/app/models/account.rb index 163e0161e..d939909eb 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -150,6 +150,7 @@ class Account < ApplicationRecord :wants_larger_menus?, :wants_larger_buttons?, :wants_larger_drawer?, + :wants_larger_emoji?, :hides_filtered_gap?, :hides_mascot?, :hides_color_formatting?, diff --git a/app/models/user.rb b/app/models/user.rb index 7f2892b00..5f1ffb595 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -111,6 +111,7 @@ class User < ApplicationRecord :larger_menus, :larger_buttons, :larger_drawer, + :larger_emoji, :remove_filtered, :hide_replies_muted, :hide_replies_blocked, @@ -237,6 +238,10 @@ class User < ApplicationRecord @wants_larger_drawer ||= (settings.larger_drawer || false) end + def wants_larger_emoji? + @wants_larger_emoji ||= (settings.larger_emoji || false) + end + def hides_filtered_gap? @hides_filtered_gap ||= (settings.remove_filtered || false) end diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 2f66532c5..387a0f7c3 100755 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -85,5 +85,9 @@ :css .drawer__inner__mastodon>img { display: none !important } + -if current_account&.user_wants_larger_emoji? + :css + .status__content .emojione { width: 32px !important; height: 32px !important } + %body{ class: body_classes } = content_for?(:content) ? yield(:content) : yield diff --git a/app/views/settings/preferences/show.html.haml b/app/views/settings/preferences/show.html.haml index bfdcaf919..a1c3beb51 100644 --- a/app/views/settings/preferences/show.html.haml +++ b/app/views/settings/preferences/show.html.haml @@ -62,6 +62,7 @@ = f.input :setting_larger_menus, as: :boolean, wrapper: :with_label = f.input :setting_larger_buttons, as: :boolean, wrapper: :with_label = f.input :setting_larger_drawer, as: :boolean, wrapper: :with_label + = f.input :setting_larger_emoji, as: :boolean, wrapper: :with_label .fields-group = f.input :setting_hide_mascot, as: :boolean, wrapper: :with_label diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index ebad93f93..115407c58 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -122,6 +122,7 @@ en: setting_larger_menus: Increase size and spacing of menu items setting_larger_buttons: Increase size and spacing of action buttons setting_larger_drawer: Increase width of compose drawer column + setting_larger_emoji: Increase size of emoji setting_remove_filtered: Don't show placeholder gap for filtered roars setting_hide_replies_muted: Filter replies to those who you are muting setting_hide_replies_blocked: Filter replies to those who you are blocking |