mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
templates: Show Overlay of Recent Topics.
* Show an empty overlay of recent topics. * Register click event to open recent topics. * Launch recent topics on "t" keypress. This is based on the draft overlay.
This commit is contained in:
@@ -63,7 +63,7 @@ const state = {
|
||||
|
||||
function is_overlay_hash(hash) {
|
||||
// Hash changes within this list are overlays and should not unnarrow (etc.)
|
||||
const overlay_list = ["streams", "drafts", "settings", "organization", "invite"];
|
||||
const overlay_list = ["streams", "drafts", "settings", "organization", "invite", "recent_topics"];
|
||||
const main_hash = hash_util.get_hash_category(hash);
|
||||
|
||||
return overlay_list.includes(main_hash);
|
||||
@@ -122,6 +122,7 @@ function do_hashchange_normal(from_reload) {
|
||||
case "#streams":
|
||||
case "#organization":
|
||||
case "#settings":
|
||||
case "#recent_topics":
|
||||
blueslip.error('overlay logic skipped for: ' + hash);
|
||||
break;
|
||||
}
|
||||
@@ -225,6 +226,11 @@ function do_hashchange_overlay(old_hash) {
|
||||
invite.launch();
|
||||
return;
|
||||
}
|
||||
|
||||
if (base === 'recent_topics') {
|
||||
recent_topics.launch();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function hashchanged(from_reload, e) {
|
||||
|
||||
Reference in New Issue
Block a user