mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 04:23:46 +00:00
left_sidebar: Use hidden-by-filters to hide top left row items.
This commit is contained in:
@@ -54,22 +54,14 @@ export function update_starred_count(count: number, hidden: boolean): void {
|
||||
export function update_scheduled_messages_row(): void {
|
||||
const $scheduled_li = $(".top_left_scheduled_messages");
|
||||
const count = scheduled_messages.get_count();
|
||||
if (count > 0) {
|
||||
$scheduled_li.addClass("show-with-scheduled-messages");
|
||||
} else {
|
||||
$scheduled_li.removeClass("show-with-scheduled-messages");
|
||||
}
|
||||
$scheduled_li.toggleClass("hidden-by-filters", count === 0);
|
||||
ui_util.update_unread_count_in_dom($scheduled_li, count);
|
||||
}
|
||||
|
||||
export function update_reminders_row(): void {
|
||||
const $reminders_li = $(".top_left_reminders");
|
||||
const count = message_reminder.get_count();
|
||||
if (count > 0) {
|
||||
$reminders_li.addClass("show-with-reminders");
|
||||
} else {
|
||||
$reminders_li.removeClass("show-with-reminders");
|
||||
}
|
||||
$reminders_li.toggleClass("hidden-by-filters", count === 0);
|
||||
ui_util.update_unread_count_in_dom($reminders_li, count);
|
||||
}
|
||||
|
||||
|
||||
@@ -1156,19 +1156,6 @@ li.active-sub-filter {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
/* Don't show the scheduled messages item... */
|
||||
li.top_left_reminders,
|
||||
li.top_left_scheduled_messages {
|
||||
display: none;
|
||||
/* ...unless there are scheduled messages to show. */
|
||||
&.show-with-reminders,
|
||||
&.show-with-scheduled-messages {
|
||||
/* Use display: grid to preserve the grid
|
||||
layout when visible. */
|
||||
display: grid;
|
||||
}
|
||||
}
|
||||
|
||||
.left-sidebar-navigation-label-container {
|
||||
grid-area: row-content;
|
||||
/* The label container itself is also a grid,
|
||||
@@ -2141,3 +2128,7 @@ li.topic-list-item {
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.top_left_row.hidden-by-filters {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user