diff --git a/static/js/message_edit.js b/static/js/message_edit.js index ea2b304493..887a7d98b6 100644 --- a/static/js/message_edit.js +++ b/static/js/message_edit.js @@ -332,8 +332,6 @@ function edit_message(row, raw_content) { file_upload_enabled = true; } - const show_video_chat_button = compose.compute_show_video_chat_button(); - const show_edit_stream = message.is_stream && page_params.is_admin; // current message's stream has been already been added and selected in handlebar const available_streams = show_edit_stream @@ -350,7 +348,6 @@ function edit_message(row, raw_content) { topic: message.topic, content: raw_content, file_upload_enabled, - show_video_chat_button, minutes_to_edit: Math.floor(page_params.realm_message_content_edit_limit_seconds / 60), show_edit_stream, available_streams, @@ -368,6 +365,9 @@ function edit_message(row, raw_content) { form.on("keydown", handle_message_row_edit_keydown); + form.find(".message-edit-feature-group .video_link").toggle( + compose.compute_show_video_chat_button(), + ); upload.feature_check($(`#edit_form_${CSS.escape(rows.id(row))} .compose_upload_file`)); const message_edit_stream = row.find(`#select_stream_id_${CSS.escape(message.id)}`); diff --git a/static/styles/zulip.css b/static/styles/zulip.css index 5f91e4835c..99b4269be5 100644 --- a/static/styles/zulip.css +++ b/static/styles/zulip.css @@ -2512,6 +2512,10 @@ div.topic_edit_spinner .loading_indicator_spinner { .edit-controls { margin-left: 0; margin-top: 0; + + .message-control-link { + margin-right: 5px; + } } textarea { diff --git a/static/templates/compose_control_buttons.hbs b/static/templates/compose_control_buttons.hbs index 53ede8c96c..6f94b4150b 100644 --- a/static/templates/compose_control_buttons.hbs +++ b/static/templates/compose_control_buttons.hbs @@ -1,3 +1,4 @@ +{{! This file assumes message_id is only preset in message_edit_form and message_id cannot be 0.}} {{#if file_upload_enabled }} diff --git a/static/templates/message_edit_form.hbs b/static/templates/message_edit_form.hbs index d3cbaa999e..4af8cb577e 100644 --- a/static/templates/message_edit_form.hbs +++ b/static/templates/message_edit_form.hbs @@ -58,22 +58,7 @@ {{#if is_content_editable}}
- - {{#if file_upload_enabled}} - - {{/if}} - - - {{#if show_video_chat_button}} - - {{/if}} - - {{#if giphy_api_available }} - - - - {{/if}} - {{t 'Help' }} + {{> compose_control_buttons }}
{{/if}} {{else}}