:setting_reduce_motion,
:setting_system_font_ui,
:setting_noindex,
- :setting_theme,
:setting_hide_network,
+ :setting_hide_followers_count,
:setting_aggregate_reblogs,
:setting_show_application,
+ :setting_advanced_layout,
+ :setting_default_content_type,
notification_emails: %i(follow follow_request reblog favourite mention digest report pending_account),
interactions: %i(must_be_follower must_be_following)
)
user.settings['hide_network'] = hide_network_preference if change?('setting_hide_network')
user.settings['aggregate_reblogs'] = aggregate_reblogs_preference if change?('setting_aggregate_reblogs')
user.settings['show_application'] = show_application_preference if change?('setting_show_application')
+ user.settings['advanced_layout'] = advanced_layout_preference if change?('setting_advanced_layout')
+ user.settings['default_content_type']= default_content_type_preference if change?('setting_default_content_type')
end
def merged_notification_emails
boolean_cast_setting 'setting_aggregate_reblogs'
end
+ def advanced_layout_preference
+ boolean_cast_setting 'setting_advanced_layout'
+ end
+
+ def default_content_type_preference
+ settings['setting_default_content_type']
+ end
+
def boolean_cast_setting(key)
ActiveModel::Type::Boolean.new.cast(settings[key])
end
has_many :session_activations, dependent: :destroy
- delegate :auto_play_gif, :default_sensitive, :unfollow_modal, :boost_modal, :delete_modal,
- :reduce_motion, :system_font_ui, :noindex, :theme, :display_media, :hide_network,
+ delegate :auto_play_gif, :default_sensitive, :unfollow_modal, :boost_modal, :favourite_modal, :delete_modal,
+ :reduce_motion, :system_font_ui, :noindex, :flavour, :skin, :display_media, :hide_network, :hide_followers_count,
- :expand_spoilers, :default_language, :aggregate_reblogs, :show_application, :default_content_type, to: :settings, prefix: :setting, allow_nil: false
+ :expand_spoilers, :default_language, :aggregate_reblogs, :show_application,
- :advanced_layout, to: :settings, prefix: :setting, allow_nil: false
++ :advanced_layout, :default_content_type, to: :settings, prefix: :setting, allow_nil: false
attr_reader :invite_code
attr_writer :external
store[:display_media] = object.current_account.user.setting_display_media
store[:expand_spoilers] = object.current_account.user.setting_expand_spoilers
store[:reduce_motion] = object.current_account.user.setting_reduce_motion
+ store[:advanced_layout] = object.current_account.user.setting_advanced_layout
store[:is_staff] = object.current_account.user.staff?
+ store[:default_content_type] = object.current_account.user.setting_default_content_type
end
store
.fields-group
= f.input :setting_show_application, as: :boolean, wrapper: :with_label
- %hr#settings_web/
+ - unless Setting.hide_followers_count
+ .fields-group
+ = f.input :setting_hide_followers_count, as: :boolean, wrapper: :with_label
- .fields-row
- .fields-group.fields-row__column.fields-row__column-6
- = f.input :setting_theme, collection: Themes.instance.names, label_method: lambda { |theme| I18n.t("themes.#{theme}", default: theme) }, wrapper: :with_label, include_blank: false, hint: false
- .fields-group.fields-row__column.fields-row__column-6
- = f.input :setting_display_media, collection: ['default', 'show_all', 'hide_all'], wrapper: :with_label, include_blank: false, label_method: lambda { |item| t("simple_form.hints.defaults.setting_display_media_#{item}") }, hint: false
+ %hr#settings_web/
+ .fields-group
+ = f.input :setting_advanced_layout, as: :boolean, wrapper: :with_label
+
.fields-group
= f.input :setting_unfollow_modal, as: :boolean, wrapper: :with_label
= f.input :setting_boost_modal, as: :boolean, wrapper: :with_label
password: Use at least 8 characters
phrase: Will be matched regardless of casing in text or content warning of a toot
scopes: Which APIs the application will be allowed to access. If you select a top-level scope, you don't need to select individual ones.
+ setting_advanced_layout: The advanced UI consists of multiple customizable columns
setting_aggregate_reblogs: Do not show new boosts for toots that have been recently boosted (only affects newly-received boosts)
+ setting_default_content_type_html: When writing toots, assume they are written in raw HTML, unless specified otherwise
+ setting_default_content_type_markdown: When writing toots, assume they are using Markdown for rich text formatting, unless specified otherwise
+ setting_default_content_type_plain: When writing toots, assume they are plain text with no special formatting, unless specified otherwise (default Mastodon behavior)
setting_default_language: The language of your toots can be detected automatically, but it's not always accurate
setting_display_media_default: Hide media marked as sensitive
setting_display_media_hide_all: Always hide all media
expand_spoilers: false
preview_sensitive_media: false
reduce_motion: false
- show_application: true
+ show_application: false
system_font_ui: false
noindex: false
- theme: 'default'
+ hide_followers_count: false
+ enable_keybase: true
+ flavour: 'glitch'
+ skin: 'default'
aggregate_reblogs: true
+ advanced_layout: true
notification_emails:
follow: false
reblog: false