mirror of
https://github.com/zulip/zulip.git
synced 2026-07-15 21:03:26 +08:00
Grey out sidebar streams if they're not in the home view.
(imported from commit 4fdd1cb13ba36264803facb59ecf05c40056a59a)
This commit is contained in:
parent
f9b82f2ab8
commit
3f37f88255
@ -94,6 +94,9 @@ function add_narrow_filter(name, type) {
|
||||
.html(swatch);
|
||||
if (type === 'stream') {
|
||||
list_item.attr('id', "stream_sidebar_" + subs.stream_id(name));
|
||||
if (subs.have(name).in_home_view === false) {
|
||||
list_item.addClass("out_of_home_view");
|
||||
}
|
||||
}
|
||||
|
||||
list_item.append($('<a>').attr('href', uri)
|
||||
|
||||
@ -192,6 +192,12 @@ exports.toggle_home = function (stream_name) {
|
||||
|
||||
exports.maybe_toggle_all_messages();
|
||||
set_stream_property(stream_name, 'in_home_view', sub.in_home_view);
|
||||
var li = $("#stream_filters li[data-name='" + encodeURIComponent(stream_name) + "']");
|
||||
if (sub.in_home_view) {
|
||||
li.removeClass("out_of_home_view");
|
||||
} else {
|
||||
li.addClass("out_of_home_view");
|
||||
}
|
||||
};
|
||||
|
||||
function stream_notifications_clicked(e) {
|
||||
|
||||
@ -277,6 +277,10 @@ ul.filters li:hover .arrow {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
ul.filters li.out_of_home_view {
|
||||
opacity: 0.25;
|
||||
}
|
||||
|
||||
.message_list {
|
||||
/* If we change this color, we must change message_reply_fade */
|
||||
background-color: aliceblue;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user