mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
compose: Add video link button, powered by Jitsi.
This commit is contained in:
@@ -230,6 +230,8 @@ class="fa fa-bars"></i>) icon`
|
|||||||
`star (<i class="fa fa-star-o"></i>) icon`
|
`star (<i class="fa fa-star-o"></i>) icon`
|
||||||
* trash (<i class="fa fa-trash-o"></i>) icon —
|
* trash (<i class="fa fa-trash-o"></i>) icon —
|
||||||
`trash (<i class="fa fa-trash-o"></i>) icon`
|
`trash (<i class="fa fa-trash-o"></i>) icon`
|
||||||
|
* video-camera (<i class="fa fa-video-camera"></i>) icon —
|
||||||
|
`video-camera (<i class="fa fa-video-camera"></i>) icon`
|
||||||
* x (<i class="fa fa-times"></i>) icon —
|
* x (<i class="fa fa-times"></i>) icon —
|
||||||
`x (<i class="fa fa-times"></i>) icon`
|
`x (<i class="fa fa-times"></i>) icon`
|
||||||
|
|
||||||
|
|||||||
@@ -1084,6 +1084,17 @@ function test_with_mock_socket(test_params) {
|
|||||||
assert(compose_file_input_clicked);
|
assert(compose_file_input_clicked);
|
||||||
}());
|
}());
|
||||||
|
|
||||||
|
(function test_video_link_compose_clicked() {
|
||||||
|
var handler = $("#compose").get_on_handler("click", "#video_link");
|
||||||
|
assert.equal($('#new_message_content').val(), '');
|
||||||
|
|
||||||
|
handler(event);
|
||||||
|
|
||||||
|
// video link ids consist of 15 random digits
|
||||||
|
var video_link_regex = /\[Click to join video call\]\(https:\/\/meet.jit.si\/\d{15}\)/;
|
||||||
|
assert(video_link_regex.test($('#new_message_content').val()));
|
||||||
|
}());
|
||||||
|
|
||||||
(function test_markdown_preview_compose_clicked() {
|
(function test_markdown_preview_compose_clicked() {
|
||||||
// Tests setup
|
// Tests setup
|
||||||
function setup_visibilities() {
|
function setup_visibilities() {
|
||||||
|
|||||||
@@ -650,6 +650,15 @@ exports.initialize = function () {
|
|||||||
$("#preview_content").html(preview_html);
|
$("#preview_content").html(preview_html);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$('#compose').on('click', '#video_link', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
var video_call_id = util.random_int(100000000000000, 999999999999999);
|
||||||
|
var video_call_link = 'https://meet.jit.si/' + video_call_id;
|
||||||
|
var video_call_link_text = '[' + _('Click to join video call') + '](' + video_call_link + ')';
|
||||||
|
compose_state.insert_syntax_and_focus(video_call_link_text);
|
||||||
|
});
|
||||||
|
|
||||||
$("#compose").on("click", "#markdown_preview", function (e) {
|
$("#compose").on("click", "#markdown_preview", function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var content = $("#new_message_content").val();
|
var content = $("#new_message_content").val();
|
||||||
|
|||||||
@@ -94,6 +94,8 @@
|
|||||||
id="attach_dropbox_files" href="#" title="{{ _('Attach files from Dropbox') }}"></a>
|
id="attach_dropbox_files" href="#" title="{{ _('Attach files from Dropbox') }}"></a>
|
||||||
<a class="message-control-button icon-vector-paper-clip notdisplayed"
|
<a class="message-control-button icon-vector-paper-clip notdisplayed"
|
||||||
id="attach_files" href="#" title="{{ _('Attach files') }}"></a>
|
id="attach_files" href="#" title="{{ _('Attach files') }}"></a>
|
||||||
|
<a class="message-control-button fa fa-video-camera"
|
||||||
|
id="video_link" href="#" title="{{ _('Add video call') }}"></a>
|
||||||
<a id="undo_markdown_preview"
|
<a id="undo_markdown_preview"
|
||||||
class="message-control-button icon-vector-edit"
|
class="message-control-button icon-vector-edit"
|
||||||
style="display:none;" title="{{ _('Write') }}"></a>
|
style="display:none;" title="{{ _('Write') }}"></a>
|
||||||
|
|||||||
Reference in New Issue
Block a user