settings-banner: Fix bugs in the rendering of the desktop notification banner.

This commit adds the `banner-wrapper` class to the parent container of the
banner.

Added `margin-bottom: 10px` to the banner to improve its appearance.

Placed the event listener at the correct location with the $container
element so that it binds only once. Previously, it was being bound
every time the settings page was loaded, causing multiple event listeners
to be attached to the same element.

Additionally, the banner was not rendering when opening
Org settings > DEFAULT USER SETTINGS directly,
and this has been fixed by ensuring the banner is rendered correctly.
This commit is contained in:
Maneesh Shukla
2025-06-11 12:05:43 +05:30
committed by Tim Abbott
parent 9d6af079c7
commit 5ba7c2bddb
3 changed files with 26 additions and 20 deletions

View File

@@ -131,7 +131,7 @@
{{> settings_save_discard_widget section_name="desktop-message-settings" show_only_indicator=(not for_realm_settings) }}
</div>
<div class="desktop-notification-settings-banners"></div>
<div class="desktop-notification-settings-banners banner-wrapper"></div>
{{#unless for_realm_settings}}
<p><a class="send_test_notification">{{t "Send a test notification" }}</a></p>