From 9771528e2848e3290485735715a4175ab30dad4b Mon Sep 17 00:00:00 2001 From: Maneesh Shukla Date: Mon, 21 Oct 2024 00:51:20 +0530 Subject: [PATCH] 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. --- web/src/admin.js | 4 ++-- web/src/settings.js | 4 ++-- web/src/settings_config.ts | 4 ++-- web/src/settings_notifications.ts | 2 +- web/src/stream_edit.js | 2 +- web/templates/settings/notification_settings.hbs | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/web/src/admin.js b/web/src/admin.js index 2cd69865ce..6713c2575e 100644 --- a/web/src/admin.js +++ b/web/src/admin.js @@ -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() { diff --git a/web/src/settings.js b/web/src/settings.js index b12f1f097c..e45c4cc16e 100644 --- a/web/src/settings.js +++ b/web/src/settings.js @@ -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(), diff --git a/web/src/settings_config.ts b/web/src/settings_config.ts index 453926a16b..19c31b39da 100644 --- a/web/src/settings_config.ts +++ b/web/src/settings_config.ts @@ -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, }, diff --git a/web/src/settings_notifications.ts b/web/src/settings_notifications.ts index 63499eeccb..83a178195a 100644 --- a/web/src/settings_notifications.ts +++ b/web/src/settings_notifications.ts @@ -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), }), ), diff --git a/web/src/stream_edit.js b/web/src/stream_edit.js index b2d2e5fc23..d7de548b9f 100644 --- a/web/src/stream_edit.js +++ b/web/src/stream_edit.js @@ -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 = { diff --git a/web/templates/settings/notification_settings.hbs b/web/templates/settings/notification_settings.hbs index 1a0154189b..79168a5cbe 100644 --- a/web/templates/settings/notification_settings.hbs +++ b/web/templates/settings/notification_settings.hbs @@ -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}}