mirror of https://github.com/zulip/zulip.git
left_sidebar: Move all messages popover to inbox.
Also, renamed files and variables as needed.
This commit is contained in:
parent
dd1e06886c
commit
2ec8273c6e
|
@ -1,7 +1,7 @@
|
|||
import $ from "jquery";
|
||||
|
||||
import render_all_messages_sidebar_actions from "../templates/all_messages_sidebar_actions.hbs";
|
||||
import render_drafts_sidebar_actions from "../templates/drafts_sidebar_action.hbs";
|
||||
import render_left_sidebar_inbox_popover from "../templates/left_sidebar_inbox_popover.hbs";
|
||||
import render_starred_messages_sidebar_actions from "../templates/starred_messages_sidebar_actions.hbs";
|
||||
|
||||
import * as channel from "./channel";
|
||||
|
@ -81,12 +81,12 @@ export function initialize() {
|
|||
},
|
||||
});
|
||||
|
||||
// All messages popover
|
||||
popover_menus.register_popover_menu(".all-messages-sidebar-menu-icon", {
|
||||
// Inbox popover
|
||||
popover_menus.register_popover_menu(".inbox-sidebar-menu-icon", {
|
||||
...popover_menus.left_sidebar_tippy_options,
|
||||
onMount(instance) {
|
||||
const $popper = $(instance.popper);
|
||||
popover_menus.popover_instances.all_messages = instance;
|
||||
popover_menus.popover_instances.left_sidebar_inbox_popover = instance;
|
||||
|
||||
$popper.one("click", "#mark_all_messages_as_read", () => {
|
||||
unread_ops.confirm_mark_all_as_read();
|
||||
|
@ -95,11 +95,11 @@ export function initialize() {
|
|||
},
|
||||
onShow(instance) {
|
||||
popovers.hide_all();
|
||||
instance.setContent(parse_html(render_all_messages_sidebar_actions()));
|
||||
instance.setContent(parse_html(render_left_sidebar_inbox_popover()));
|
||||
},
|
||||
onHidden(instance) {
|
||||
instance.destroy();
|
||||
popover_menus.popover_instances.all_messages = undefined;
|
||||
popover_menus.popover_instances.left_sidebar_inbox_popover = undefined;
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ export const popover_instances = {
|
|||
compose_control_buttons: null,
|
||||
starred_messages: null,
|
||||
drafts: null,
|
||||
all_messages: null,
|
||||
left_sidebar_inbox_popover: null,
|
||||
message_actions: null,
|
||||
stream_settings: null,
|
||||
compose_mobile_button: null,
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<span class="global-filter-name">{{t 'Inbox' }}</span>
|
||||
<span class="unread_count"></span>
|
||||
</a>
|
||||
<span class="arrow sidebar-menu-icon inbox-sidebar-menu-icon hidden-for-spectators"><i class="zulip-icon zulip-icon-more-vertical" aria-hidden="true"></i></span>
|
||||
</li>
|
||||
<li class="top_left_recent_view top_left_row">
|
||||
<a href="#recent" class="tippy-left-sidebar-tooltip global-filter-container" data-tooltip-template-id="recent-conversations-tooltip-template">
|
||||
|
@ -28,7 +29,6 @@
|
|||
{{~!-- squash whitespace --~}}
|
||||
<span class="global-filter-name">{{t 'All messages' }}</span>
|
||||
</a>
|
||||
<span class="arrow sidebar-menu-icon all-messages-sidebar-menu-icon hidden-for-spectators"><i class="zulip-icon zulip-icon-more-vertical" aria-hidden="true"></i></span>
|
||||
</li>
|
||||
<li class="top_left_mentions top_left_row hidden-for-spectators">
|
||||
<a class="global-filter-container" href="#narrow/is/mentioned">
|
||||
|
|
|
@ -78,7 +78,7 @@ run_test("update_count_in_dom", () => {
|
|||
|
||||
make_elem($(".top_left_mentions"), "<mentioned-count>");
|
||||
|
||||
make_elem($(".top_left_all_messages"), "<home-count>");
|
||||
make_elem($(".top_left_inbox"), "<home-count>");
|
||||
|
||||
make_elem($(".top_left_starred_messages"), "<starred-count>");
|
||||
|
||||
|
|
Loading…
Reference in New Issue