mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-04 05:09:20 +08:00
This commit responds to feedback in the Discourse Meta discussion https://meta.discourse.org/t/monospace-font-in-the-markdown-only-editor/359936 This change introduces a user preference that allows users to choose whether the Markdown editor uses a monospace font. The default setting is `true` for new sites, but set to `false` for existing sites to avoid disrupting current users' experiences. Admins can change the `default_other_enable_markdown_monospace_font` site setting to manage this for all users.
41 lines
1.2 KiB
Ruby
41 lines
1.2 KiB
Ruby
# frozen_string_literal: true
|
|
|
|
class CurrentUserOptionSerializer < ApplicationSerializer
|
|
attributes :mailing_list_mode,
|
|
:external_links_in_new_tab,
|
|
:enable_quoting,
|
|
:enable_smart_lists,
|
|
:enable_markdown_monospace_font,
|
|
:dynamic_favicon,
|
|
:automatically_unpin_topics,
|
|
:likes_notifications_disabled,
|
|
:hide_profile_and_presence,
|
|
:hide_profile,
|
|
:hide_presence,
|
|
:title_count_mode,
|
|
:enable_defer,
|
|
:timezone,
|
|
:skip_new_user_tips,
|
|
:default_calendar,
|
|
:bookmark_auto_delete_preference,
|
|
:seen_popups,
|
|
:should_be_redirected_to_top,
|
|
:redirected_to_top,
|
|
:treat_as_new_topic_start_date,
|
|
:sidebar_link_to_filtered_list,
|
|
:sidebar_show_count_of_new_items,
|
|
:composition_mode,
|
|
:interface_color_mode
|
|
|
|
def likes_notifications_disabled
|
|
object.likes_notifications_disabled?
|
|
end
|
|
|
|
def include_redirected_to_top?
|
|
object.redirected_to_top.present?
|
|
end
|
|
|
|
def include_seen_popups?
|
|
SiteSetting.enable_user_tips
|
|
end
|
|
end
|