mirror of
https://github.com/zulip/zulip.git
synced 2025-10-24 16:43:57 +00:00
settings: Move up privacy settings section in default user settings.
This commit moves up the privacy setting section in default user settings section and also registers a new handlebar helper "ternary" for conditions. fixes: #33421
This commit is contained in:
@@ -616,15 +616,15 @@ export const realm_user_settings_defaults_labels = {
|
|||||||
}),
|
}),
|
||||||
enable_digest_emails: $t({defaultMessage: "Send digest emails when user is away"}),
|
enable_digest_emails: $t({defaultMessage: "Send digest emails when user is away"}),
|
||||||
|
|
||||||
realm_presence_enabled: $t({
|
presence_enabled: $t({
|
||||||
defaultMessage: "Display availability to other users",
|
defaultMessage: "Display availability to other users",
|
||||||
}),
|
}),
|
||||||
realm_presence_enabled_parens_text: $t({defaultMessage: "invisible mode off"}),
|
presence_enabled_parens_text: $t({defaultMessage: "invisible mode off"}),
|
||||||
realm_send_read_receipts: $t({defaultMessage: "Allow other users to view read receipts"}),
|
send_read_receipts: $t({defaultMessage: "Allow other users to view read receipts"}),
|
||||||
realm_send_private_typing_notifications: $t({
|
send_private_typing_notifications: $t({
|
||||||
defaultMessage: "Let recipients see when a user is typing direct messages",
|
defaultMessage: "Let recipients see when a user is typing direct messages",
|
||||||
}),
|
}),
|
||||||
realm_send_stream_typing_notifications: $t({
|
send_stream_typing_notifications: $t({
|
||||||
defaultMessage: "Let recipients see when a user is typing channel messages",
|
defaultMessage: "Let recipients see when a user is typing channel messages",
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -90,56 +90,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="privacy_settings_box">
|
{{> privacy_settings . for_realm_settings=false prefix="user_" read_receipts_help_icon_tooltip_text=send_read_receipts_tooltip hide_read_receipts_tooltip=realm.realm_enable_read_receipts}}
|
||||||
<div class="subsection-header">
|
|
||||||
<h3 class="inline-block">{{t "Privacy" }}</h3>
|
|
||||||
<div class="alert-notification privacy-setting-status"></div>
|
|
||||||
</div>
|
|
||||||
<div class="input-group">
|
|
||||||
{{> settings_checkbox
|
|
||||||
setting_name="send_private_typing_notifications"
|
|
||||||
is_checked=settings_object.send_private_typing_notifications
|
|
||||||
label=settings_label.send_private_typing_notifications
|
|
||||||
}}
|
|
||||||
{{> settings_checkbox
|
|
||||||
setting_name="send_stream_typing_notifications"
|
|
||||||
is_checked=settings_object.send_stream_typing_notifications
|
|
||||||
label=settings_label.send_stream_typing_notifications
|
|
||||||
}}
|
|
||||||
{{> settings_checkbox
|
|
||||||
setting_name="send_read_receipts"
|
|
||||||
is_checked=settings_object.send_read_receipts
|
|
||||||
label=settings_label.send_read_receipts
|
|
||||||
help_icon_tooltip_text=send_read_receipts_tooltip
|
|
||||||
hide_tooltip=realm.realm_enable_read_receipts
|
|
||||||
help_link="/help/read-receipts"
|
|
||||||
}}
|
|
||||||
{{> settings_checkbox
|
|
||||||
setting_name="presence_enabled"
|
|
||||||
is_checked=settings_object.presence_enabled
|
|
||||||
label=settings_label.presence_enabled
|
|
||||||
label_parens_text=settings_label.presence_enabled_parens_text
|
|
||||||
help_link="/help/status-and-availability"
|
|
||||||
prefix="user_"}}
|
|
||||||
{{> settings_checkbox
|
|
||||||
setting_name="allow_private_data_export"
|
|
||||||
is_checked=settings_object.allow_private_data_export
|
|
||||||
label=settings_label.allow_private_data_export
|
|
||||||
help_link="/help/export-your-organization#export-your-organization"
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
<div class="input-group">
|
|
||||||
<label for="user_email_address_visibility" class="settings-field-label">{{t "Who can access your email address" }}
|
|
||||||
{{> ../help_link_widget link="/help/configure-email-visibility" }}
|
|
||||||
</label>
|
|
||||||
<div id="user_email_address_dropdown_container" class="inline-block {{#unless user_has_email_set}}disabled_setting_tooltip{{/unless}}">
|
|
||||||
<select name="email_address_visibility" class="email_address_visibility prop-element settings_select bootstrap-focus-style" data-setting-widget-type="number"
|
|
||||||
id="user_email_address_visibility" {{#unless user_has_email_set}}disabled="disabled"{{/unless}}>
|
|
||||||
{{> dropdown_options_widget option_values=email_address_visibility_values}}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="api_key_button_box">
|
<div id="api_key_button_box">
|
||||||
<h3>{{t "API key" }}</h3>
|
<h3>{{t "API key" }}</h3>
|
||||||
|
|||||||
@@ -9,44 +9,4 @@
|
|||||||
{{> preferences . prefix="realm_" for_realm_settings=true full_name=full_name}}
|
{{> preferences . prefix="realm_" for_realm_settings=true full_name=full_name}}
|
||||||
|
|
||||||
{{> notification_settings . prefix="realm_" for_realm_settings=true}}
|
{{> notification_settings . prefix="realm_" for_realm_settings=true}}
|
||||||
|
|
||||||
<div class="privacy_settings settings-subsection-parent">
|
|
||||||
<div class="subsection-header">
|
|
||||||
<h3 class="inline-block">{{t "Privacy settings" }}</h3>
|
|
||||||
{{> settings_save_discard_widget section_name="privacy-setting" show_only_indicator=false }}
|
|
||||||
</div>
|
|
||||||
{{> settings_checkbox
|
|
||||||
setting_name="send_private_typing_notifications"
|
|
||||||
is_checked=settings_object.send_private_typing_notifications
|
|
||||||
label=settings_label.realm_send_private_typing_notifications
|
|
||||||
prefix="realm_"}}
|
|
||||||
{{> settings_checkbox
|
|
||||||
setting_name="send_stream_typing_notifications"
|
|
||||||
is_checked=settings_object.send_stream_typing_notifications
|
|
||||||
label=settings_label.realm_send_stream_typing_notifications
|
|
||||||
prefix="realm_"}}
|
|
||||||
{{> settings_checkbox
|
|
||||||
setting_name="presence_enabled"
|
|
||||||
is_checked=settings_object.presence_enabled
|
|
||||||
label=settings_label.realm_presence_enabled
|
|
||||||
label_parens_text=settings_label.realm_presence_enabled_parens_text
|
|
||||||
help_link="/help/status-and-availability"
|
|
||||||
prefix="realm_"}}
|
|
||||||
{{> settings_checkbox
|
|
||||||
setting_name="send_read_receipts"
|
|
||||||
is_checked=settings_object.send_read_receipts
|
|
||||||
label=settings_label.realm_send_read_receipts
|
|
||||||
prefix="realm_"
|
|
||||||
help_link="/help/read-receipts"}}
|
|
||||||
|
|
||||||
<div class="input-group">
|
|
||||||
<label for="realm_email_address_visibility" class="settings-field-label">{{t "Who can access user's email address" }}
|
|
||||||
{{> ../help_link_widget link="/help/configure-email-visibility" }}
|
|
||||||
</label>
|
|
||||||
<select name="email_address_visibility" class="email_address_visibility prop-element settings_select bootstrap-focus-style" data-setting-widget-type="number"
|
|
||||||
id="realm_email_address_visibility">
|
|
||||||
{{> dropdown_options_widget option_values=email_address_visibility_values}}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<form class="preferences-settings-form">
|
<form class="preferences-settings-form">
|
||||||
{{>preferences_general .}}
|
{{>preferences_general .}}
|
||||||
|
{{!-- user_has_email_set is passed as true here, because we don't disable the dropdown in organization panel also there's no need to show tooltip here. --}}
|
||||||
|
{{#if for_realm_settings}}{{> privacy_settings . prefix="realm_" read_receipts_help_icon_tooltip_text="" hide_read_receipts_tooltip=true user_has_email_set=true}}{{/if}}
|
||||||
|
|
||||||
{{>preferences_emoji .}}
|
{{>preferences_emoji .}}
|
||||||
|
|
||||||
|
|||||||
71
web/templates/settings/privacy_settings.hbs
Normal file
71
web/templates/settings/privacy_settings.hbs
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
<div {{#if for_realm_settings}}class="privacy_settings settings-subsection-parent" {{else}} id="privacy_settings_box"
|
||||||
|
{{/if}}>
|
||||||
|
<div class="subsection-header inline-block">
|
||||||
|
{{#if for_realm_settings}}
|
||||||
|
<h3 class="inline-block">{{t "Privacy settings"}}</h3>
|
||||||
|
{{> settings_save_discard_widget section_name="privacy-setting" show_only_indicator=false }}
|
||||||
|
{{else}}
|
||||||
|
<h3 class="inline-block">{{t "Privacy"}}</h3>
|
||||||
|
{{> settings_save_discard_widget section_name="privacy-setting" show_only_indicator=(not for_realm_settings) }}
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{> settings_checkbox
|
||||||
|
setting_name="send_private_typing_notifications"
|
||||||
|
is_checked=settings_object.send_private_typing_notifications
|
||||||
|
label=settings_label.send_private_typing_notifications
|
||||||
|
prefix=prefix
|
||||||
|
}}
|
||||||
|
{{> settings_checkbox
|
||||||
|
setting_name="send_stream_typing_notifications"
|
||||||
|
is_checked=settings_object.send_stream_typing_notifications
|
||||||
|
label=settings_label.send_stream_typing_notifications
|
||||||
|
prefix=prefix
|
||||||
|
}}
|
||||||
|
{{> settings_checkbox
|
||||||
|
setting_name="send_read_receipts"
|
||||||
|
is_checked=settings_object.send_read_receipts
|
||||||
|
label=settings_label.send_read_receipts
|
||||||
|
prefix=prefix
|
||||||
|
help_link="/help/read-receipts"
|
||||||
|
help_icon_tooltip_text=read_receipts_help_icon_tooltip_text
|
||||||
|
hide_tooltip=hide_read_receipts_tooltip
|
||||||
|
}}
|
||||||
|
{{> settings_checkbox
|
||||||
|
setting_name="presence_enabled"
|
||||||
|
is_checked=settings_object.presence_enabled
|
||||||
|
label=settings_label.presence_enabled
|
||||||
|
label_parens_text=settings_label.presence_enabled_parens_text
|
||||||
|
help_link="/help/status-and-availability"
|
||||||
|
prefix=prefix
|
||||||
|
}}
|
||||||
|
{{#unless for_realm_settings}}
|
||||||
|
{{> settings_checkbox
|
||||||
|
setting_name="allow_private_data_export"
|
||||||
|
is_checked=settings_object.allow_private_data_export
|
||||||
|
label=settings_label.allow_private_data_export
|
||||||
|
help_link="/help/export-your-organization#export-your-organization"
|
||||||
|
}}
|
||||||
|
{{/unless}}
|
||||||
|
|
||||||
|
<div class="input-group">
|
||||||
|
<label for="{{prefix}}email_address_visibility" class="settings-field-label">
|
||||||
|
{{#if for_realm_settings}}
|
||||||
|
{{t "Who can access user's email address"}}
|
||||||
|
{{else}}
|
||||||
|
{{t "Who can access your email address"}}
|
||||||
|
{{/if}}
|
||||||
|
{{> ../help_link_widget link="/help/configure-email-visibility" }}
|
||||||
|
</label>
|
||||||
|
<div id="user_email_address_dropdown_container"
|
||||||
|
class="inline-block {{#unless user_has_email_set}}disabled_setting_tooltip{{/unless}}">
|
||||||
|
<select name="email_address_visibility"
|
||||||
|
class="email_address_visibility prop-element settings_select bootstrap-focus-style"
|
||||||
|
data-setting-widget-type="number"
|
||||||
|
id="{{prefix}}email_address_visibility"
|
||||||
|
{{#unless user_has_email_set}}disabled="disabled"{{/unless}}>
|
||||||
|
{{> dropdown_options_widget option_values=email_address_visibility_values}}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
Reference in New Issue
Block a user