Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
css: Directly use `only-visible-for-spectaros` class to hide elements.
Aman Agrawal8b692943e7b0
diff --git a/static/styles/app_components.css b/static/styles/app_components.cssindex 2e7ab4242a5..8de60e15c3a 100644--- a/static/styles/app_components.css+++ b/static/styles/app_components.css@@ -552,6 +552,10 @@ div.overlay {background-size: cover;}+.only-visible-for-spectators {+ display: none;+}+.spectator-view {/* Add this class to elements which a* spectator cannot use. */diff --git a/static/templates/compose.hbs b/static/templates/compose.hbsindex 40a2f89f60f..492385c957a 100644--- a/static/templates/compose.hbs+++ b/static/templates/compose.hbs@@ -31,7 +31,7 @@</button></span>{{/unless}}- <span class="new_message_button hide only-visible-for-spectators">+ <span class="new_message_button only-visible-for-spectators"><a class="no-underline button small rounded float-left" href="/login">{{t 'Log in to send messages' }}</a>diff --git a/static/templates/gear_menu.hbs b/static/templates/gear_menu.hbsindex 8a619b1a2f2..f1c0982c203 100644--- a/static/templates/gear_menu.hbs+++ b/static/templates/gear_menu.hbs@@ -119,7 +119,7 @@</a></li>{{/if}}- <li role="presentation" class="hide only-visible-for-spectators">+ <li role="presentation" class="only-visible-for-spectators"><a href="/login" role="menuitem"><i class="fa fa-sign-in" aria-hidden="true"></i> {{t 'Log in' }}</a>