js: Use ES6 object literal shorthand syntax.

Generated by ESLint.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-07-20 13:18:43 -07:00
parent b2745f6e41
commit 96dcc0ce6e
189 changed files with 1328 additions and 1326 deletions

View File

@@ -3,7 +3,7 @@ const render_draft_table_body = require("../templates/draft_table_body.hbs");
function set_count(count) {
const draft_count = count.toString();
const text = i18n.t("Drafts (__draft_count__)", {draft_count: draft_count});
const text = i18n.t("Drafts (__draft_count__)", {draft_count});
$(".compose_drafts_button").text(text);
}
@@ -233,12 +233,12 @@ exports.format_draft = function (draft) {
formatted = {
draft_id: draft.id,
is_stream: true,
stream: stream,
stream,
stream_color: draft_stream_color,
dark_background: stream_color.get_color_class(draft_stream_color),
topic: draft_topic,
raw_content: draft.content,
time_stamp: time_stamp,
time_stamp,
};
} else {
const emails = util.extract_pm_recipients(draft.private_message_recipient);
@@ -256,9 +256,9 @@ exports.format_draft = function (draft) {
formatted = {
draft_id: draft.id,
is_stream: false,
recipients: recipients,
recipients,
raw_content: draft.content,
time_stamp: time_stamp,
time_stamp,
};
}
@@ -333,7 +333,7 @@ exports.launch = function () {
function render_widgets(drafts) {
$("#drafts_table").empty();
const rendered = render_draft_table_body({
drafts: drafts,
drafts,
draft_lifetime: DRAFT_LIFETIME,
});
$("#drafts_table").append(rendered);
@@ -508,7 +508,7 @@ exports.open_overlay = function () {
overlays.open_overlay({
name: "drafts",
overlay: $("#draft_overlay"),
on_close: function () {
on_close() {
hashchange.exit_overlay();
},
});