Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
settings: Sort various enumerations of settings fields.
Tim Abbott3847740a2acd
diff --git a/web/src/realm_user_settings_defaults.ts b/web/src/realm_user_settings_defaults.tsindex cb5a8c918c8..c3c947626ec 100644--- a/web/src/realm_user_settings_defaults.ts+++ b/web/src/realm_user_settings_defaults.ts@@ -1,54 +1,54 @@export type RealmDefaultSettings = {+ automatically_follow_topics_policy: number;+ automatically_follow_topics_where_mentioned: boolean;+ automatically_unmute_topics_in_muted_streams_policy: number;color_scheme: number;- web_font_size_px: number;- web_line_height_percent: number;default_language: string;- web_home_view: string;- desktop_icon_count_display: number;demote_inactive_streams: number;dense_mode: boolean;+ desktop_icon_count_display: number;display_emoji_reaction_users: boolean;email_notifications_batching_period_seconds: number;emojiset: string;enable_desktop_notifications: boolean;enable_digest_emails: boolean;enable_drafts_synchronization: boolean;+ enable_followed_topic_audible_notifications: boolean;+ enable_followed_topic_desktop_notifications: boolean;+ enable_followed_topic_email_notifications: boolean;+ enable_followed_topic_push_notifications: boolean;+ enable_followed_topic_wildcard_mentions_notify: boolean;enable_login_emails: boolean;enable_marketing_emails: boolean;- enable_offline_push_notifications: boolean;enable_offline_email_notifications: boolean;+ enable_offline_push_notifications: boolean;enable_online_push_notifications: boolean;enable_sounds: boolean;enable_stream_audible_notifications: boolean;enable_stream_desktop_notifications: boolean;enable_stream_email_notifications: boolean;enable_stream_push_notifications: boolean;- enable_followed_topic_desktop_notifications: boolean;- enable_followed_topic_audible_notifications: boolean;- enable_followed_topic_push_notifications: boolean;- enable_followed_topic_email_notifications: boolean;- enable_followed_topic_wildcard_mentions_notify: boolean;enter_sends: boolean;- web_escape_navigates_to_home_view: boolean;fluid_layout_width: boolean;high_contrast_mode: boolean;message_content_in_email_notifications: boolean;notification_sound: string;pm_content_in_desktop_notifications: boolean;presence_enabled: boolean;+ realm_name_in_email_notifications_policy: number;send_private_typing_notifications: boolean;send_stream_typing_notifications: boolean;- realm_name_in_email_notifications_policy: number;starred_message_counts: boolean;translate_emoticons: boolean;twenty_four_hour_time: boolean;user_list_style: boolean;- web_stream_unreads_count_display_policy: number;+ web_escape_navigates_to_home_view: boolean;+ web_font_size_px: number;+ web_home_view: string;+ web_line_height_percent: number;web_mark_read_on_scroll_policy: number;+ web_stream_unreads_count_display_policy: number;wildcard_mentions_notify: boolean;- automatically_follow_topics_policy: number;- automatically_unmute_topics_in_muted_streams_policy: number;- automatically_follow_topics_where_mentioned: boolean;};export let realm_user_settings_defaults: RealmDefaultSettings;diff --git a/web/src/settings_config.ts b/web/src/settings_config.tsindex 821422b6ab2..55854ab6176 100644--- a/web/src/settings_config.ts+++ b/web/src/settings_config.ts@@ -135,8 +135,8 @@ export type DisplaySettings = {};render_group?: boolean;render_only: {- high_contrast_mode?: boolean;dense_mode?: boolean;+ high_contrast_mode?: boolean;web_font_size_px?: boolean;web_line_height_percent?: boolean;};@@ -153,8 +153,8 @@ export const get_all_preferences = (): DisplaySettings => ({],},render_only: {- high_contrast_mode: page_params.development_environment,dense_mode: page_params.development_environment,+ high_contrast_mode: page_params.development_environment,},});@@ -553,7 +553,14 @@ const user_role_array = Object.values(user_role_values);export const user_role_map = new Map(user_role_array.map((role) => [role.code, role.description]));export const preferences_settings_labels = {+ default_language_settings_label: $t({defaultMessage: "Language"}),dense_mode: $t({defaultMessage: "Dense mode"}),+ display_emoji_reaction_users: new Handlebars.SafeString(+ $t_html({+ defaultMessage:+ "Display names of reacting users when few users have reacted to a message",+ }),+ ),fluid_layout_width: $t({defaultMessage: "Use full width on wide screens"}),high_contrast_mode: $t({defaultMessage: "High contrast mode"}),starred_message_counts: $t({defaultMessage: "Show counts for starred messages"}),@@ -563,28 +570,27 @@ export const preferences_settings_labels = {defaultMessage: "Convert emoticons before sending (<code>:)</code> becomes 😃)",}),),- display_emoji_reaction_users: new Handlebars.SafeString(- $t_html({- defaultMessage:- "Display names of reacting users when few users have reacted to a message",- }),- ),web_escape_navigates_to_home_view: $t({defaultMessage: "Escape key navigates to home view"}),web_font_size_px: $t({defaultMessage: "Message-area font size (px)"}),web_line_height_percent: $t({defaultMessage: "Message-area line height (%)"}),- default_language_settings_label: $t({defaultMessage: "Language"}),};export const notification_settings_labels = {- enable_online_push_notifications: $t({- defaultMessage: "Send mobile notifications even if I'm online",+ automatically_follow_topics_policy: $t({+ defaultMessage: "Automatically follow topics",}),- pm_content_in_desktop_notifications: $t({- defaultMessage: "Include content of direct messages in desktop notifications",+ automatically_follow_topics_where_mentioned: $t({+ defaultMessage: "Automatically follow topics where I'm mentioned",+ }),+ automatically_unmute_topics_in_muted_streams_policy: $t({+ defaultMessage: "Automatically unmute topics in muted streams",}),desktop_icon_count_display: $t({defaultMessage: "Unread count badge (appears in desktop sidebar and browser tab)",}),+ enable_online_push_notifications: $t({+ defaultMessage: "Send mobile notifications even if I'm online",+ }),enable_digest_emails: $t({defaultMessage: "Send digest emails when I'm away"}),enable_login_emails: $t({defaultMessage: "Send email notifications for new logins to my account",@@ -595,18 +601,12 @@ export const notification_settings_labels = {message_content_in_email_notifications: $t({defaultMessage: "Include message content in message notification emails",}),+ pm_content_in_desktop_notifications: $t({+ defaultMessage: "Include content of direct messages in desktop notifications",+ }),realm_name_in_email_notifications_policy: $t({defaultMessage: "Include organization name in subject of message notification emails",}),- automatically_follow_topics_policy: $t({- defaultMessage: "Automatically follow topics",- }),- automatically_unmute_topics_in_muted_streams_policy: $t({- defaultMessage: "Automatically unmute topics in muted streams",- }),- automatically_follow_topics_where_mentioned: $t({- defaultMessage: "Automatically follow topics where I'm mentioned",- }),};export const realm_user_settings_defaults_labels = {diff --git a/web/src/user_settings.ts b/web/src/user_settings.tsindex cdc47f391f8..a819b40079f 100644--- a/web/src/user_settings.ts+++ b/web/src/user_settings.ts@@ -8,29 +8,31 @@ export type StreamNotificationSettings = {export type PmNotificationSettings = {enable_desktop_notifications: boolean;- enable_sounds: boolean;- enable_offline_push_notifications: boolean;enable_offline_email_notifications: boolean;+ enable_offline_push_notifications: boolean;+ enable_sounds: boolean;};export type FollowedTopicNotificationSettings = {- enable_followed_topic_desktop_notifications: boolean;enable_followed_topic_audible_notifications: boolean;- enable_followed_topic_push_notifications: boolean;+ enable_followed_topic_desktop_notifications: boolean;enable_followed_topic_email_notifications: boolean;+ enable_followed_topic_push_notifications: boolean;enable_followed_topic_wildcard_mentions_notify: boolean;};export type UserSettings = (StreamNotificationSettings &PmNotificationSettings &FollowedTopicNotificationSettings) & {+ automatically_follow_topics_policy: number;+ automatically_follow_topics_where_mentioned: boolean;+ automatically_unmute_topics_in_muted_streams_policy: number;color_scheme: number;default_language: string;- web_home_view: "inbox" | "recent_topics" | "all_messages";- desktop_icon_count_display: number;demote_inactive_streams: number;dense_mode: boolean;- web_mark_read_on_scroll_policy: number;+ desktop_icon_count_display: number;+ display_emoji_reaction_users: boolean;email_notifications_batching_period_seconds: number;emojiset: string;enable_digest_emails: boolean;@@ -39,7 +41,6 @@ export type UserSettings = (StreamNotificationSettings &enable_marketing_emails: boolean;enable_online_push_notifications: boolean;enter_sends: boolean;- web_escape_navigates_to_home_view: boolean;fluid_layout_width: boolean;high_contrast_mode: boolean;message_content_in_email_notifications: boolean;@@ -47,21 +48,20 @@ export type UserSettings = (StreamNotificationSettings &pm_content_in_desktop_notifications: boolean;presence_enabled: boolean;realm_name_in_email_notifications_policy: number;- user_list_style: number;- web_stream_unreads_count_display_policy: number;- starred_message_counts: boolean;- translate_emoticons: boolean;- display_emoji_reaction_users: boolean;- twenty_four_hour_time: boolean;- send_stream_typing_notifications: boolean;send_private_typing_notifications: boolean;send_read_receipts: boolean;- automatically_follow_topics_policy: number;- automatically_unmute_topics_in_muted_streams_policy: number;- automatically_follow_topics_where_mentioned: boolean;+ send_stream_typing_notifications: boolean;+ starred_message_counts: boolean;timezone: string;+ translate_emoticons: boolean;+ twenty_four_hour_time: boolean;+ user_list_style: number;+ web_escape_navigates_to_home_view: boolean;web_font_size_px: number;+ web_home_view: "inbox" | "recent_topics" | "all_messages";web_line_height_percent: number;+ web_mark_read_on_scroll_policy: number;+ web_stream_unreads_count_display_policy: number;};export let user_settings: UserSettings;