File tree Expand file tree Collapse file tree 4 files changed +58
-0
lines changed Expand file tree Collapse file tree 4 files changed +58
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+ export const JINGLE_CALL_STATUS = {
3
+ PENDING : 0 ,
4
+ ACTIVE : 1 ,
5
+ ENDED : 2
6
+ } ;
Original file line number Diff line number Diff line change
1
+ import BootstrapModal from "plugins/modal/base.js" ;
2
+ import tpl_start_jingle_call from "../templates/jingle-call.js" ;
3
+
4
+ export default BootstrapModal . extend ( {
5
+ id : "start-jingle-call-modal" ,
6
+ persistent : true ,
7
+
8
+ initialize ( ) {
9
+ this . items = [ ] ;
10
+ this . loading_items = false ;
11
+
12
+ BootstrapModal . prototype . initialize . apply ( this , arguments ) ;
13
+ } ,
14
+
15
+ toHTML ( ) {
16
+ return tpl_start_jingle_call ( ) ;
17
+ }
18
+ } ) ;
Original file line number Diff line number Diff line change
1
+ import { html } from 'lit' ;
2
+ import { __ } from 'i18n' ;
3
+
4
+ const modal_close_button = html `< button type ="button " class ="btn btn-secondary " data-dismiss ="modal "> ${ __ ( 'Close' ) } </ button > ` ;
5
+
6
+ export default ( ) => {
7
+ const i18n_modal_title = __ ( 'Jingle Call' ) ;
8
+ return html `
9
+ < div class ="modal-dialog " role ="document ">
10
+ < div class ="modal-content ">
11
+ < div class ="modal-header ">
12
+ < h5 class ="modal-title " id ="muc-list-modal-label "> ${ i18n_modal_title } </ h5 >
13
+ </ div >
14
+ < div class ="modal-body d-flex flex-column ">
15
+ < span class ="modal-alert "> </ span >
16
+ < ul class ="available-chatrooms list-group ">
17
+ </ ul >
18
+ </ div >
19
+ < div class ="container text-center cl-2 ">
20
+ < button type ="button " class ="btn btn-success "> Audio Call</ button >
21
+ < button type ="button " class ="btn btn-primary "> Video Call</ button >
22
+ </ div >
23
+ < div class ="modal-footer "> ${ modal_close_button } </ div >
24
+ </ div >
25
+ </ div >
26
+ ` ;
27
+ }
Original file line number Diff line number Diff line change
1
+ import { _converse } from "@converse/headless/core" ;
2
+ import { JINGLE_CALL_STATUS } from "./constants.js" ;
3
+
4
+ export function startJingleCall ( jid ) {
5
+ const model = _converse . chatboxes . get ( jid ) ;
6
+ model . save ( 'jingle_status' , JINGLE_CALL_STATUS . PENDING ) ;
7
+ }
You can’t perform that action at this time.
0 commit comments