settings: Rename show_push_notifications_tooltip.

This commits renames the `show_push_notifications_tooltip` object to
`disabled_notification_settings` as mentioned in the
https://github.com/zulip/zulip/pull/27543/files#r1438156860 review.

Fixes part of #27262.
This commit is contained in:
Maneesh Shukla 2024-10-21 00:51:20 +05:30 committed by Tim Abbott
parent 34de7b7839
commit 9771528e28
6 changed files with 9 additions and 9 deletions

View File

@ -102,8 +102,8 @@ function get_realm_level_notification_settings(options) {
options.general_settings = all_notifications_settings.general_settings;
options.notification_settings = all_notifications_settings.settings;
options.show_push_notifications_tooltip =
all_notifications_settings.show_push_notifications_tooltip;
options.disabled_notification_settings =
all_notifications_settings.disabled_notification_settings;
}
export function build_page() {

View File

@ -122,8 +122,8 @@ export function build_page() {
realm_name_in_email_notifications_policy_values:
settings_config.realm_name_in_email_notifications_policy_values,
desktop_icon_count_display_values: settings_config.desktop_icon_count_display_values,
show_push_notifications_tooltip:
settings_config.all_notifications(user_settings).show_push_notifications_tooltip,
disabled_notification_settings:
settings_config.all_notifications(user_settings).disabled_notification_settings,
information_section_checkbox_group: settings_config.information_section_checkbox_group,
information_density_settings: settings_config.get_information_density_preferences(),
settings_render_only: settings_config.get_settings_render_only(),

View File

@ -859,7 +859,7 @@ export type AllNotifications = {
email_message_notification_settings: string[];
other_email_settings: string[];
};
show_push_notifications_tooltip: {
disabled_notification_settings: {
push_notifications: boolean;
enable_online_push_notifications: boolean;
};
@ -895,7 +895,7 @@ export const all_notifications = (settings_object: Settings): AllNotifications =
email_message_notification_settings,
other_email_settings,
},
show_push_notifications_tooltip: {
disabled_notification_settings: {
push_notifications: !realm.realm_push_notifications_enabled,
enable_online_push_notifications: !realm.realm_push_notifications_enabled,
},

View File

@ -56,7 +56,7 @@ function rerender_ui(): void {
settings_config.stream_specific_notification_settings,
is_disabled:
settings_config.all_notifications(user_settings)
.show_push_notifications_tooltip,
.disabled_notification_settings,
muted: muted_stream_ids.includes(stream.stream_id),
}),
),

View File

@ -183,7 +183,7 @@ function is_notification_setting(setting_label) {
export function stream_settings(sub) {
const settings_labels = settings_config.general_notifications_table_labels.stream;
const check_realm_setting =
settings_config.all_notifications(user_settings).show_push_notifications_tooltip;
settings_config.all_notifications(user_settings).disabled_notification_settings;
const settings = Object.keys(settings_labels).map((setting) => {
const ret = {

View File

@ -162,7 +162,7 @@
{{> settings_checkbox
setting_name=this
is_checked=(lookup ../settings_object this)
is_disabled=(lookup ../show_push_notifications_tooltip this)
is_disabled=(lookup ../disabled_notification_settings this)
label=(lookup ../settings_label this)
prefix=../prefix}}
{{/each}}