浏览代码

Adds a possibility to add raise hand as a button

master
yanas 8 年前
父节点
当前提交
99bf4bc44d
共有 3 个文件被更改,包括 23 次插入16 次删除
  1. 2
    1
      lang/main.json
  2. 21
    10
      modules/UI/toolbars/Toolbar.js
  3. 0
    5
      modules/keyboardshortcut/keyboardshortcut.js

+ 2
- 1
lang/main.json 查看文件

@@ -94,7 +94,8 @@
94 94
         "unableToUnmutePopup": "You cannot un-mute while the shared video is on.",
95 95
         "cameraDisabled": "Camera is not available",
96 96
         "micDisabled": "Microphone is not available",
97
-        "filmstrip": "Show / hide videos"
97
+        "filmstrip": "Show / hide videos",
98
+        "raiseHand": "Raise hand to speak"
98 99
     },
99 100
     "bottomtoolbar": {
100 101
         "chat": "Open / close chat",

+ 21
- 10
modules/UI/toolbars/Toolbar.js 查看文件

@@ -168,8 +168,13 @@ const buttonHandlers = {
168 168
     },
169 169
     "toolbar_film_strip": function () {
170 170
         JitsiMeetJS.analytics.sendEvent(
171
-            'bottomtoolbar.filmstrip.toggled');
171
+            'toolbar.filmstrip.toggled');
172 172
         emitter.emit(UIEvents.TOGGLE_FILM_STRIP);
173
+    },
174
+    "toolbar_button_raisehand": function () {
175
+        JitsiMeetJS.analytics.sendEvent(
176
+            'toolbar.raiseHand.clicked');
177
+        APP.conference.maybeToggleRaisedHand();
173 178
     }
174 179
 };
175 180
 
@@ -288,6 +293,19 @@ const defaultToolbarButtons = {
288 293
             APP.UI.toggleFilmStrip();
289 294
         },
290 295
         shortcutDescription: "keyboardShortcuts.toggleFilmstrip"
296
+    },
297
+    'raisehand': {
298
+        id: "toolbar_button_raisehand",
299
+        className: "button icon-raised-hand",
300
+        shortcut: "R",
301
+        shortcutAttr: "raiseHandPopover",
302
+        shortcutFunc: function() {
303
+            JitsiMeetJS.analytics.sendEvent("shortcut.raisehand.clicked");
304
+            APP.conference.maybeToggleRaisedHand();
305
+        },
306
+        shortcutDescription: "keyboardShortcuts.raiseHand",
307
+        content: "Raise Hand",
308
+        i18n: "[content]toolbar.raiseHand"
291 309
     }
292 310
 };
293 311
 
@@ -679,16 +697,9 @@ const Toolbar = {
679 697
             }
680 698
         );
681 699
     },
700
+
682 701
     /**
683
-     * TODO: Fix mic popups
684
-     * <a class="button icon-microphone" id="toolbar_button_mute" data-container="body" data-toggle="popover" data-placement="bottom" shortcut="mutePopover" data-i18n="[content]toolbar.mute" content="Mute / Unmute">
685
-     *   <ul id="micMutedPopup" class="loginmenu">
686
-     *       <li data-i18n="[html]toolbar.micMutedPopup"></li>
687
-     *   </ul>
688
-     *   <ul id="unableToUnmutePopup" class="loginmenu">
689
-     *       <li data-i18n="[html]toolbar.unableToUnmutePopup"></li>
690
-     *   </ul>
691
-     * </a>
702
+     * Initialise main toolbar buttons.
692 703
      */
693 704
     _initMainToolbarButtons() {
694 705
         interfaceConfig.MAIN_TOOLBAR_BUTTONS.forEach((value, index) => {

+ 0
- 5
modules/keyboardshortcut/keyboardshortcut.js 查看文件

@@ -17,11 +17,6 @@ function initGlobalShortcuts() {
17 17
         APP.UI.toggleKeyboardShortcutsPanel();
18 18
     }, "keyboardShortcuts.toggleShortcuts");
19 19
 
20
-    KeyboardShortcut.registerShortcut("R", null, function() {
21
-        JitsiMeetJS.analytics.sendEvent("shortcut.raisedhand.toggled");
22
-        APP.conference.maybeToggleRaisedHand();
23
-    }, "keyboardShortcuts.raiseHand");
24
-
25 20
     KeyboardShortcut.registerShortcut("T", null, function() {
26 21
         JitsiMeetJS.analytics.sendEvent("shortcut.talk.clicked");
27 22
         APP.conference.muteAudio(true);

正在加载...
取消
保存