Przeglądaj źródła

ref(toolbar): remove contact list

master
Leonard Kim 7 lat temu
rodzic
commit
1eee20dd5a

+ 0
- 59
css/_contact_list.scss Wyświetl plik

@@ -1,59 +0,0 @@
1
-#contacts_container {
2
-    cursor: default;
3
-
4
-    #contacts {
5
-        font-size: 12px;
6
-        bottom: 0px;
7
-        margin: 0;
8
-        margin-top: 12px;
9
-        padding: 0px;
10
-        width: 100%;
11
-    }
12
-
13
-    .clickable {
14
-        cursor: pointer;
15
-    }
16
-}
17
-
18
-#contacts {
19
-    .contact-list-item {
20
-        align-items: center;
21
-        border-radius: 3px;
22
-        color: $baseLight;
23
-        display: flex;
24
-        font-size: 14px;
25
-        height: 36px;
26
-        list-style-type: none;
27
-        padding: 0 10%;
28
-        text-align: left;
29
-        white-space: nowrap;
30
-
31
-        &:hover,
32
-        &:active {
33
-            background: $toolbarSelectBackground;
34
-        }
35
-
36
-        .contact-list-item-name {
37
-            overflow: hidden;
38
-            text-overflow: ellipsis;
39
-        }
40
-
41
-        .avatar {
42
-            cursor: pointer;
43
-            height: 24px;
44
-            margin: 0 8px 0 4px;
45
-            width: 24px;
46
-        }
47
-    }
48
-}
49
-
50
-
51
-.avatar {
52
-    padding: 0px;
53
-    margin-right: 10px;
54
-    vertical-align: middle;
55
-    font-size: 22pt;
56
-    border-radius: 20px;
57
-    max-height: 30px;
58
-    max-width: 30px;
59
-}

+ 1
- 1
css/_side_toolbar_container.scss Wyświetl plik

@@ -75,7 +75,7 @@
75 75
     }
76 76
 
77 77
     /**
78
-     * Inner container, for example contact list, settings or profile.
78
+     * Inner container, for example settings or profile.
79 79
      */
80 80
     .sideToolbarContainer__inner {
81 81
         display: none;

+ 0
- 1
css/main.scss Wyświetl plik

@@ -48,7 +48,6 @@
48 48
 @import 'popup_menu';
49 49
 @import 'recording';
50 50
 @import 'login_menu';
51
-@import 'contact_list';
52 51
 @import 'chat';
53 52
 @import 'ringing/ringing';
54 53
 @import 'welcome_page';

+ 0
- 5
doc/api.md Wyświetl plik

@@ -97,11 +97,6 @@ api.executeCommand('toggleFilmStrip')
97 97
 api.executeCommand('toggleChat')
98 98
 ```
99 99
 
100
-* **toggleContactList** - Hides / shows the contact list. No arguments are required.
101
-```javascript
102
-api.executeCommand('toggleContactList')
103
-```
104
-
105 100
 * **toggleShareScreen** - Starts / stops screen sharing. No arguments are required.
106 101
 ```javascript
107 102
 api.executeCommand('toggleShareScreen')

+ 1
- 7
interface_config.js Wyświetl plik

@@ -44,16 +44,11 @@ var interfaceConfig = {
44 44
         'microphone', 'camera', 'desktop', 'fullscreen', 'fodeviceselection', 'hangup',
45 45
 
46 46
         // extended toolbar
47
-        'profile', 'contacts', 'info', 'chat', 'recording', 'etherpad',
47
+        'profile', 'info', 'chat', 'recording', 'etherpad',
48 48
         'sharedvideo', 'settings', 'raisehand', 'videoquality', 'filmstrip',
49 49
         'invite', 'feedback', 'stats', 'shortcuts'
50 50
     ],
51 51
 
52
-    /**
53
-     * Main Toolbar Buttons
54
-     * All of them should be in TOOLBAR_BUTTONS
55
-     */
56
-    MAIN_TOOLBAR_BUTTONS: [ 'microphone', 'camera', 'desktop', 'fullscreen', 'fodeviceselection', 'hangup' ],
57 52
     SETTINGS_SECTIONS: [ 'language', 'devices', 'moderator' ],
58 53
     INVITE_OPTIONS: [ 'invite', 'dialout', 'addtocall' ],
59 54
 
@@ -62,7 +57,6 @@ var interfaceConfig = {
62 57
     // screen, 'width' would fit the original video width to the width of the
63 58
     // screen respecting ratio.
64 59
     VIDEO_LAYOUT_FIT: 'both',
65
-    SHOW_CONTACTLIST_AVATARS: true,
66 60
 
67 61
     /**
68 62
      * Whether to only show the filmstrip (and hide the toolbar).

+ 0
- 6
lang/main.json Wyświetl plik

@@ -1,5 +1,4 @@
1 1
 {
2
-    "contactlist": "__count__ Member",
3 2
     "contactlist_plural": "__count__ Members",
4 3
     "passwordSetRemotely": "set by another member",
5 4
     "poweredby": "powered by",
@@ -114,11 +113,6 @@
114 113
         "downloadApp": "Download the app",
115 114
         "openApp": "Continue to __app__"
116 115
     },
117
-    "bottomtoolbar": {
118
-        "chat": "Open / close chat",
119
-        "filmstrip": "Show / hide videos",
120
-        "contactlist": "View and invite members"
121
-    },
122 116
     "chat":{
123 117
         "nickname": {
124 118
             "title": "Enter a nickname in the box below",

+ 0
- 4
modules/API/API.js Wyświetl plik

@@ -81,10 +81,6 @@ function initCommands() {
81 81
             sendAnalytics(createApiEvent('chat.toggled'));
82 82
             APP.UI.toggleChat();
83 83
         },
84
-        'toggle-contact-list': () => {
85
-            sendAnalytics(createApiEvent('contact.list.toggled'));
86
-            APP.UI.toggleContactList();
87
-        },
88 84
         'toggle-share-screen': () => {
89 85
             sendAnalytics(createApiEvent('screen.sharing.toggled'));
90 86
             toggleScreenSharing();

+ 0
- 2
modules/API/external/external_api.js Wyświetl plik

@@ -24,7 +24,6 @@ const commands = {
24 24
     submitFeedback: 'submit-feedback',
25 25
     toggleAudio: 'toggle-audio',
26 26
     toggleChat: 'toggle-chat',
27
-    toggleContactList: 'toggle-contact-list',
28 27
     toggleFilmStrip: 'toggle-film-strip',
29 28
     toggleShareScreen: 'toggle-share-screen',
30 29
     toggleVideo: 'toggle-video'
@@ -551,7 +550,6 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
551 550
      * toggleVideo - mutes / unmutes video. no arguments
552 551
      * toggleFilmStrip - hides / shows the filmstrip. no arguments
553 552
      * toggleChat - hides / shows chat. no arguments.
554
-     * toggleContactList - hides / shows contact list. no arguments.
555 553
      * toggleShareScreen - starts / stops screen sharing. no arguments.
556 554
      *
557 555
      * @param {Object} commandList - The object with commands to be executed.

+ 0
- 8
modules/UI/UI.js Wyświetl plik

@@ -111,9 +111,6 @@ const UIListeners = new Map([
111 111
                 UI.toggleSidePanel('settings_container');
112 112
             }
113 113
         }
114
-    ], [
115
-        UIEvents.TOGGLE_CONTACT_LIST,
116
-        () => UI.toggleContactList()
117 114
     ], [
118 115
         UIEvents.TOGGLE_PROFILE,
119 116
         () => UI.toggleSidePanel('profile_container')
@@ -628,11 +625,6 @@ UI.isChatVisible = () => Chat.isVisible();
628 625
  */
629 626
 UI.toggleChat = () => UI.toggleSidePanel('chat_container');
630 627
 
631
-/**
632
- * Toggles contact list panel.
633
- */
634
-UI.toggleContactList = () => UI.toggleSidePanel('contacts_container');
635
-
636 628
 /**
637 629
  * Toggles the given side panel.
638 630
  *

+ 0
- 6
modules/UI/side_pannels/SidePanels.js Wyświetl plik

@@ -1,7 +1,6 @@
1 1
 import Chat from './chat/Chat';
2 2
 import SettingsMenu from './settings/SettingsMenu';
3 3
 import Profile from './profile/Profile';
4
-import ContactListView from './contactlist/ContactListView';
5 4
 import { isButtonEnabled } from '../../../react/features/toolbox';
6 5
 
7 6
 const SidePanels = {
@@ -20,11 +19,6 @@ const SidePanels = {
20 19
         if (isButtonEnabled('profile')) {
21 20
             Profile.init(eventEmitter);
22 21
         }
23
-
24
-        // Initialize contact list view
25
-        if (isButtonEnabled('contacts')) {
26
-            ContactListView.init();
27
-        }
28 22
     }
29 23
 };
30 24
 

+ 0
- 56
modules/UI/side_pannels/contactlist/ContactListView.js Wyświetl plik

@@ -1,56 +0,0 @@
1
-/* global $, APP */
2
-
3
-/* eslint-disable no-unused-vars */
4
-import React from 'react';
5
-import ReactDOM from 'react-dom';
6
-import { I18nextProvider } from 'react-i18next';
7
-import { Provider } from 'react-redux';
8
-
9
-import { i18next } from '../../../../react/features/base/i18n';
10
-import { ContactListPanel } from '../../../../react/features/contact-list';
11
-/* eslint-enable no-unused-vars */
12
-
13
-import UIUtil from '../../util/UIUtil';
14
-
15
-/**
16
- * Contact list.
17
- *
18
- * FIXME: One day this view should no longer be called "contact list" because
19
- * the term "contact" is not used elsewhere. Normally people in the conference
20
- * are internally refered to as "participants" or externally as "members".
21
- */
22
-const ContactListView = {
23
-    /**
24
-     * Creates and appends the contact list to the side panel.
25
-     *
26
-     * @returns {void}
27
-     */
28
-    init() {
29
-        const contactListPanelContainer = document.createElement('div');
30
-
31
-        contactListPanelContainer.id = 'contacts_container';
32
-        contactListPanelContainer.className = 'sideToolbarContainer__inner';
33
-
34
-        $('#sideToolbarContainer').append(contactListPanelContainer);
35
-
36
-        ReactDOM.render(
37
-            <Provider store = { APP.store }>
38
-                <I18nextProvider i18n = { i18next }>
39
-                    <ContactListPanel />
40
-                </I18nextProvider>
41
-            </Provider>,
42
-            contactListPanelContainer
43
-        );
44
-    },
45
-
46
-    /**
47
-     * Indicates if the contact list is currently visible.
48
-     *
49
-     * @return {boolean) true if the contact list is currently visible.
50
-     */
51
-    isVisible() {
52
-        return UIUtil.isVisible(document.getElementById('contactlist'));
53
-    }
54
-};
55
-
56
-export default ContactListView;

+ 0
- 17
modules/UI/videolayout/VideoLayout.js Wyświetl plik

@@ -66,9 +66,6 @@ const VideoLayout = {
66 66
     init(emitter) {
67 67
         eventEmitter = emitter;
68 68
 
69
-        // Unregister listeners in case of reinitialization
70
-        this.unregisterListeners();
71
-
72 69
         localVideoThumbnail = new LocalVideo(VideoLayout, emitter);
73 70
 
74 71
         // sets default video type of local video
@@ -104,20 +101,6 @@ const VideoLayout = {
104 101
     registerListeners() {
105 102
         eventEmitter.addListener(UIEvents.LOCAL_FLIPX_CHANGED,
106 103
             onLocalFlipXChanged);
107
-        eventEmitter.addListener(UIEvents.CONTACT_CLICKED,
108
-            this.handleVideoThumbClicked);
109
-    },
110
-
111
-    /**
112
-     * Unregistering listeners for UI events in Video layout component.
113
-     *
114
-     * @returns {void}
115
-     */
116
-    unregisterListeners() {
117
-        if (this._onContactClicked) {
118
-            eventEmitter.removeListener(UIEvents.CONTACT_CLICKED,
119
-                this.handleVideoThumbClicked);
120
-        }
121 104
     },
122 105
 
123 106
     initLargeVideo() {

+ 0
- 1
modules/transport/PostMessageTransportBackend.js Wyświetl plik

@@ -22,7 +22,6 @@ const LEGACY_INCOMING_METHODS = [
22 22
     'email',
23 23
     'toggle-audio',
24 24
     'toggle-chat',
25
-    'toggle-contact-list',
26 25
     'toggle-film-strip',
27 26
     'toggle-share-screen',
28 27
     'toggle-video',

+ 0
- 0
react/features/contact-list/components/ContactListItem.native.js Wyświetl plik


+ 0
- 101
react/features/contact-list/components/ContactListItem.web.js Wyświetl plik

@@ -1,101 +0,0 @@
1
-/* global APP */
2
-
3
-import PropTypes from 'prop-types';
4
-import React, { Component } from 'react';
5
-
6
-import UIEvents from '../../../../service/UI/UIEvents';
7
-
8
-import { Avatar } from '../../base/participants';
9
-
10
-/**
11
- * Implements a React {@code Component} for showing a participant's avatar and
12
- * name and emits an event when it has been clicked.
13
- *
14
- * @extends Component
15
- */
16
-class ContactListItem extends Component {
17
-    /**
18
-     * Default values for {@code ContactListItem} component's properties.
19
-     *
20
-     * @static
21
-     */
22
-    static propTypes = {
23
-        /**
24
-         * The link to the participant's avatar image.
25
-         */
26
-        avatarURI: PropTypes.string,
27
-
28
-        /**
29
-         * An id attribute to set on the root of {@code ContactListItem}. Used
30
-         * by the torture tests.
31
-         */
32
-        id: PropTypes.string,
33
-
34
-        /**
35
-         * The participant's display name.
36
-         */
37
-        name: PropTypes.string
38
-    };
39
-
40
-    /**
41
-     * Initializes new {@code ContactListItem} instance.
42
-     *
43
-     * @param {Object} props - The read-only properties with which the new
44
-     * instance is to be initialized.
45
-     */
46
-    constructor(props) {
47
-        super(props);
48
-
49
-        // Bind event handler so it is only bound once for every instance.
50
-        this._onClick = this._onClick.bind(this);
51
-    }
52
-
53
-    /**
54
-     * Implements React's {@link Component#render()}.
55
-     *
56
-     * @inheritdoc
57
-     * @returns {ReactElement}
58
-     */
59
-    render() {
60
-        return (
61
-            <li
62
-                className = 'clickable contact-list-item'
63
-                id = { this.props.id }
64
-                onClick = { this._onClick }>
65
-                { this.props.avatarURI ? this._renderAvatar() : null }
66
-                <p className = 'contact-list-item-name'>
67
-                    { this.props.name }
68
-                </p>
69
-            </li>
70
-        );
71
-    }
72
-
73
-    /**
74
-     * Emits an event notifying the contact list item for the passed in
75
-     * participant ID has been clicked.
76
-     *
77
-     * @private
78
-     * @returns {void}
79
-     */
80
-    _onClick() {
81
-        // FIXME move this call to a pinning action, which is what's happening
82
-        // on the listener end, when the listener is properly hooked into redux.
83
-        APP.UI.emitEvent(UIEvents.CONTACT_CLICKED, this.props.id);
84
-    }
85
-
86
-    /**
87
-     * Renders the React Element for displaying the participant's avatar image.
88
-     *
89
-     * @private
90
-     * @returns {ReactElement}
91
-     */
92
-    _renderAvatar() {
93
-        return (
94
-            <Avatar
95
-                className = 'icon-avatar avatar'
96
-                uri = { this.props.avatarURI } />
97
-        );
98
-    }
99
-}
100
-
101
-export default ContactListItem;

+ 0
- 0
react/features/contact-list/components/ContactListPanel.native.js Wyświetl plik


+ 0
- 122
react/features/contact-list/components/ContactListPanel.web.js Wyświetl plik

@@ -1,122 +0,0 @@
1
-/* @flow */
2
-
3
-import PropTypes from 'prop-types';
4
-import React, { Component } from 'react';
5
-import { connect } from 'react-redux';
6
-
7
-import { translate } from '../../base/i18n';
8
-import { getAvatarURL, getParticipants } from '../../base/participants';
9
-
10
-import ContactListItem from './ContactListItem';
11
-
12
-declare var interfaceConfig: Object;
13
-
14
-/**
15
- * React component for showing a list of current conference participants.
16
- *
17
- * @extends Component
18
- */
19
-class ContactListPanel extends Component<*> {
20
-    /**
21
-     * Default values for {@code ContactListPanel} component's properties.
22
-     *
23
-     * @static
24
-     */
25
-    static propTypes = {
26
-        /**
27
-         * The participants to show in the contact list.
28
-         */
29
-        _participants: PropTypes.array,
30
-
31
-        /**
32
-         * Whether or not participant avatars should be displayed.
33
-         */
34
-        _showAvatars: PropTypes.bool,
35
-
36
-        /**
37
-         * Invoked to obtain translated strings.
38
-         */
39
-        t: PropTypes.func
40
-    };
41
-
42
-    /**
43
-     * Implements React's {@link Component#render()}.
44
-     *
45
-     * @inheritdoc
46
-     */
47
-    render() {
48
-        const { _participants, t } = this.props;
49
-
50
-        return (
51
-            <div className = 'contact-list-panel'>
52
-                <div className = 'title'>
53
-                    { t('contactlist', { count: _participants.length }) }
54
-                </div>
55
-                <ul id = 'contacts'>
56
-                    { this._renderContacts() }
57
-                </ul>
58
-            </div>
59
-        );
60
-    }
61
-
62
-    /**
63
-     * Renders React Elements for displaying information about each participant
64
-     * in the contact list.
65
-     *
66
-     * @private
67
-     * @returns {ReactElement[]}
68
-     */
69
-    _renderContacts() {
70
-        const { t } = this.props;
71
-        const meString = t('me');
72
-
73
-        return this.props._participants.map(participant => {
74
-            const { id, local, name } = participant;
75
-            let displayName;
76
-
77
-            // FIXME this duplicates the logic from SpeakerStats.js, but
78
-            // currently it seems that the
79
-            // interfaceConfig.DEFAULT_REMOTE_DISPLAY_NAME is freely used in
80
-            // multiple other places. A proper fix should take care of all
81
-            // usages. Also conference.js has getParticipantDisplayName which
82
-            // generates HTML span making things even harder to be cleaned up
83
-            // properly.
84
-            if (local) {
85
-                displayName
86
-                    = name ? `${name} (${meString})` : meString;
87
-            } else {
88
-                displayName
89
-                    = name ? name : interfaceConfig.DEFAULT_REMOTE_DISPLAY_NAME;
90
-            }
91
-
92
-            return (
93
-                <ContactListItem
94
-                    avatarURI = { this.props._showAvatars
95
-                        ? getAvatarURL(participant) : null }
96
-                    id = { id }
97
-                    key = { id }
98
-                    name = { displayName } />
99
-            );
100
-        });
101
-    }
102
-}
103
-
104
-/**
105
- * Maps (parts of) the Redux state to the associated {@code ContactListPanel}'s
106
- * props.
107
- *
108
- * @param {Object} state - The Redux state.
109
- * @private
110
- * @returns {{
111
- *     _locked: boolean,
112
- *     _participants: Array
113
- * }}
114
- */
115
-function _mapStateToProps(state) {
116
-    return {
117
-        _participants: getParticipants(state),
118
-        _showAvatars: interfaceConfig.SHOW_CONTACTLIST_AVATARS
119
-    };
120
-}
121
-
122
-export default translate(connect(_mapStateToProps)(ContactListPanel));

+ 0
- 0
react/features/contact-list/components/ParticipantCounter.native.js Wyświetl plik


+ 0
- 59
react/features/contact-list/components/ParticipantCounter.web.js Wyświetl plik

@@ -1,59 +0,0 @@
1
-import PropTypes from 'prop-types';
2
-import React, { Component } from 'react';
3
-import { connect } from 'react-redux';
4
-
5
-import { getParticipantCount } from '../../base/participants';
6
-
7
-/**
8
- * React component for showing a badge with the current count of conference
9
- * participants.
10
- *
11
- * @extends Component
12
- */
13
-class ParticipantCounter extends Component {
14
-    /**
15
-     * {@code ParticipantCounter} component's property types.
16
-     *
17
-     * @static
18
-     */
19
-    static propTypes = {
20
-        /**
21
-         * The number of participants in the conference.
22
-         */
23
-        _count: PropTypes.number
24
-    };
25
-
26
-    /**
27
-     * Implements React's {@link Component#render()}.
28
-     *
29
-     * @inheritdoc
30
-     * @returns {ReactElement}
31
-     */
32
-    render() {
33
-        return (
34
-            <span className = 'badge-round'>
35
-                <span id = 'numberOfParticipants'>
36
-                    { this.props._count }
37
-                </span>
38
-            </span>
39
-        );
40
-    }
41
-}
42
-
43
-/**
44
- * Maps (parts of) the Redux state to the associated
45
- * {@code ParticipantCounter}'s props.
46
- *
47
- * @param {Object} state - The Redux state.
48
- * @private
49
- * @returns {{
50
- *     _count: number
51
- * }}
52
- */
53
-function _mapStateToProps(state) {
54
-    return {
55
-        _count: getParticipantCount(state)
56
-    };
57
-}
58
-
59
-export default connect(_mapStateToProps)(ParticipantCounter);

+ 0
- 2
react/features/contact-list/components/index.js Wyświetl plik

@@ -1,2 +0,0 @@
1
-export { default as ContactListPanel } from './ContactListPanel';
2
-export { default as ParticipantCounter } from './ParticipantCounter';

+ 0
- 1
react/features/contact-list/index.js Wyświetl plik

@@ -1 +0,0 @@
1
-export * from './components';

+ 0
- 2
service/UI/UIEvents.js Wyświetl plik

@@ -38,7 +38,6 @@ export default {
38 38
     TOGGLE_AUDIO_ONLY: 'UI.toggle_audioonly',
39 39
     TOGGLE_CHAT: 'UI.toggle_chat',
40 40
     TOGGLE_SETTINGS: 'UI.toggle_settings',
41
-    TOGGLE_CONTACT_LIST: 'UI.toggle_contact_list',
42 41
 
43 42
     /**
44 43
      * Notifies that the profile toolbar button has been clicked.
@@ -69,7 +68,6 @@ export default {
69 68
     TOGGLE_RECORDING: 'UI.toggle_recording',
70 69
     TOGGLE_SCREENSHARING: 'UI.toggle_screensharing',
71 70
     TOGGLED_SHARED_DOCUMENT: 'UI.toggled_shared_document',
72
-    CONTACT_CLICKED: 'UI.contact_clicked',
73 71
     HANGUP: 'UI.hangup',
74 72
     LOGOUT: 'UI.logout',
75 73
     RECORDING_TOGGLED: 'UI.recording_toggled',

Ładowanie…
Anuluj
Zapisz