mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
stream settings: Disable Mobile notifications if push bouncer not set up.
This commit disables "Mobile notifications" if `push_notifications` are not enabled. It also adds a tooltip explaining why this is disabled. Fixes #12208
This commit is contained in:
committed by
Tim Abbott
parent
84234cabcb
commit
747e797092
@@ -238,6 +238,10 @@ var settings_labels = {
|
||||
pin_to_top: i18n.t("Pin stream to top of left sidebar"),
|
||||
};
|
||||
|
||||
var check_realm_setting = {
|
||||
push_notifications: !page_params.realm_push_notifications_enabled,
|
||||
};
|
||||
|
||||
exports.stream_settings = function (sub) {
|
||||
var settings = [];
|
||||
_.each(Object.keys(settings_labels), function (setting) {
|
||||
@@ -267,6 +271,7 @@ exports.show_settings_for = function (node) {
|
||||
var html = templates.render('subscription_settings', {
|
||||
sub: sub,
|
||||
settings: exports.stream_settings(sub),
|
||||
realm_settings: check_realm_setting,
|
||||
});
|
||||
ui.get_content_element($('.subscriptions .right .settings')).html(html);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user