瀏覽代碼

conference: add room name to browser title

Re-do of
86ebfe8dad
j8
Saúl Ibarra Corretgé 5 年之前
父節點
當前提交
bb2b1b58ec
共有 1 個檔案被更改,包括 10 行新增2 行删除
  1. 10
    2
      react/features/conference/components/web/Conference.js

+ 10
- 2
react/features/conference/components/web/Conference.js 查看文件

@@ -8,6 +8,7 @@ import VideoLayout from '../../../../../modules/UI/videolayout/VideoLayout';
8 8
 import { connect, disconnect } from '../../../base/connection';
9 9
 import { translate } from '../../../base/i18n';
10 10
 import { connect as reactReduxConnect } from '../../../base/redux';
11
+import { getBackendSafeRoomName } from '../../../base/util';
11 12
 import { Chat } from '../../../chat';
12 13
 import { Filmstrip } from '../../../filmstrip';
13 14
 import { CalleeInfoContainer } from '../../../invite';
@@ -78,6 +79,11 @@ type Props = AbstractProps & {
78 79
      */
79 80
     _layoutClassName: string,
80 81
 
82
+    /**
83
+     * Name for this conference room.
84
+     */
85
+    _roomName: string,
86
+
81 87
     dispatch: Function,
82 88
     t: Function
83 89
 }
@@ -120,7 +126,7 @@ class Conference extends AbstractConference<Props, *> {
120 126
      * @inheritdoc
121 127
      */
122 128
     componentDidMount() {
123
-        document.title = interfaceConfig.APP_NAME;
129
+        document.title = `${this.props._roomName} | ${interfaceConfig.APP_NAME}`;
124 130
         this._start();
125 131
     }
126 132
 
@@ -259,11 +265,13 @@ class Conference extends AbstractConference<Props, *> {
259 265
  */
260 266
 function _mapStateToProps(state) {
261 267
     const currentLayout = getCurrentLayout(state);
268
+    const roomName = getBackendSafeRoomName(state['features/base/conference'].room);
262 269
 
263 270
     return {
264 271
         ...abstractMapStateToProps(state),
265 272
         _iAmRecorder: state['features/base/config'].iAmRecorder,
266
-        _layoutClassName: LAYOUT_CLASSNAMES[currentLayout]
273
+        _layoutClassName: LAYOUT_CLASSNAMES[currentLayout],
274
+        _roomName: roomName
267 275
     };
268 276
 }
269 277
 

Loading…
取消
儲存