compose: Update the New topic button to New stream message in PMs.

If a user is narrowed by `is:private`, `pm-with`, or `group-pm-with`,
change the `New topic` button to say `New stream message` instead for
added clarity.

Also, add to the Casper and Node tests for this behavior.

Fix #9072.
This commit is contained in:
Marco Burstein
2018-08-08 20:59:55 -07:00
committed by Tim Abbott
parent 0a99fa2fd6
commit 6f14f4f047
4 changed files with 25 additions and 0 deletions

View File

@@ -100,6 +100,16 @@ exports.clear_preview_area = function () {
$("#markdown_preview").show();
};
exports.update_stream_button_for_private = function () {
$("#left_bar_compose_stream_button_big").html(i18n.t("New stream message"));
$("#left_bar_compose_stream_button_big").prop("title", i18n.t("New stream message"));
};
exports.update_stream_button_for_stream = function () {
$("#left_bar_compose_stream_button_big").html(i18n.t("New topic"));
$("#left_bar_compose_stream_button_big").prop("title", i18n.t("New topic"));
};
function update_fade() {
if (!compose_state.composing()) {
return;