mirror of
https://github.com/zulip/zulip.git
synced 2025-11-08 07:52:19 +00:00
Show lock icon in compose box for invite-only streams (811)
(imported from commit c563fa605d850f39c3b3f0ae9530700f1d1b6e73)
This commit is contained in:
@@ -56,12 +56,22 @@ function show(tabname, focus_area) {
|
||||
notifications_bar.maybe_disable();
|
||||
}
|
||||
|
||||
function update_lock_icon_for_stream(stream_name) {
|
||||
var icon = $("#compose-lock-icon");
|
||||
if (subs.get_invite_only(stream_name)) {
|
||||
icon.show();
|
||||
} else {
|
||||
icon.hide();
|
||||
}
|
||||
}
|
||||
|
||||
// In an attempt to decrease mixing, make the composebox's
|
||||
// stream bar look like what you're replying to.
|
||||
// (In particular, if there's a color associated with it,
|
||||
// have that color be reflected here too.)
|
||||
exports.decorate_stream_bar = function (stream_name) {
|
||||
var color = subs.get_color(stream_name);
|
||||
update_lock_icon_for_stream(stream_name);
|
||||
$("#stream-message .message_header_stream")
|
||||
.css('background-color', color)
|
||||
.removeClass(subs.color_classes)
|
||||
|
||||
Reference in New Issue
Block a user