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.

gear_menu_dropdown: Use better class name for theme buttons.

Aman Agrawal2efc2a5eb506
diff --git a/web/src/gear_menu.js b/web/src/gear_menu.js
index a8241b930f6..1e212fa19f4 100644
--- a/web/src/gear_menu.js
+++ b/web/src/gear_menu.js
@@ -166,7 +166,7 @@ export function initialize() {
// it being called before message lists are initialized and the order cannot be changed.
// Also, since these buttons are only visible for spectators which doesn't have events,
// if theme is changed in a different tab, the theme of this tab remains the same.
- $popper.on("click", "#gear-menu-dropdown .dark-theme", (e) => {
+ $popper.on("click", "#gear-menu-dropdown .gear-menu-select-dark-theme", (e) => {
instance.hide();
e.preventDefault();
e.stopPropagation();
@@ -176,7 +176,7 @@ export function initialize() {
});
});
- $popper.on("click", "#gear-menu-dropdown .light-theme", (e) => {
+ $popper.on("click", "#gear-menu-dropdown .gear-menu-select-light-theme", (e) => {
instance.hide();
e.preventDefault();
e.stopPropagation();
diff --git a/web/styles/dark_theme.css b/web/styles/dark_theme.css
index b4043d67a74..51f52096c32 100644
--- a/web/styles/dark_theme.css
+++ b/web/styles/dark_theme.css
@@ -692,11 +692,11 @@
}
.spectator-view #gear-menu-dropdown {
- .dark-theme {
+ .gear-menu-select-dark-theme {
display: none;
}
- .light-theme {
+ .gear-menu-select-light-theme {
display: block;
}
}
diff --git a/web/styles/popovers.css b/web/styles/popovers.css
index 3f83fcb2566..9fc6ef38bf9 100644
--- a/web/styles/popovers.css
+++ b/web/styles/popovers.css
@@ -1304,8 +1304,8 @@ ul {
}
}
- .light-theme,
- .dark-theme {
+ .gear-menu-select-light-theme,
+ .gear-menu-select-dark-theme {
display: none;
}
}
@@ -1335,7 +1335,7 @@ ul.navbar-dropdown-menu-outer-list {
}
.spectator-view {
- #gear-menu-dropdown .dark-theme {
+ #gear-menu-dropdown .gear-menu-select-dark-theme {
display: block;
}
}
diff --git a/web/templates/gear_menu_popover.hbs b/web/templates/gear_menu_popover.hbs
index e93bcf62e5e..685fe62e97f 100644
--- a/web/templates/gear_menu_popover.hbs
+++ b/web/templates/gear_menu_popover.hbs
@@ -73,12 +73,12 @@
<i class="zulip-icon zulip-icon-f-globe" aria-hidden="true"></i> {{t 'Select language' }}
</a>
</li>
- <li class="link-item dark-theme only-visible-for-spectators">
+ <li class="link-item gear-menu-select-dark-theme only-visible-for-spectators">
<a tabindex="0" class="navigate-link-on-enter">
<i class="zulip-icon zulip-icon-moon" aria-hidden="true"></i> {{t 'Switch to dark theme' }}
</a>
</li>
- <li class="link-item light-theme only-visible-for-spectators">
+ <li class="link-item gear-menu-select-light-theme only-visible-for-spectators">
<a tabindex="0" class="navigate-link-on-enter">
<i class="zulip-icon zulip-icon-sun" aria-hidden="true"></i> {{t 'Switch to light theme' }}
</a>