Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

display_settings: Split `Advanced` into `Information` and `Navigation`.

Shubham Padiaada92f502efb
diff --git a/web/src/settings_preferences.ts b/web/src/settings_preferences.ts
index f3e77489781..7cfe7e6c4fc 100644
--- a/web/src/settings_preferences.ts
+++ b/web/src/settings_preferences.ts
@@ -276,7 +276,7 @@ export function set_up(settings_panel: SettingsPanel): void {
if (current_user_list_style === data.user_list_style) {
return;
}
- const $spinner = $container.find(".advanced-settings-status").expectOne();
+ const $spinner = $container.find(".information-settings-status").expectOne();
loading.make_indicator($spinner, {text: settings_ui.strings.saving});
void channel.patch({
@@ -290,7 +290,7 @@ export function set_up(settings_panel: SettingsPanel): void {
ui_report.error(
settings_ui.strings.failure_html,
xhr,
- $container.find(".advanced-settings-status").expectOne(),
+ $container.find(".information-settings-status").expectOne(),
);
},
});
@@ -326,7 +326,7 @@ export function report_user_list_style_change(settings_panel: SettingsPanel): vo
// causes the actual sprite sheet to change. The current
// implementation is wrong, though, in that it displays the UI
// update in all active browser windows.
- const $spinner = $(settings_panel.container).find(".advanced-settings-status");
+ const $spinner = $(settings_panel.container).find(".information-settings-status");
if ($spinner.length) {
loading.destroy_indicator($spinner);
ui_report.success(
diff --git a/web/templates/settings/display_settings.hbs b/web/templates/settings/display_settings.hbs
index 54e9d23646a..06221bade2a 100644
--- a/web/templates/settings/display_settings.hbs
+++ b/web/templates/settings/display_settings.hbs
@@ -99,12 +99,33 @@
prefix=prefix}}
</div>
- <div class="advanced-settings {{#if for_realm_settings}}settings-subsection-parent{{else}}subsection-parent{{/if}}">
+ <div class="navigation-settings {{#if for_realm_settings}}settings-subsection-parent{{else}}subsection-parent{{/if}}">
<div class="subsection-header">
- <h3 class="light">{{t "Advanced" }}</h3>
- {{> settings_save_discard_widget section_name="advanced-settings" show_only_indicator=(not for_realm_settings) }}
+ <h3 class="light">{{t "Navigation" }}</h3>
+ {{> settings_save_discard_widget section_name="navigation-settings" show_only_indicator=(not for_realm_settings) }}
</div>
+ <div class="input-group thinner setting-next-is-related">
+ <label for="web_home_view" class="settings-field-label">{{t "Home view" }}
+ {{> ../help_link_widget link="/help/configure-home-view" }}
+ </label>
+ <select name="web_home_view" class="setting_web_home_view prop-element settings_select bootstrap-focus-style" id="{{prefix}}web_home_view" data-setting-widget-type="string">
+ {{> dropdown_options_widget option_values=web_home_view_values}}
+ </select>
+ </div>
+
+ {{> settings_checkbox
+ setting_name="web_escape_navigates_to_home_view"
+ is_checked=settings_object.web_escape_navigates_to_home_view
+ label=settings_label.web_escape_navigates_to_home_view
+ prefix=prefix}}
+
+ {{> settings_checkbox
+ setting_name="web_navigate_to_sent_message"
+ is_checked=settings_object.web_navigate_to_sent_message
+ label=settings_label.web_navigate_to_sent_message
+ prefix=prefix}}
+
<div class="input-group">
<label for="web_mark_read_on_scroll_policy" class="settings-field-label">{{t "Automatically mark messages as read" }}
{{> ../help_link_widget link="/help/marking-messages-as-read" }}
@@ -114,6 +135,20 @@
</select>
</div>
+ <div class="input-group">
+ <label for="web_channel_default_view" class="settings-field-label">{{t "Channel links in the left sidebar go to" }}</label>
+ <select name="web_channel_default_view" class="setting_web_channel_default_view prop-element settings_select bootstrap-focus-style" id="{{prefix}}web_channel_default_view" data-setting-widget-type="number">
+ {{> dropdown_options_widget option_values=web_channel_default_view_values}}
+ </select>
+ </div>
+ </div>
+
+ <div class="information-settings {{#if for_realm_settings}}settings-subsection-parent{{else}}subsection-parent{{/if}}">
+ <div class="subsection-header">
+ <h3 class="light">{{t "Information" }}</h3>
+ {{> settings_save_discard_widget section_name="information-settings" show_only_indicator=(not for_realm_settings) }}
+ </div>
+
<div class="input-group">
<label class="settings-field-label">{{t "User list style" }}</label>
<div class="user_list_style_values grey-box prop-element" id="{{prefix}}user_list_style" data-setting-widget-type="radio-group" data-setting-choice-type="number">
@@ -145,43 +180,6 @@
</div>
</div>
- <div class="input-group thinner setting-next-is-related">
- <label for="web_home_view" class="settings-field-label">{{t "Home view" }}
- {{> ../help_link_widget link="/help/configure-home-view" }}
- </label>
- <select name="web_home_view" class="setting_web_home_view prop-element settings_select bootstrap-focus-style" id="{{prefix}}web_home_view" data-setting-widget-type="string">
- {{> dropdown_options_widget option_values=web_home_view_values}}
- </select>
- </div>
-
- {{> settings_checkbox
- setting_name="web_escape_navigates_to_home_view"
- is_checked=settings_object.web_escape_navigates_to_home_view
- label=settings_label.web_escape_navigates_to_home_view
- prefix=prefix}}
-
- {{> settings_checkbox
- setting_name="web_navigate_to_sent_message"
- is_checked=settings_object.web_navigate_to_sent_message
- label=settings_label.web_navigate_to_sent_message
- prefix=prefix}}
-
- <div class="input-group">
- <label for="web_channel_default_view" class="settings-field-label">{{t "Channel links in the left sidebar go to" }}</label>
- <select name="web_channel_default_view" class="setting_web_channel_default_view prop-element settings_select bootstrap-focus-style" id="{{prefix}}web_channel_default_view" data-setting-widget-type="number">
- {{> dropdown_options_widget option_values=web_channel_default_view_values}}
- </select>
- </div>
-
- <div class="input-group">
- <label for="demote_inactive_streams" class="settings-field-label">{{t "Demote inactive channels" }}
- {{> ../help_link_widget link="/help/manage-inactive-channels" }}
- </label>
- <select name="demote_inactive_streams" class="setting_demote_inactive_streams prop-element settings_select bootstrap-focus-style" id="{{prefix}}demote_inactive_streams" data-setting-widget-type="number">
- {{> dropdown_options_widget option_values=demote_inactive_streams_values}}
- </select>
- </div>
-
<div class="input-group">
<label for="web_stream_unreads_count_display_policy" class="settings-field-label">{{t "Show unread counts for" }}</label>
<select name="web_stream_unreads_count_display_policy" class="setting_web_stream_unreads_count_display_policy prop-element bootstrap-focus-style settings_select" id="{{prefix}}web_stream_unreads_count_display_policy" data-setting-widget-type="number">
@@ -198,12 +196,20 @@
prefix=../prefix}}
{{/each}}
+ <div class="input-group">
+ <label for="demote_inactive_streams" class="settings-field-label">{{t "Demote inactive channels" }}
+ {{> ../help_link_widget link="/help/manage-inactive-channels" }}
+ </label>
+ <select name="demote_inactive_streams" class="setting_demote_inactive_streams prop-element settings_select bootstrap-focus-style" id="{{prefix}}demote_inactive_streams" data-setting-widget-type="number">
+ {{> dropdown_options_widget option_values=demote_inactive_streams_values}}
+ </select>
+ </div>
+
{{> settings_checkbox
setting_name="high_contrast_mode"
is_checked=settings_object.high_contrast_mode
label=settings_label.high_contrast_mode
render_only=settings_render_only.high_contrast_mode
prefix=prefix}}
-
</div>
</form>