Browse Source

ref(info): new component for showing meeting info

j8
Leonard Kim 7 years ago
parent
commit
46b75e5178

+ 3
- 0
css/_font.scss View File

@@ -157,3 +157,6 @@
157 157
 .icon-add:before {
158 158
     content: "\e145";
159 159
 }
160
+.icon-info:before {
161
+    content: "\e922";
162
+}

+ 1
- 0
css/main.scss View File

@@ -42,6 +42,7 @@
42 42
 @import 'modals/device-selection/device-selection';
43 43
 @import 'modals/dialog';
44 44
 @import 'modals/feedback/feedback';
45
+@import 'modals/invite/info';
45 46
 @import 'modals/speaker_stats/speaker_stats';
46 47
 @import 'modals/video-quality/video-quality';
47 48
 @import 'videolayout_default';

+ 59
- 0
css/modals/invite/_info.scss View File

@@ -0,0 +1,59 @@
1
+.info-dialog {
2
+    display: flex;
3
+
4
+    .info-dialog-action-link {
5
+        display: inline-block;
6
+
7
+        a {
8
+            cursor: pointer;
9
+        }
10
+    }
11
+
12
+    .info-dialog-action-link:before {
13
+        color: $linkFontColor;
14
+        content: '\2022';
15
+        padding: 0 10px;
16
+    }
17
+
18
+    .info-dialog-action-link:first-child:before {
19
+        content: '';
20
+        padding: 0;
21
+    }
22
+
23
+    .info-dialog-action-links {
24
+        white-space: nowrap;
25
+    }
26
+
27
+    .info-dialog-action-separator {
28
+        display: inline-block;
29
+    }
30
+
31
+    .info-dialog-copy-element {
32
+        opacity: 0;
33
+        pointer-events: none;
34
+        position: fixed;
35
+        -webkit-user-select: text;
36
+        user-select: text;
37
+    }
38
+
39
+    .info-dialog-column {
40
+        margin-right: 10px;
41
+    }
42
+
43
+    .info-dialog-conference-url {
44
+        margin: 10px 0;
45
+        max-width: 250px;
46
+        overflow: hidden;
47
+        text-overflow: ellipsis;
48
+        white-space: nowrap;
49
+    }
50
+
51
+    .info-dialog-icon {
52
+        color: #6453C0;
53
+        font-size: 16px;
54
+    }
55
+
56
+    .info-dialog-title {
57
+        font-weight: bold;
58
+    }
59
+}

BIN
fonts/jitsi.eot View File


+ 1
- 0
fonts/jitsi.svg View File

@@ -48,6 +48,7 @@
48 48
 <glyph unicode="&#xe91f;" glyph-name="menu-up" d="M512 682l256-256-60-60-196 196-196-196-60 60z" />
49 49
 <glyph unicode="&#xe920;" glyph-name="menu-down" d="M708 658l60-60-256-256-256 256 60 60 196-196z" />
50 50
 <glyph unicode="&#xe921;" glyph-name="switch-camera" d="M640 362l150 150-150 150v-108h-256v108l-150-150 150-150v108h256v-108zM854 854c46 0 84-40 84-86v-512c0-46-38-86-84-86h-684c-46 0-84 40-84 86v512c0 46 38 86 84 86h136l78 84h256l78-84h136z" />
51
+<glyph unicode="&#xe922;" glyph-name="info" d="M512 938.667c-235.52 0-426.667-191.147-426.667-426.667s191.147-426.667 426.667-426.667 426.667 191.147 426.667 426.667-191.147 426.667-426.667 426.667zM554.667 298.667h-85.333v256h85.333v-256zM554.667 640h-85.333v85.333h85.333v-85.333z" />
51 52
 <glyph unicode="&#xe923;" glyph-name="visibility" d="M512 640c70 0 128-58 128-128s-58-128-128-128-128 58-128 128 58 128 128 128zM512 298c118 0 214 96 214 214s-96 214-214 214-214-96-214-214 96-214 214-214zM512 832c214 0 396-132 470-320-74-188-256-320-470-320s-396 132-470 320c74 188 256 320 470 320z" />
52 53
 <glyph unicode="&#xe924;" glyph-name="visibility-off" d="M506 640h6c70 0 128-58 128-128v-8zM322 606c-14-28-24-60-24-94 0-118 96-214 214-214 34 0 66 10 94 24l-66 66c-8-2-18-4-28-4-70 0-128 58-128 128 0 10 2 20 4 28zM86 842l54 54 756-756-54-54c-47.968 47.365-96.266 94.401-144 142-58-24-120-36-186-36-214 0-396 132-470 320 34 84 90 156 160 212-39.017 38.983-77.307 78.693-116 118zM512 726c-28 0-54-6-78-16l-92 92c52 20 110 30 170 30 214 0 394-132 468-320-32-80-82-148-146-202l-124 124c10 24 16 50 16 78 0 118-96 214-214 214z" />
53 54
 <glyph unicode="&#xe925;" glyph-name="dialpad" d="M512 982c46 0 86-40 86-86s-40-86-86-86-86 40-86 86 40 86 86 86zM512 726c46 0 86-40 86-86s-40-86-86-86-86 40-86 86 40 86 86 86zM768 726c46 0 86-40 86-86s-40-86-86-86-86 40-86 86 40 86 86 86zM768 470c46 0 86-40 86-86s-40-86-86-86-86 40-86 86 40 86 86 86zM512 470c46 0 86-40 86-86s-40-86-86-86-86 40-86 86 40 86 86 86zM768 810c-46 0-86 40-86 86s40 86 86 86 86-40 86-86-40-86-86-86zM256 470c46 0 86-40 86-86s-40-86-86-86-86 40-86 86 40 86 86 86zM256 726c46 0 86-40 86-86s-40-86-86-86-86 40-86 86 40 86 86 86zM256 982c46 0 86-40 86-86s-40-86-86-86-86 40-86 86 40 86 86 86zM512 214c46 0 86-40 86-86s-40-86-86-86-86 40-86 86 40 86 86 86z" />

BIN
fonts/jitsi.ttf View File


BIN
fonts/jitsi.woff View File


+ 206
- 175
fonts/selection.json View File

@@ -4,112 +4,31 @@
4 4
     {
5 5
       "icon": {
6 6
         "paths": [
7
-          "M512 682c46 0 86 40 86 86s-40 86-86 86-86-40-86-86 40-86 86-86zM512 426c46 0 86 40 86 86s-40 86-86 86-86-40-86-86 40-86 86-86zM512 342c-46 0-86-40-86-86s40-86 86-86 86 40 86 86-40 86-86 86z"
8
-        ],
9
-        "attrs": [],
10
-        "isMulticolor": false,
11
-        "isMulticolor2": false,
12
-        "tags": [
13
-          "more_vert"
14
-        ],
15
-        "defaultCode": 58836,
16
-        "grid": 24
17
-      },
18
-      "attrs": [],
19
-      "properties": {
20
-        "ligatures": "more_vert",
21
-        "id": 502,
22
-        "order": 897,
23
-        "prevSize": 24,
24
-        "code": 58836,
25
-        "name": "thumb-menu"
26
-      },
27
-      "setIdx": 0,
28
-      "setId": 2,
29
-      "iconIdx": 502
30
-    },
31
-    {
32
-      "icon": {
33
-        "paths": [
34
-          "M330.667 554.667c-0.427-14.933 6.4-29.44 17.92-39.253 32 6.827 61.867 20.053 88.747 39.253 0 29.013-23.893 52.907-53.333 52.907s-52.907-23.467-53.333-52.907zM586.667 554.667c26.88-18.773 56.747-32 88.747-38.827 11.52 9.813 18.347 24.32 17.92 38.827 0 29.867-23.893 53.76-53.333 53.76s-53.333-23.893-53.333-53.76v0zM512 384c-118.187-1.707-234.667 27.733-338.347 85.333l-2.987 42.667c0 52.48 12.373 104.107 35.84 151.040 101.12-15.36 203.093-23.040 305.493-23.040s204.373 7.68 305.493 23.040c23.467-46.933 35.84-98.56 35.84-151.040l-2.987-42.667c-103.68-57.6-220.16-87.040-338.347-85.333zM512 85.333c235.641 0 426.667 191.025 426.667 426.667s-191.025 426.667-426.667 426.667c-235.641 0-426.667-191.025-426.667-426.667s191.025-426.667 426.667-426.667z"
7
+          "M512 85.333c-235.52 0-426.667 191.147-426.667 426.667s191.147 426.667 426.667 426.667 426.667-191.147 426.667-426.667-191.147-426.667-426.667-426.667zM554.667 725.333h-85.333v-256h85.333v256zM554.667 384h-85.333v-85.333h85.333v85.333z"
35 8
         ],
36 9
         "attrs": [
37 10
           {}
38 11
         ],
39 12
         "isMulticolor": false,
40 13
         "isMulticolor2": false,
14
+        "grid": 0,
41 15
         "tags": [
42
-          "ninja"
43
-        ],
44
-        "grid": 24
16
+          "ic_info_black_24px"
17
+        ]
45 18
       },
46 19
       "attrs": [
47 20
         {}
48 21
       ],
49 22
       "properties": {
50
-        "order": 850,
23
+        "order": 898,
51 24
         "id": 0,
52
-        "name": "ninja",
53
-        "prevSize": 24,
54
-        "code": 59657
55
-      },
56
-      "setIdx": 1,
57
-      "setId": 1,
58
-      "iconIdx": 40
59
-    },
60
-    {
61
-      "icon": {
62
-        "paths": [
63
-          "M282 460c62 120 162 220 282 282l94-94c12-12 30-16 44-10 48 16 100 24 152 24 24 0 42 18 42 42v150c0 24-18 42-42 42-400 0-726-326-726-726 0-24 18-42 42-42h150c24 0 42 18 42 42 0 54 8 104 24 152 4 14 2 32-10 44z"
64
-        ],
65
-        "attrs": [],
66
-        "isMulticolor": false,
67
-        "isMulticolor2": false,
68
-        "tags": [
69
-          "phone"
70
-        ],
71
-        "defaultCode": 57549,
72
-        "grid": 24
73
-      },
74
-      "attrs": [],
75
-      "properties": {
76
-        "ligatures": "call, local_phone, phone",
77
-        "id": 1,
78
-        "order": 851,
79
-        "prevSize": 24,
80
-        "code": 57549,
81
-        "name": "phone"
82
-      },
83
-      "setIdx": 1,
84
-      "setId": 1,
85
-      "iconIdx": 41
86
-    },
87
-    {
88
-      "icon": {
89
-        "paths": [
90
-          "M810 554h-256v256h-84v-256h-256v-84h256v-256h84v256h256v84z"
91
-        ],
92
-        "attrs": [],
93
-        "isMulticolor": false,
94
-        "isMulticolor2": false,
95
-        "tags": [
96
-          "add"
97
-        ],
98
-        "defaultCode": 57669,
99
-        "grid": 24
100
-      },
101
-      "attrs": [],
102
-      "properties": {
103
-        "ligatures": "add",
104
-        "id": 12,
105
-        "order": 896,
106
-        "prevSize": 24,
107
-        "code": 57669,
108
-        "name": "add"
25
+        "name": "info",
26
+        "prevSize": 32,
27
+        "code": 59682
109 28
       },
110
-      "setIdx": 1,
29
+      "setIdx": 0,
111 30
       "setId": 1,
112
-      "iconIdx": 42
31
+      "iconIdx": 0
113 32
     },
114 33
     {
115 34
       "icon": {
@@ -136,9 +55,9 @@
136 55
         "prevSize": 32,
137 56
         "code": 59651
138 57
       },
139
-      "setIdx": 1,
58
+      "setIdx": 0,
140 59
       "setId": 1,
141
-      "iconIdx": 0
60
+      "iconIdx": 1
142 61
     },
143 62
     {
144 63
       "icon": {
@@ -165,9 +84,9 @@
165 84
         "prevSize": 32,
166 85
         "code": 59677
167 86
       },
168
-      "setIdx": 1,
87
+      "setIdx": 0,
169 88
       "setId": 1,
170
-      "iconIdx": 1
89
+      "iconIdx": 2
171 90
     },
172 91
     {
173 92
       "icon": {
@@ -194,9 +113,9 @@
194 113
         "prevSize": 32,
195 114
         "code": 59676
196 115
       },
197
-      "setIdx": 1,
116
+      "setIdx": 0,
198 117
       "setId": 1,
199
-      "iconIdx": 2
118
+      "iconIdx": 3
200 119
     },
201 120
     {
202 121
       "icon": {
@@ -220,9 +139,9 @@
220 139
         "code": 59649,
221 140
         "name": "avatar"
222 141
       },
223
-      "setIdx": 1,
142
+      "setIdx": 0,
224 143
       "setId": 1,
225
-      "iconIdx": 3
144
+      "iconIdx": 4
226 145
     },
227 146
     {
228 147
       "icon": {
@@ -246,9 +165,9 @@
246 165
         "code": 59653,
247 166
         "name": "hangup"
248 167
       },
249
-      "setIdx": 1,
168
+      "setIdx": 0,
250 169
       "setId": 1,
251
-      "iconIdx": 4
170
+      "iconIdx": 5
252 171
     },
253 172
     {
254 173
       "icon": {
@@ -272,9 +191,9 @@
272 191
         "code": 59654,
273 192
         "name": "chat"
274 193
       },
275
-      "setIdx": 1,
194
+      "setIdx": 0,
276 195
       "setId": 1,
277
-      "iconIdx": 5
196
+      "iconIdx": 6
278 197
     },
279 198
     {
280 199
       "icon": {
@@ -298,9 +217,9 @@
298 217
         "code": 59650,
299 218
         "name": "download"
300 219
       },
301
-      "setIdx": 1,
220
+      "setIdx": 0,
302 221
       "setId": 1,
303
-      "iconIdx": 6
222
+      "iconIdx": 7
304 223
     },
305 224
     {
306 225
       "icon": {
@@ -324,9 +243,9 @@
324 243
         "code": 59655,
325 244
         "name": "edit"
326 245
       },
327
-      "setIdx": 1,
246
+      "setIdx": 0,
328 247
       "setId": 1,
329
-      "iconIdx": 7
248
+      "iconIdx": 8
330 249
     },
331 250
     {
332 251
       "icon": {
@@ -350,9 +269,9 @@
350 269
         "code": 59656,
351 270
         "name": "share-doc"
352 271
       },
353
-      "setIdx": 1,
272
+      "setIdx": 0,
354 273
       "setId": 1,
355
-      "iconIdx": 8
274
+      "iconIdx": 9
356 275
     },
357 276
     {
358 277
       "icon": {
@@ -376,9 +295,9 @@
376 295
         "code": 59652,
377 296
         "name": "kick"
378 297
       },
379
-      "setIdx": 1,
298
+      "setIdx": 0,
380 299
       "setId": 1,
381
-      "iconIdx": 9
300
+      "iconIdx": 10
382 301
     },
383 302
     {
384 303
       "icon": {
@@ -396,15 +315,15 @@
396 315
       "attrs": [],
397 316
       "properties": {
398 317
         "id": 10,
399
-        "order": 866,
318
+        "order": 900,
400 319
         "ligatures": "expand_less",
401 320
         "prevSize": 32,
402 321
         "code": 59679,
403 322
         "name": "menu-up"
404 323
       },
405
-      "setIdx": 1,
324
+      "setIdx": 0,
406 325
       "setId": 1,
407
-      "iconIdx": 10
326
+      "iconIdx": 11
408 327
     },
409 328
     {
410 329
       "icon": {
@@ -428,9 +347,9 @@
428 347
         "code": 59680,
429 348
         "name": "menu-down"
430 349
       },
431
-      "setIdx": 1,
350
+      "setIdx": 0,
432 351
       "setId": 1,
433
-      "iconIdx": 11
352
+      "iconIdx": 12
434 353
     },
435 354
     {
436 355
       "icon": {
@@ -454,9 +373,9 @@
454 373
         "code": 59659,
455 374
         "name": "full-screen"
456 375
       },
457
-      "setIdx": 1,
376
+      "setIdx": 0,
458 377
       "setId": 1,
459
-      "iconIdx": 12
378
+      "iconIdx": 13
460 379
     },
461 380
     {
462 381
       "icon": {
@@ -480,9 +399,9 @@
480 399
         "code": 59660,
481 400
         "name": "exit-full-screen"
482 401
       },
483
-      "setIdx": 1,
402
+      "setIdx": 0,
484 403
       "setId": 1,
485
-      "iconIdx": 13
404
+      "iconIdx": 14
486 405
     },
487 406
     {
488 407
       "icon": {
@@ -506,9 +425,9 @@
506 425
         "code": 59658,
507 426
         "name": "star-full"
508 427
       },
509
-      "setIdx": 1,
428
+      "setIdx": 0,
510 429
       "setId": 1,
511
-      "iconIdx": 14
430
+      "iconIdx": 15
512 431
     },
513 432
     {
514 433
       "icon": {
@@ -532,9 +451,9 @@
532 451
         "code": 59661,
533 452
         "name": "security"
534 453
       },
535
-      "setIdx": 1,
454
+      "setIdx": 0,
536 455
       "setId": 1,
537
-      "iconIdx": 15
456
+      "iconIdx": 16
538 457
     },
539 458
     {
540 459
       "icon": {
@@ -558,9 +477,9 @@
558 477
         "code": 59662,
559 478
         "name": "security-locked"
560 479
       },
561
-      "setIdx": 1,
480
+      "setIdx": 0,
562 481
       "setId": 1,
563
-      "iconIdx": 16
482
+      "iconIdx": 17
564 483
     },
565 484
     {
566 485
       "icon": {
@@ -584,9 +503,9 @@
584 503
         "code": 59663,
585 504
         "name": "reload"
586 505
       },
587
-      "setIdx": 1,
506
+      "setIdx": 0,
588 507
       "setId": 1,
589
-      "iconIdx": 17
508
+      "iconIdx": 18
590 509
     },
591 510
     {
592 511
       "icon": {
@@ -610,9 +529,9 @@
610 529
         "code": 59664,
611 530
         "name": "microphone"
612 531
       },
613
-      "setIdx": 1,
532
+      "setIdx": 0,
614 533
       "setId": 1,
615
-      "iconIdx": 18
534
+      "iconIdx": 19
616 535
     },
617 536
     {
618 537
       "icon": {
@@ -636,9 +555,9 @@
636 555
         "code": 59665,
637 556
         "name": "mic-empty"
638 557
       },
639
-      "setIdx": 1,
558
+      "setIdx": 0,
640 559
       "setId": 1,
641
-      "iconIdx": 19
560
+      "iconIdx": 20
642 561
     },
643 562
     {
644 563
       "icon": {
@@ -662,9 +581,9 @@
662 581
         "code": 59666,
663 582
         "name": "mic-disabled"
664 583
       },
665
-      "setIdx": 1,
584
+      "setIdx": 0,
666 585
       "setId": 1,
667
-      "iconIdx": 20
586
+      "iconIdx": 21
668 587
     },
669 588
     {
670 589
       "icon": {
@@ -682,15 +601,15 @@
682 601
       "attrs": [],
683 602
       "properties": {
684 603
         "id": 21,
685
-        "order": 877,
604
+        "order": 899,
686 605
         "ligatures": "pan_tool",
687 606
         "prevSize": 32,
688 607
         "code": 59678,
689 608
         "name": "raised-hand"
690 609
       },
691
-      "setIdx": 1,
610
+      "setIdx": 0,
692 611
       "setId": 1,
693
-      "iconIdx": 21
612
+      "iconIdx": 22
694 613
     },
695 614
     {
696 615
       "icon": {
@@ -714,9 +633,9 @@
714 633
         "code": 59675,
715 634
         "name": "contactList"
716 635
       },
717
-      "setIdx": 1,
636
+      "setIdx": 0,
718 637
       "setId": 1,
719
-      "iconIdx": 22
638
+      "iconIdx": 23
720 639
     },
721 640
     {
722 641
       "icon": {
@@ -740,9 +659,9 @@
740 659
         "code": 59667,
741 660
         "name": "link"
742 661
       },
743
-      "setIdx": 1,
662
+      "setIdx": 0,
744 663
       "setId": 1,
745
-      "iconIdx": 23
664
+      "iconIdx": 24
746 665
     },
747 666
     {
748 667
       "icon": {
@@ -766,9 +685,9 @@
766 685
         "code": 59668,
767 686
         "name": "shared-video"
768 687
       },
769
-      "setIdx": 1,
688
+      "setIdx": 0,
770 689
       "setId": 1,
771
-      "iconIdx": 24
690
+      "iconIdx": 25
772 691
     },
773 692
     {
774 693
       "icon": {
@@ -792,9 +711,9 @@
792 711
         "code": 59669,
793 712
         "name": "settings"
794 713
       },
795
-      "setIdx": 1,
714
+      "setIdx": 0,
796 715
       "setId": 1,
797
-      "iconIdx": 25
716
+      "iconIdx": 26
798 717
     },
799 718
     {
800 719
       "icon": {
@@ -818,9 +737,9 @@
818 737
         "code": 59670,
819 738
         "name": "star"
820 739
       },
821
-      "setIdx": 1,
740
+      "setIdx": 0,
822 741
       "setId": 1,
823
-      "iconIdx": 26
742
+      "iconIdx": 27
824 743
     },
825 744
     {
826 745
       "icon": {
@@ -844,9 +763,9 @@
844 763
         "code": 59681,
845 764
         "name": "switch-camera"
846 765
       },
847
-      "setIdx": 1,
766
+      "setIdx": 0,
848 767
       "setId": 1,
849
-      "iconIdx": 27
768
+      "iconIdx": 28
850 769
     },
851 770
     {
852 771
       "icon": {
@@ -870,9 +789,9 @@
870 789
         "code": 59671,
871 790
         "name": "share-desktop"
872 791
       },
873
-      "setIdx": 1,
792
+      "setIdx": 0,
874 793
       "setId": 1,
875
-      "iconIdx": 28
794
+      "iconIdx": 29
876 795
     },
877 796
     {
878 797
       "icon": {
@@ -896,9 +815,9 @@
896 815
         "code": 59672,
897 816
         "name": "camera"
898 817
       },
899
-      "setIdx": 1,
818
+      "setIdx": 0,
900 819
       "setId": 1,
901
-      "iconIdx": 29
820
+      "iconIdx": 30
902 821
     },
903 822
     {
904 823
       "icon": {
@@ -922,9 +841,9 @@
922 841
         "code": 59673,
923 842
         "name": "camera-disabled"
924 843
       },
925
-      "setIdx": 1,
844
+      "setIdx": 0,
926 845
       "setId": 1,
927
-      "iconIdx": 30
846
+      "iconIdx": 31
928 847
     },
929 848
     {
930 849
       "icon": {
@@ -948,9 +867,9 @@
948 867
         "code": 59674,
949 868
         "name": "volume"
950 869
       },
951
-      "setIdx": 1,
870
+      "setIdx": 0,
952 871
       "setId": 1,
953
-      "iconIdx": 31
872
+      "iconIdx": 32
954 873
     },
955 874
     {
956 875
       "icon": {
@@ -996,9 +915,9 @@
996 915
         "prevSize": 32,
997 916
         "code": 59648
998 917
       },
999
-      "setIdx": 1,
918
+      "setIdx": 0,
1000 919
       "setId": 1,
1001
-      "iconIdx": 32
920
+      "iconIdx": 33
1002 921
     },
1003 922
     {
1004 923
       "icon": {
@@ -1069,9 +988,9 @@
1069 988
         "name": "connection",
1070 989
         "ligatures": ""
1071 990
       },
1072
-      "setIdx": 1,
991
+      "setIdx": 0,
1073 992
       "setId": 1,
1074
-      "iconIdx": 33
993
+      "iconIdx": 34
1075 994
     },
1076 995
     {
1077 996
       "icon": {
@@ -1098,9 +1017,9 @@
1098 1017
         "name": "recDisable",
1099 1018
         "ligatures": ""
1100 1019
       },
1101
-      "setIdx": 1,
1020
+      "setIdx": 0,
1102 1021
       "setId": 1,
1103
-      "iconIdx": 34
1022
+      "iconIdx": 35
1104 1023
     },
1105 1024
     {
1106 1025
       "icon": {
@@ -1128,9 +1047,9 @@
1128 1047
         "name": "recEnable",
1129 1048
         "ligatures": ""
1130 1049
       },
1131
-      "setIdx": 1,
1050
+      "setIdx": 0,
1132 1051
       "setId": 1,
1133
-      "iconIdx": 35
1052
+      "iconIdx": 36
1134 1053
     },
1135 1054
     {
1136 1055
       "icon": {
@@ -1158,9 +1077,9 @@
1158 1077
         "name": "presentation",
1159 1078
         "ligatures": ""
1160 1079
       },
1161
-      "setIdx": 1,
1080
+      "setIdx": 0,
1162 1081
       "setId": 1,
1163
-      "iconIdx": 36
1082
+      "iconIdx": 37
1164 1083
     },
1165 1084
     {
1166 1085
       "icon": {
@@ -1184,9 +1103,9 @@
1184 1103
         "code": 59685,
1185 1104
         "name": "dialpad"
1186 1105
       },
1187
-      "setIdx": 1,
1106
+      "setIdx": 0,
1188 1107
       "setId": 1,
1189
-      "iconIdx": 37
1108
+      "iconIdx": 38
1190 1109
     },
1191 1110
     {
1192 1111
       "icon": {
@@ -1210,9 +1129,9 @@
1210 1129
         "code": 59683,
1211 1130
         "name": "visibility"
1212 1131
       },
1213
-      "setIdx": 1,
1132
+      "setIdx": 0,
1214 1133
       "setId": 1,
1215
-      "iconIdx": 38
1134
+      "iconIdx": 39
1216 1135
     },
1217 1136
     {
1218 1137
       "icon": {
@@ -1236,9 +1155,119 @@
1236 1155
         "code": 59684,
1237 1156
         "name": "visibility-off"
1238 1157
       },
1239
-      "setIdx": 1,
1158
+      "setIdx": 0,
1240 1159
       "setId": 1,
1241
-      "iconIdx": 39
1160
+      "iconIdx": 40
1161
+    },
1162
+    {
1163
+      "icon": {
1164
+        "paths": [
1165
+          "M512 682c46 0 86 40 86 86s-40 86-86 86-86-40-86-86 40-86 86-86zM512 426c46 0 86 40 86 86s-40 86-86 86-86-40-86-86 40-86 86-86zM512 342c-46 0-86-40-86-86s40-86 86-86 86 40 86 86-40 86-86 86z"
1166
+        ],
1167
+        "attrs": [],
1168
+        "isMulticolor": false,
1169
+        "isMulticolor2": false,
1170
+        "tags": [
1171
+          "more_vert"
1172
+        ],
1173
+        "defaultCode": 58836,
1174
+        "grid": 24
1175
+      },
1176
+      "attrs": [],
1177
+      "properties": {
1178
+        "ligatures": "more_vert",
1179
+        "id": 0,
1180
+        "order": 897,
1181
+        "prevSize": 24,
1182
+        "code": 58836,
1183
+        "name": "thumb-menu"
1184
+      },
1185
+      "setIdx": 0,
1186
+      "setId": 1,
1187
+      "iconIdx": 41
1188
+    },
1189
+    {
1190
+      "icon": {
1191
+        "paths": [
1192
+          "M330.667 554.667c-0.427-14.933 6.4-29.44 17.92-39.253 32 6.827 61.867 20.053 88.747 39.253 0 29.013-23.893 52.907-53.333 52.907s-52.907-23.467-53.333-52.907zM586.667 554.667c26.88-18.773 56.747-32 88.747-38.827 11.52 9.813 18.347 24.32 17.92 38.827 0 29.867-23.893 53.76-53.333 53.76s-53.333-23.893-53.333-53.76v0zM512 384c-118.187-1.707-234.667 27.733-338.347 85.333l-2.987 42.667c0 52.48 12.373 104.107 35.84 151.040 101.12-15.36 203.093-23.040 305.493-23.040s204.373 7.68 305.493 23.040c23.467-46.933 35.84-98.56 35.84-151.040l-2.987-42.667c-103.68-57.6-220.16-87.040-338.347-85.333zM512 85.333c235.641 0 426.667 191.025 426.667 426.667s-191.025 426.667-426.667 426.667c-235.641 0-426.667-191.025-426.667-426.667s191.025-426.667 426.667-426.667z"
1193
+        ],
1194
+        "attrs": [
1195
+          {}
1196
+        ],
1197
+        "isMulticolor": false,
1198
+        "isMulticolor2": false,
1199
+        "tags": [
1200
+          "ninja"
1201
+        ],
1202
+        "grid": 24
1203
+      },
1204
+      "attrs": [
1205
+        {}
1206
+      ],
1207
+      "properties": {
1208
+        "order": 850,
1209
+        "id": 1,
1210
+        "name": "ninja",
1211
+        "prevSize": 24,
1212
+        "code": 59657
1213
+      },
1214
+      "setIdx": 0,
1215
+      "setId": 1,
1216
+      "iconIdx": 42
1217
+    },
1218
+    {
1219
+      "icon": {
1220
+        "paths": [
1221
+          "M282 460c62 120 162 220 282 282l94-94c12-12 30-16 44-10 48 16 100 24 152 24 24 0 42 18 42 42v150c0 24-18 42-42 42-400 0-726-326-726-726 0-24 18-42 42-42h150c24 0 42 18 42 42 0 54 8 104 24 152 4 14 2 32-10 44z"
1222
+        ],
1223
+        "attrs": [],
1224
+        "isMulticolor": false,
1225
+        "isMulticolor2": false,
1226
+        "tags": [
1227
+          "phone"
1228
+        ],
1229
+        "defaultCode": 57549,
1230
+        "grid": 24
1231
+      },
1232
+      "attrs": [],
1233
+      "properties": {
1234
+        "ligatures": "call, local_phone, phone",
1235
+        "id": 2,
1236
+        "order": 851,
1237
+        "prevSize": 24,
1238
+        "code": 57549,
1239
+        "name": "phone"
1240
+      },
1241
+      "setIdx": 0,
1242
+      "setId": 1,
1243
+      "iconIdx": 43
1244
+    },
1245
+    {
1246
+      "icon": {
1247
+        "paths": [
1248
+          "M810 554h-256v256h-84v-256h-256v-84h256v-256h84v256h256v84z"
1249
+        ],
1250
+        "attrs": [],
1251
+        "isMulticolor": false,
1252
+        "isMulticolor2": false,
1253
+        "tags": [
1254
+          "add"
1255
+        ],
1256
+        "defaultCode": 57669,
1257
+        "grid": 24
1258
+      },
1259
+      "attrs": [],
1260
+      "properties": {
1261
+        "ligatures": "add",
1262
+        "id": 3,
1263
+        "order": 896,
1264
+        "prevSize": 24,
1265
+        "code": 57669,
1266
+        "name": "add"
1267
+      },
1268
+      "setIdx": 0,
1269
+      "setId": 1,
1270
+      "iconIdx": 44
1242 1271
     }
1243 1272
   ],
1244 1273
   "height": 1024,
@@ -1266,11 +1295,13 @@
1266 1295
     "imagePref": {
1267 1296
       "prefix": "icon-",
1268 1297
       "png": true,
1269
-      "useClassSelector": true
1298
+      "useClassSelector": true,
1299
+      "classSelector": ".icon"
1270 1300
     },
1271 1301
     "historySize": 100,
1272 1302
     "showCodes": false,
1273 1303
     "search": "",
1274
-    "showLiga": false
1304
+    "showLiga": false,
1305
+    "gridSize": 16
1275 1306
   }
1276 1307
 }

+ 1
- 1
interface_config.js View File

@@ -35,7 +35,7 @@ var interfaceConfig = { // eslint-disable-line no-unused-vars
35 35
         //main toolbar
36 36
         'microphone', 'camera', 'desktop', 'invite', 'fullscreen', 'fodeviceselection', 'hangup', // jshint ignore:line
37 37
         //extended toolbar
38
-        'profile', 'addtocall', 'contacts', 'chat', 'recording', 'etherpad', 'sharedvideo', 'dialout', 'settings', 'raisehand', 'videoquality', 'filmstrip'], // jshint ignore:line
38
+        'profile', 'addtocall', 'contacts', 'info', 'chat', 'recording', 'etherpad', 'sharedvideo', 'dialout', 'settings', 'raisehand', 'videoquality', 'filmstrip'], // jshint ignore:line
39 39
     /**
40 40
      * Main Toolbar Buttons
41 41
      * All of them should be in TOOLBAR_BUTTONS

+ 6
- 0
lang/main.json View File

@@ -490,5 +490,11 @@
490 490
         "rateExperience": "Please rate your meeting experience.",
491 491
         "veryBad": "Very Bad",
492 492
         "veryGood": "Very Good"
493
+    },
494
+    "info": {
495
+        "copy": "Copy link",
496
+        "invite": "Invite in __app__",
497
+        "title": "Call access info",
498
+        "tooltip": "Get access info about the meeting"
493 499
     }
494 500
 }

+ 0
- 0
react/features/invite/components/InfoDialog.native.js View File


+ 191
- 0
react/features/invite/components/InfoDialog.web.js View File

@@ -0,0 +1,191 @@
1
+import React, { Component } from 'react';
2
+import { connect } from 'react-redux';
3
+import PropTypes from 'prop-types';
4
+
5
+import { getInviteURL } from '../../base/connection';
6
+import { translate } from '../../base/i18n';
7
+
8
+import { openAddPeopleDialog } from '../actions';
9
+
10
+const logger = require('jitsi-meet-logger').getLogger(__filename);
11
+
12
+declare var interfaceConfig: Object;
13
+
14
+/**
15
+ * A React Component with the contents for a dialog that shows information about
16
+ * the current conference and provides ways to invite other participants.
17
+ *
18
+ * @extends Component
19
+ */
20
+class InfoDialog extends Component {
21
+    /**
22
+     * {@code InfoDialog} component's property types.
23
+     *
24
+     * @static
25
+     */
26
+    static propTypes = {
27
+        /**
28
+         * The current url of the conference to be copied onto the clipboard.
29
+         */
30
+        _inviteURL: PropTypes.string,
31
+
32
+        /**
33
+         * Whether or not the link to open the {@code AddPeopleDialog} should be
34
+         * displayed.
35
+         */
36
+        _showAddPeople: PropTypes.bool,
37
+
38
+        /**
39
+         * Invoked to open a dialog for adding participants to the conference.
40
+         */
41
+        dispatch: PropTypes.func,
42
+
43
+        /**
44
+         * Callback invoked when the dialog should be closed.
45
+         */
46
+        onClose: PropTypes.func,
47
+
48
+        /**
49
+         * Invoked to obtain translated strings.
50
+         */
51
+        t: PropTypes.func
52
+    };
53
+
54
+    /**
55
+     * Initializes new {@code InfoDialog} instance.
56
+     *
57
+     * @param {Object} props - The read-only properties with which the new
58
+     * instance is to be initialized.
59
+     */
60
+    constructor(props) {
61
+        super(props);
62
+
63
+        /**
64
+         * The internal reference to the DOM/HTML element backing the React
65
+         * {@code Component} input. It is necessary for the implementation
66
+         * of copying to the clipboard.
67
+         *
68
+         * @private
69
+         * @type {HTMLInputElement}
70
+         */
71
+        this._copyElement = null;
72
+
73
+        // Bind event handlers so they are only bound once for every instance.
74
+        this._onCopyInviteURL = this._onCopyInviteURL.bind(this);
75
+        this._onOpenInviteDialog = this._onOpenInviteDialog.bind(this);
76
+        this._setCopyElement = this._setCopyElement.bind(this);
77
+    }
78
+
79
+    /**
80
+     * Implements React's {@link Component#render()}.
81
+     *
82
+     * @inheritdoc
83
+     * @returns {ReactElement}
84
+     */
85
+    render() {
86
+        return (
87
+            <div className = 'info-dialog'>
88
+                <div className = 'info-dialog-column'>
89
+                    <h4 className = 'info-dialog-icon'>
90
+                        <i className = 'icon-info' />
91
+                    </h4>
92
+                </div>
93
+                <div className = 'info-dialog-column'>
94
+                    <div className = 'info-dialog-title'>
95
+                        { this.props.t('info.title') }
96
+                    </div>
97
+                    <div
98
+                        className = 'info-dialog-conference-url'
99
+                        ref = { this._inviteUrlElement }>
100
+                        { this.props._inviteURL }
101
+                        <input
102
+                            className = 'info-dialog-copy-element'
103
+                            readOnly = { true }
104
+                            ref = { this._setCopyElement }
105
+                            tabIndex = '-1'
106
+                            value = { this.props._inviteURL } />
107
+                    </div>
108
+                    <div className = 'info-dialog-action-links'>
109
+                        <div className = 'info-dialog-action-link'>
110
+                            <a onClick = { this._onCopyInviteURL }>
111
+                                { this.props.t('info.copy') }
112
+                            </a>
113
+                        </div>
114
+                        { this.props._showAddPeople
115
+                            ? <div className = 'info-dialog-action-link'>
116
+                                <a onClick = { this._onOpenInviteDialog }>
117
+                                    { this.props.t('info.invite', {
118
+                                        app: interfaceConfig.ADD_PEOPLE_APP_NAME
119
+                                    }) }
120
+                                </a>
121
+                            </div>
122
+                            : null }
123
+                    </div>
124
+                </div>
125
+            </div>
126
+        );
127
+    }
128
+
129
+    /**
130
+     * Callback invoked to copy the contents of {@code this._copyElement} to the
131
+     * clipboard.
132
+     *
133
+     * @private
134
+     * @returns {void}
135
+     */
136
+    _onCopyInviteURL() {
137
+        try {
138
+            this._copyElement.select();
139
+            document.execCommand('copy');
140
+            this._copyElement.blur();
141
+        } catch (err) {
142
+            logger.error('error when copying the text', err);
143
+        }
144
+    }
145
+
146
+    /**
147
+     * Callback invoked to open the {@code AddPeople} dialog.
148
+     *
149
+     * @private
150
+     * @returns {void}
151
+     */
152
+    _onOpenInviteDialog() {
153
+        this.props.dispatch(openAddPeopleDialog());
154
+
155
+        if (this.props.onClose) {
156
+            this.props.onClose();
157
+        }
158
+    }
159
+
160
+    /**
161
+     * Sets the internal reference to the DOM/HTML element backing the React
162
+     * {@code Component} input.
163
+     *
164
+     * @param {HTMLInputElement} element - The DOM/HTML element for this
165
+     * {@code Component}'s input.
166
+     * @private
167
+     * @returns {void}
168
+     */
169
+    _setCopyElement(element) {
170
+        this._copyElement = element;
171
+    }
172
+}
173
+
174
+/**
175
+ * Maps (parts of) the Redux state to the associated props for the
176
+ * {@code InfoDialog} component.
177
+ *
178
+ * @param {Object} state - The Redux state.
179
+ * @private
180
+ * @returns {{
181
+ *     _inviteURL: string
182
+ * }}
183
+ */
184
+function _mapStateToProps(state) {
185
+    return {
186
+        _inviteURL: getInviteURL(state),
187
+        _showAddPeople: !state['features/jwt'].isGuest
188
+    };
189
+}
190
+
191
+export default translate(connect(_mapStateToProps)(InfoDialog));

+ 0
- 0
react/features/invite/components/InfoDialogButton.native.js View File


+ 44
- 0
react/features/invite/components/InfoDialogButton.web.js View File

@@ -0,0 +1,44 @@
1
+import React, { Component } from 'react';
2
+
3
+import { ToolbarButtonWithDialog } from '../../toolbox';
4
+
5
+import InfoDialog from './InfoDialog';
6
+
7
+/**
8
+ * A configuration object to describe how {@code ToolbarButton} should render
9
+ * the button.
10
+ *
11
+ * @type {object}
12
+ */
13
+const DEFAULT_BUTTON_CONFIGURATION = {
14
+    buttonName: 'info',
15
+    classNames: [ 'button', 'icon-info' ],
16
+    enabled: true,
17
+    id: 'toolbar_button_info',
18
+    tooltipKey: 'info.tooltip'
19
+};
20
+
21
+/**
22
+ * A React Component for displaying a button which opens a dialog with
23
+ * information about the conference and with ways to invite people.
24
+ *
25
+ * @extends Component
26
+ */
27
+class InfoDialogButton extends Component {
28
+    /**
29
+     * Implements React's {@link Component#render()}.
30
+     *
31
+     * @inheritdoc
32
+     * @returns {ReactElement}
33
+     */
34
+    render() {
35
+        return (
36
+            <ToolbarButtonWithDialog
37
+                { ...this.props }
38
+                button = { DEFAULT_BUTTON_CONFIGURATION }
39
+                content = { InfoDialog } />
40
+        );
41
+    }
42
+}
43
+
44
+export default InfoDialogButton;

+ 2
- 1
react/features/invite/components/index.js View File

@@ -1,2 +1,3 @@
1
-export { default as InviteDialog } from './InviteDialog';
2 1
 export { default as AddPeopleDialog } from './AddPeopleDialog';
2
+export { default as InfoDialogButton } from './InfoDialogButton';
3
+export { default as InviteDialog } from './InviteDialog';

+ 0
- 0
react/features/toolbox/components/ToolbarButtonWithDialog.native.js View File


+ 164
- 0
react/features/toolbox/components/ToolbarButtonWithDialog.web.js View File

@@ -0,0 +1,164 @@
1
+import InlineDialog from '@atlaskit/inline-dialog';
2
+import PropTypes from 'prop-types';
3
+import React, { Component } from 'react';
4
+import { connect } from 'react-redux';
5
+
6
+import ToolbarButton from './ToolbarButton';
7
+
8
+/**
9
+ * Maps AtlasKit {@code Tooltip} positions to equivalent {@code InlineDialog}
10
+ * positions. The {@code InlineDialog} will appear from the the same side of
11
+ * the button as the tooltip.
12
+ *
13
+ */
14
+const TOOLTIP_TO_DIALOG_POSITION = {
15
+    bottom: 'bottom center',
16
+    left: 'left middle',
17
+    right: 'right middle',
18
+    top: 'top center'
19
+};
20
+
21
+/**
22
+ * React {@code Component} for displaying a button which will open an inline
23
+ * dialog.
24
+ *
25
+ * @extends Component
26
+ */
27
+class ToolbarButtonWithDialog extends Component {
28
+    /**
29
+     * {@code ToolbarButtonWithDialog}'s property types.
30
+     *
31
+     * @static
32
+     */
33
+    static propTypes = {
34
+        /**
35
+         * Whether or not the button is visible, based on the visibility of the
36
+         * toolbar. Used to automatically hide {@code InlineDialog} if not
37
+         * visible.
38
+         */
39
+        _visible: PropTypes.bool,
40
+
41
+        /**
42
+         * A configuration object to describe how {@code ToolbarButton} should
43
+         * render.
44
+         *
45
+         */
46
+        button: PropTypes.object,
47
+
48
+        /**
49
+         * The React Component to show within {@code InlineDialog}.
50
+         */
51
+        content: PropTypes.object,
52
+
53
+        /**
54
+         * From which side tooltips should display. Will be re-used for
55
+         * displaying the inline dialog for video quality adjustment.
56
+         */
57
+        tooltipPosition: PropTypes.string
58
+    };
59
+
60
+    /**
61
+     * Initializes new {@code ToolbarButtonWithDialog} instance.
62
+     *
63
+     * @param {Object} props - The read-only properties with which the new
64
+     * instance is to be initialized.
65
+     */
66
+    constructor(props) {
67
+        super(props);
68
+
69
+        this.state = {
70
+            /**
71
+             * Whether or not the inline dialog should be displayed.
72
+             */
73
+            showDialog: false
74
+        };
75
+
76
+        // Bind event handlers so they are only bound once for every instance.
77
+        this._onDialogClose = this._onDialogClose.bind(this);
78
+        this._onDialogToggle = this._onDialogToggle.bind(this);
79
+    }
80
+
81
+    /**
82
+     * Automatically close the inline dialog if the button will not be visible.
83
+     *
84
+     * @inheritdoc
85
+     * @returns {void}
86
+     */
87
+    componentWillReceiveProps(nextProps) {
88
+        if (!nextProps._visible) {
89
+            this._onDialogClose();
90
+        }
91
+    }
92
+
93
+    /**
94
+     * Implements React's {@link Component#render()}.
95
+     *
96
+     * @inheritdoc
97
+     * @returns {ReactElement}
98
+     */
99
+    render() {
100
+        const { _visible, content, tooltipPosition } = this.props;
101
+        const buttonConfiguration = {
102
+            ...this.props.button,
103
+            classNames: [
104
+                ...this.props.button.classNames,
105
+                this.state.showDialog ? 'toggled button-active' : ''
106
+            ]
107
+        };
108
+
109
+        const Content = content;
110
+
111
+        return (
112
+            <InlineDialog
113
+                content = { <Content onClose = { this._onDialogClose } /> }
114
+                isOpen = { _visible && this.state.showDialog }
115
+                onClose = { this._onDialogClose }
116
+                position = { TOOLTIP_TO_DIALOG_POSITION[tooltipPosition] }>
117
+                <ToolbarButton
118
+                    button = { buttonConfiguration }
119
+                    onClick = { this._onDialogToggle }
120
+                    tooltipPosition = { tooltipPosition } />
121
+            </InlineDialog>
122
+        );
123
+    }
124
+
125
+    /**
126
+     * Hides the attached inline dialog.
127
+     *
128
+     * @private
129
+     * @returns {void}
130
+     */
131
+    _onDialogClose() {
132
+        this.setState({ showDialog: false });
133
+    }
134
+
135
+    /**
136
+     * Toggles the display of the dialog.
137
+     *
138
+     * @private
139
+     * @returns {void}
140
+     */
141
+    _onDialogToggle() {
142
+        this.setState({
143
+            showDialog: !this.state.showDialog
144
+        });
145
+    }
146
+}
147
+
148
+/**
149
+ * Maps (parts of) the Redux state to the associated
150
+ * {@code ToolbarButtonWithDialog} component's props.
151
+ *
152
+ * @param {Object} state - The Redux state.
153
+ * @private
154
+ * @returns {{
155
+ *     _visible: boolean
156
+ * }}
157
+ */
158
+function _mapStateToProps(state) {
159
+    return {
160
+        _visible: state['features/toolbox'].visible
161
+    };
162
+}
163
+
164
+export default connect(_mapStateToProps)(ToolbarButtonWithDialog);

+ 2
- 0
react/features/toolbox/components/index.js View File

@@ -1,2 +1,4 @@
1 1
 export { default as ToolbarButton } from './ToolbarButton';
2
+export { default as ToolbarButtonWithDialog }
3
+    from './ToolbarButtonWithDialog';
2 4
 export { default as Toolbox } from './Toolbox';

+ 16
- 2
react/features/toolbox/defaultToolbarButtons.web.js View File

@@ -5,10 +5,16 @@ import React from 'react';
5 5
 import { ParticipantCounter } from '../contact-list';
6 6
 import { openDeviceSelectionDialog } from '../device-selection';
7 7
 import { openDialOutDialog } from '../dial-out';
8
-import { openAddPeopleDialog, openInviteDialog } from '../invite';
9
-import UIEvents from '../../../service/UI/UIEvents';
8
+
9
+import {
10
+    InfoDialogButton,
11
+    openAddPeopleDialog,
12
+    openInviteDialog
13
+} from '../invite';
10 14
 import { VideoQualityButton } from '../video-quality';
11 15
 
16
+import UIEvents from '../../../service/UI/UIEvents';
17
+
12 18
 import ProfileButton from './components/ProfileButton';
13 19
 
14 20
 declare var APP: Object;
@@ -255,6 +261,14 @@ const buttons: Object = {
255 261
         tooltipKey: 'toolbar.hangup'
256 262
     },
257 263
 
264
+    /**
265
+     * The descriptor of the toolbar button which opens a dialog for the
266
+     * conference URL and inviting others.
267
+     */
268
+    info: {
269
+        component: InfoDialogButton
270
+    },
271
+
258 272
     /**
259 273
      * The descriptor of the toolbar button which shows the invite user dialog.
260 274
      */

+ 14
- 110
react/features/video-quality/components/VideoQualityButton.web.js View File

@@ -1,11 +1,15 @@
1
-import AKInlineDialog from '@atlaskit/inline-dialog';
2 1
 import React, { Component } from 'react';
3
-import { connect } from 'react-redux';
4 2
 
5 3
 import { VideoQualityDialog } from './';
6 4
 
7
-import { ToolbarButton } from '../../toolbox';
5
+import { ToolbarButtonWithDialog } from '../../toolbox';
8 6
 
7
+/**
8
+ * A configuration object to describe how {@code ToolbarButton} should render
9
+ * the button.
10
+ *
11
+ * @type {object}
12
+ */
9 13
 const DEFAULT_BUTTON_CONFIGURATION = {
10 14
     buttonName: 'videoquality',
11 15
     classNames: [ 'button', 'icon-visibility' ],
@@ -14,16 +18,9 @@ const DEFAULT_BUTTON_CONFIGURATION = {
14 18
     tooltipKey: 'videoStatus.qualityButtonTip'
15 19
 };
16 20
 
17
-const TOOLTIP_TO_DIALOG_POSITION = {
18
-    bottom: 'bottom center',
19
-    left: 'left middle',
20
-    right: 'right middle',
21
-    top: 'top center'
22
-};
23
-
24 21
 /**
25
- * React {@code Component} for displaying an inline dialog for changing receive
26
- * video settings.
22
+ * React {@code Component} for displaying a button which will open an inline
23
+ * dialog for changing received video quality settings.
27 24
  *
28 25
  * @extends Component
29 26
  */
@@ -34,12 +31,6 @@ class VideoQualityButton extends Component {
34 31
      * @static
35 32
      */
36 33
     static propTypes = {
37
-        /**
38
-         * Whether or not the button is visible, based on the visibility of the
39
-         * toolbar. Used to automatically hide the inline dialog if not visible.
40
-         */
41
-        _visible: React.PropTypes.bool,
42
-
43 34
         /**
44 35
          * From which side tooltips should display. Will be re-used for
45 36
          * displaying the inline dialog for video quality adjustment.
@@ -47,40 +38,6 @@ class VideoQualityButton extends Component {
47 38
         tooltipPosition: React.PropTypes.string
48 39
     };
49 40
 
50
-    /**
51
-     * Initializes a new {@code VideoQualityButton} instance.
52
-     *
53
-     * @param {Object} props - The read-only properties with which the new
54
-     * instance is to be initialized.
55
-     */
56
-    constructor(props) {
57
-        super(props);
58
-
59
-        this.state = {
60
-            /**
61
-             * Whether or not the inline dialog for adjusting received video
62
-             * quality is displayed.
63
-             */
64
-            showVideoQualityDialog: false
65
-        };
66
-
67
-        // Bind event handlers so they are only bound once for every instance.
68
-        this._onDialogClose = this._onDialogClose.bind(this);
69
-        this._onDialogToggle = this._onDialogToggle.bind(this);
70
-    }
71
-
72
-    /**
73
-     * Automatically close the inline dialog if the button will not be visible.
74
-     *
75
-     * @inheritdoc
76
-     * @returns {void}
77
-     */
78
-    componentWillReceiveProps(nextProps) {
79
-        if (!nextProps._visible) {
80
-            this._onDialogClose();
81
-        }
82
-    }
83
-
84 41
     /**
85 42
      * Implements React's {@link Component#render()}.
86 43
      *
@@ -88,66 +45,13 @@ class VideoQualityButton extends Component {
88 45
      * @returns {ReactElement}
89 46
      */
90 47
     render() {
91
-        const { _visible, tooltipPosition } = this.props;
92
-        const buttonConfiguration = {
93
-            ...DEFAULT_BUTTON_CONFIGURATION,
94
-            classNames: [
95
-                ...DEFAULT_BUTTON_CONFIGURATION.classNames,
96
-                this.state.showVideoQualityDialog ? 'toggled button-active' : ''
97
-            ]
98
-        };
99
-
100 48
         return (
101
-            <AKInlineDialog
102
-                content = { <VideoQualityDialog /> }
103
-                isOpen = { _visible && this.state.showVideoQualityDialog }
104
-                onClose = { this._onDialogClose }
105
-                position = { TOOLTIP_TO_DIALOG_POSITION[tooltipPosition] }>
106
-                <ToolbarButton
107
-                    button = { buttonConfiguration }
108
-                    onClick = { this._onDialogToggle }
109
-                    tooltipPosition = { tooltipPosition } />
110
-            </AKInlineDialog>
49
+            <ToolbarButtonWithDialog
50
+                button = { DEFAULT_BUTTON_CONFIGURATION }
51
+                content = { VideoQualityDialog }
52
+                tooltipPosition = { this.props.tooltipPosition } />
111 53
         );
112 54
     }
113
-
114
-    /**
115
-     * Hides the attached inline dialog.
116
-     *
117
-     * @private
118
-     * @returns {void}
119
-     */
120
-    _onDialogClose() {
121
-        this.setState({ showVideoQualityDialog: false });
122
-    }
123
-
124
-    /**
125
-     * Toggles the display of the dialog.
126
-     *
127
-     * @private
128
-     * @returns {void}
129
-     */
130
-    _onDialogToggle() {
131
-        this.setState({
132
-            showVideoQualityDialog: !this.state.showVideoQualityDialog
133
-        });
134
-    }
135
-}
136
-
137
-/**
138
- * Maps (parts of) the Redux state to the associated {@code VideoQualityButton}
139
- * component's props.
140
- *
141
- * @param {Object} state - The Redux state.
142
- * @private
143
- * @returns {{
144
- *     _visible: boolean
145
- * }}
146
- */
147
-function _mapStateToProps(state) {
148
-    return {
149
-        _visible: state['features/toolbox'].visible
150
-    };
151 55
 }
152 56
 
153
-export default connect(_mapStateToProps)(VideoQualityButton);
57
+export default VideoQualityButton;

Loading…
Cancel
Save