Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
css: Introduce class which will hide elements for spectators.
Aman Agrawal99cd837421ee
diff --git a/static/js/ui_init.js b/static/js/ui_init.jsindex 253c53b9167..50e7ccd6751 100644--- a/static/js/ui_init.js+++ b/static/js/ui_init.js@@ -189,6 +189,10 @@ export function initialize_kitchen_sink_stuff() {// box, but, close enough for now.resize.handler();+ if (page_params.is_spectator) {+ $("body").addClass("spectator-view");+ }+if (!page_params.left_side_userlist) {$("#navbar-buttons").addClass("right-userlist");}diff --git a/static/styles/app_components.css b/static/styles/app_components.cssindex 1981373eef2..69b56f53bae 100644--- a/static/styles/app_components.css+++ b/static/styles/app_components.css@@ -551,3 +551,15 @@ div.overlay {background-image: url(../../static/images/logo/white-zulip-logo-without-text.svg);background-size: cover;}++.spectator-view {+ /* Add this class to elements which a+ * spectator cannot use. */+ .hidden-for-spectators {+ display: none !important;+ }++ .only-visible-for-spectators {+ display: unset;+ }+}