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.

push_notifications: Add help links to mobile notifications options.

Sayam Samal68ccb022cabd
diff --git a/web/styles/subscriptions.css b/web/styles/subscriptions.css
index 759e54120de..14858f1a24b 100644
--- a/web/styles/subscriptions.css
+++ b/web/styles/subscriptions.css
@@ -53,8 +53,12 @@
color: hsl(0deg 0% 64%);
}
-.sub_setting_checkbox .control-label-disabled label {
- cursor: not-allowed;
+.sub_setting_checkbox {
+ display: flex;
+
+ & .control-label-disabled label {
+ cursor: not-allowed;
+ }
}
.mute-note {
diff --git a/web/templates/settings/notification_settings.hbs b/web/templates/settings/notification_settings.hbs
index 2037e8846e3..79e8a27e44f 100644
--- a/web/templates/settings/notification_settings.hbs
+++ b/web/templates/settings/notification_settings.hbs
@@ -10,10 +10,11 @@
<tr>
<th rowspan="2" width="30%"></th>
<th colspan="2" width="28%">{{t "Desktop"}}</th>
- <th rowspan="2" width="14%" class="{{#if show_push_notifications_tooltip.push_notifications}}control-label-disabled{{/if}}">
- <span {{#if (not realm_push_notifications_enabled) }}class="tippy-zulip-tooltip" data-tooltip-template-id="mobile-push-notification-tooltip-template"{{/if}}>
+ <th rowspan="2" width="14%">
+ <span {{#if (not realm_push_notifications_enabled) }}class="control-label-disabled tippy-zulip-tooltip" data-tooltip-template-id="mobile-push-notification-tooltip-template"{{/if}}>
{{t "Mobile"}}
</span>
+ {{> ../help_link_widget link="/help/mobile-notifications#enabling-push-notifications-for-self-hosted-servers" }}
</th>
<th rowspan="2" width="14%">{{t "Email"}}</th>
<th rowspan="2" width="14%">@all
diff --git a/web/templates/stream_settings/stream_settings_checkbox.hbs b/web/templates/stream_settings/stream_settings_checkbox.hbs
index b1cdac90816..592b62c475c 100644
--- a/web/templates/stream_settings/stream_settings_checkbox.hbs
+++ b/web/templates/stream_settings/stream_settings_checkbox.hbs
@@ -1,21 +1,23 @@
{{!-- If setting is disabled on realm level, then render setting as control-label-disabled and do not set setting value. Setting status should not change on any click handler, as it is disabled at realm level. --}}
-<div id="sub_{{setting_name}}_setting"
- class="sub_setting_checkbox
- {{#if disabled_realm_setting}}control-label-disabled
- {{else if notification_setting}}sub_notification_setting{{/if}} new-style">
- <span {{#if (and disabled_realm_setting (eq setting_name "push_notifications"))}}class="tippy-zulip-tooltip" data-tooltip-template-id="mobile-push-notification-tooltip-template"{{/if}}>
- <label class="checkbox">
- <input id="{{setting_name}}_{{stream_id}}" name="{{setting_name}}"
- class="sub_setting_control" type="checkbox"
- {{#if is_checked}}checked{{/if}}
- {{#if is_disabled}}disabled="disabled"{{/if}} />
- <span></span>
- </label>
- <label class="inline" for="{{setting_name}}_{{stream_id}}">
- {{label}}
- {{#if (eq setting_name "is_muted")}}
- {{> ../help_link_widget link="/help/mute-a-stream" }}
- {{/if}}
- </label>
- </span>
+<div class="sub_setting_checkbox">
+ <div id="sub_{{setting_name}}_setting" class="{{#if disabled_realm_setting}}control-label-disabled
+ {{else if notification_setting}}sub_notification_setting{{/if}} new-style">
+ <span {{#if (and disabled_realm_setting (eq setting_name "push_notifications"))}}class="tippy-zulip-tooltip" data-tooltip-template-id="mobile-push-notification-tooltip-template"{{/if}}>
+ <label class="checkbox">
+ <input id="{{setting_name}}_{{stream_id}}" name="{{setting_name}}"
+ class="sub_setting_control" type="checkbox"
+ {{#if is_checked}}checked{{/if}}
+ {{#if is_disabled}}disabled="disabled"{{/if}} />
+ <span></span>
+ </label>
+ <label class="inline" for="{{setting_name}}_{{stream_id}}">
+ {{label}}
+ </label>
+ </span>
+ </div>
+ {{#if (eq setting_name "is_muted")}}
+ {{> ../help_link_widget link="/help/mute-a-stream" }}
+ {{else if (eq setting_name "push_notifications")}}
+ {{> ../help_link_widget link="/help/mobile-notifications#enabling-push-notifications-for-self-hosted-servers" }}
+ {{/if}}
</div>