mirror of https://github.com/zulip/zulip.git
Add empty feed notices for private messages
(imported from commit e4067336f6b2e9e82b794599d30dfc3825852652)
This commit is contained in:
parent
de1f4b0be2
commit
9d1548fe08
|
@ -46,12 +46,24 @@
|
|||
<p>Why not <a href="#" class="empty_feed_compose_stream">
|
||||
start the conversation</a>?</p>
|
||||
</div>
|
||||
<div id="empty_narrow_private_message" class="empty_feed_notice">
|
||||
<div id="empty_narrow_all_private_message" class="empty_feed_notice">
|
||||
<h4>You have no private messages yet!</h4>
|
||||
|
||||
<p>Why not <a href="#" class="empty_feed_compose_private">
|
||||
start the conversation</a>?</p>
|
||||
</div>
|
||||
<div id="empty_narrow_private_message" class="empty_feed_notice">
|
||||
<h4>You have no private messages with this person yet!</h4>
|
||||
|
||||
<p>Why not <a href="#" class="empty_feed_compose_private">
|
||||
start the conversation</a>?</p>
|
||||
</div>
|
||||
<div id="empty_narrow_multi_private_message" class="empty_feed_notice">
|
||||
<h4>You have no private messages with these people yet!</h4>
|
||||
|
||||
<p>Why not <a href="#" class="empty_feed_compose_private">
|
||||
start the conversation</a>?</p>
|
||||
</div>
|
||||
<div id="nonsubbed_stream_narrow_message" class="empty_feed_notice">
|
||||
<h4>You aren't subscribed to this stream!</h4>
|
||||
|
||||
|
|
|
@ -485,7 +485,7 @@ function pick_empty_narrow_banner() {
|
|||
return $("#empty_star_narrow_message");
|
||||
} else if (first_operand === "private-message") {
|
||||
// You have no private messages.
|
||||
return $("#empty_narrow_private_message");
|
||||
return $("#empty_narrow_all_private_message");
|
||||
}
|
||||
} else if ((first_operator === "stream") && !subs.have(first_operand)) {
|
||||
// You are narrowed to a stream to which you aren't subscribed.
|
||||
|
@ -493,6 +493,13 @@ function pick_empty_narrow_banner() {
|
|||
} else if (first_operator === "search") {
|
||||
// You are narrowed to empty search results.
|
||||
return $("#empty_search_narrow_message");
|
||||
} else if (first_operator === "pm-with") {
|
||||
if (first_operand.indexOf(',') === -1) {
|
||||
// You have no private messages with this person
|
||||
return $("#empty_narrow_private_message");
|
||||
} else {
|
||||
return $("#empty_narrow_multi_private_message");
|
||||
}
|
||||
}
|
||||
return default_banner;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue