瀏覽代碼

auth btn removed. login/logout --> Profile

j8
Kostiantyn Pashura 8 年之前
父節點
當前提交
436f3b9d9b

+ 0
- 1
conference.js 查看文件

1086
             }
1086
             }
1087
         );
1087
         );
1088
 
1088
 
1089
-
1090
         room.on(ConferenceEvents.USER_JOINED, (id, user) => {
1089
         room.on(ConferenceEvents.USER_JOINED, (id, user) => {
1091
             if (user.isHidden())
1090
             if (user.isHidden())
1092
                 return;
1091
                 return;

+ 0
- 26
css/_login_menu.scss 查看文件

31
     left: 18px;
31
     left: 18px;
32
 }
32
 }
33
 
33
 
34
-
35
-.authentication {
36
-    position: relative;
37
-}
38
-
39
 a.disabled {
34
 a.disabled {
40
     color: gray !important;
35
     color: gray !important;
41
     pointer-events: none;
36
     pointer-events: none;
60
     position: absolute;
55
     position: absolute;
61
     top: 18px;
56
     top: 18px;
62
     left: -7px;
57
     left: -7px;
63
-}
64
-
65
-//extended toolbar: Log In menu
66
-.auth_container {
67
-    ul {
68
-        margin-top: 40px;
69
-        padding: 0;
70
-
71
-        li a.authButton{
72
-            width: 160px;
73
-            margin: 10px 20px;
74
-            background-color: #06a5df;
75
-            padding-top: 3px;
76
-            padding-bottom: 3px;
77
-            padding-left: 29px;
78
-            padding-right: 29px;
79
-            border-radius: 4px;
80
-            cursor: pointer;
81
-            box-sizing: border-box;
82
-        }
83
-    }
84
 }
58
 }

+ 26
- 0
css/_side_toolbar_container.scss 查看文件

124
 #followMeCheckBox {
124
 #followMeCheckBox {
125
     width: 13px !important;
125
     width: 13px !important;
126
 }
126
 }
127
+
128
+/**
129
+ * Profile
130
+ */
131
+.auth_container {
132
+    ul {
133
+        padding: 0;
134
+
135
+        li {
136
+            list-style-type: none;
137
+
138
+            a.authButton{
139
+                width: 160px;
140
+                margin: 10px 20px;
141
+                padding: 3px 29px;
142
+                box-sizing: border-box;
143
+                background-color: #06a5df;
144
+                border-radius: 4px;
145
+                cursor: pointer;
146
+                color: $defaultColor;
147
+                text-decoration: none;
148
+                text-align: center;
149
+            }
150
+        }
151
+    }
152
+}

+ 5
- 1
css/input-control/_input-control.scss 查看文件

20
     }
20
     }
21
 
21
 
22
     &__input {
22
     &__input {
23
-        margin: 8px 0;
23
+        margin-bottom: 8px;
24
+
25
+        &:last-child {
26
+            margin-bottom: inherit;
27
+        }
24
 
28
 
25
         &::selection {
29
         &::selection {
26
             background-color: $defaultDarkSelectionColor;
30
             background-color: $defaultDarkSelectionColor;

+ 12
- 12
index.html 查看文件

108
             <a class="button" id="toolbar_button_profile" data-container="body" data-placement="right" data-i18n="[content]toolbar.profile" content="Edit your profile">
108
             <a class="button" id="toolbar_button_profile" data-container="body" data-placement="right" data-i18n="[content]toolbar.profile" content="Edit your profile">
109
                 <img id="avatar" src="images/avatar2.png"/>
109
                 <img id="avatar" src="images/avatar2.png"/>
110
             </a>
110
             </a>
111
-            <a class="button icon-avatar authentication" id="toolbar_button_authentication" data-i18n="[content]toolbar.authenticate"></a>
112
             <a class="button icon-contactList" id="toolbar_contact_list" shortcut="contactlistpopover">
111
             <a class="button icon-contactList" id="toolbar_contact_list" shortcut="contactlistpopover">
113
                 <span class="badge-round">
112
                 <span class="badge-round">
114
                     <span id="numberOfParticipants"></span>
113
                     <span id="numberOfParticipants"></span>
135
             <a class="button icon-feedback" id="feedbackButton"></a>
134
             <a class="button icon-feedback" id="feedbackButton"></a>
136
 
135
 
137
             <div id="sideToolbarContainer">
136
             <div id="sideToolbarContainer">
138
-                <div id="authentication_container" class="auth_container">
139
-                    <ul>
140
-                        <li id="toolbar_auth_identity"></li>
141
-                        <li id="toolbar_button_login">
142
-                            <a class="authButton" data-i18n="toolbar.login"></a>
143
-                        </li>
144
-                        <li id="toolbar_button_logout">
145
-                            <a class="authButton" data-i18n="toolbar.logout"></a>
146
-                        </li>
147
-                    </ul>
148
-                </div>
149
                 <div id="profile_container" class="sideToolbarContainer__inner">
137
                 <div id="profile_container" class="sideToolbarContainer__inner">
150
                     <div class="title" data-i18n="profile.title"></div>
138
                     <div class="title" data-i18n="profile.title"></div>
151
                     <div class="sideToolbarBlock first">
139
                     <div class="sideToolbarBlock first">
156
                         <label data-i18n="profile.setEmailLabel"></label>
144
                         <label data-i18n="profile.setEmailLabel"></label>
157
                         <input type="text" id="setEmail" placeholder="Enter e-mail">
145
                         <input type="text" id="setEmail" placeholder="Enter e-mail">
158
                     </div>
146
                     </div>
147
+                    <div class="sideToolbarBlock auth_container" id="authenticationContainer">
148
+                        <p data-i18n="toolbar.authenticate"></p>
149
+                        <ul>
150
+                            <li id="toolbar_auth_identity"></li>
151
+                            <li id="toolbar_button_login">
152
+                                <a class="authButton" data-i18n="toolbar.login"></a>
153
+                            </li>
154
+                            <li id="toolbar_button_logout">
155
+                                <a class="authButton" data-i18n="toolbar.logout"></a>
156
+                            </li>
157
+                        </ul>
158
+                    </div>
159
                 </div>
159
                 </div>
160
                 <div id="chat_container" class="sideToolbarContainer__inner">
160
                 <div id="chat_container" class="sideToolbarContainer__inner">
161
                     <div id="nickname">
161
                     <div id="nickname">

+ 4
- 0
interface_config.js 查看文件

17
     GENERATE_ROOMNAMES_ON_WELCOME_PAGE: true,
17
     GENERATE_ROOMNAMES_ON_WELCOME_PAGE: true,
18
     APP_NAME: "Jitsi Meet",
18
     APP_NAME: "Jitsi Meet",
19
     INVITATION_POWERED_BY: true,
19
     INVITATION_POWERED_BY: true,
20
+    /**
21
+     * If we should show authentication block in profile
22
+     */
23
+    AUTHENTICATION_ENABLE: true,
20
     // the toolbar buttons line is intentionally left in one line, to be able
24
     // the toolbar buttons line is intentionally left in one line, to be able
21
     // to easily override values or remove them using regex
25
     // to easily override values or remove them using regex
22
     MAIN_TOOLBAR_BUTTONS: ['microphone', 'camera', 'desktop', 'invite', 'fullscreen', 'hangup'], // jshint ignore:line
26
     MAIN_TOOLBAR_BUTTONS: ['microphone', 'camera', 'desktop', 'invite', 'fullscreen', 'hangup'], // jshint ignore:line

+ 3
- 11
modules/UI/UI.js 查看文件

362
 
362
 
363
     UI.addListener(UIEvents.TOGGLE_FULLSCREEN, UI.toggleFullScreen);
363
     UI.addListener(UIEvents.TOGGLE_FULLSCREEN, UI.toggleFullScreen);
364
 
364
 
365
-    UI.addListener(UIEvents.TOGGLE_AUTHENTICATION, UI.toggleAuthentication);
366
-
367
     UI.addListener(UIEvents.TOGGLE_CHAT, UI.toggleChat);
365
     UI.addListener(UIEvents.TOGGLE_CHAT, UI.toggleChat);
368
 
366
 
369
     UI.addListener(UIEvents.TOGGLE_SETTINGS, function () {
367
     UI.addListener(UIEvents.TOGGLE_SETTINGS, function () {
724
     return FilmStrip.isFilmStripVisible();
722
     return FilmStrip.isFilmStripVisible();
725
 };
723
 };
726
 
724
 
727
-/**
728
- * Toggles authentication panel.
729
- */
730
-UI.toggleAuthentication = function () {
731
-    UI.toggleSidePanel("authentication_container");
732
-};
733
-
734
 /**
725
 /**
735
  * Toggles chat panel.
726
  * Toggles chat panel.
736
  */
727
  */
1149
  * @param {string} [login] current login
1140
  * @param {string} [login] current login
1150
  */
1141
  */
1151
 UI.updateAuthInfo = function (isAuthEnabled, login) {
1142
 UI.updateAuthInfo = function (isAuthEnabled, login) {
1143
+    let showAuth = isAuthEnabled && UIUtil.isAuthenticationEnabled();
1152
     let loggedIn = !!login;
1144
     let loggedIn = !!login;
1153
 
1145
 
1154
-    Toolbar.showAuthenticateButton(isAuthEnabled);
1146
+    Toolbar.showAuthenticateButton(showAuth);
1155
 
1147
 
1156
-    if (isAuthEnabled) {
1148
+    if (showAuth) {
1157
         Toolbar.setAuthenticatedIdentity(login);
1149
         Toolbar.setAuthenticatedIdentity(login);
1158
 
1150
 
1159
         Toolbar.showLoginButton(!loggedIn);
1151
         Toolbar.showLoginButton(!loggedIn);

+ 7
- 7
modules/UI/authentication/LoginDialog.js 查看文件

8
     let placeholder = config.hosts.authdomain
8
     let placeholder = config.hosts.authdomain
9
         ? "user identity"
9
         ? "user identity"
10
         : "user@domain.net";
10
         : "user@domain.net";
11
-    let passRequiredMsg = APP.translation.translateString(
12
-        "dialog.passwordRequired"
13
-    );
11
+
14
     return `
12
     return `
15
-        <h2 data-i18n="dialog.passwordRequired">${passRequiredMsg}</h2>
16
-        <input name="username" type="text" placeholder=${placeholder} autofocus>
13
+        <input name="username" type="text" 
14
+               class="input-control__input"
15
+               placeholder=${placeholder} autofocus>
17
         <input name="password" type="password"
16
         <input name="password" type="password"
17
+               class="input-control__input"
18
                data-i18n="[placeholder]dialog.userPassword"
18
                data-i18n="[placeholder]dialog.userPassword"
19
-               placeholder="user password">
20
-        `;
19
+               placeholder="user password">`;
21
 }
20
 }
22
 
21
 
23
 /**
22
 /**
80
 
79
 
81
     const states = {
80
     const states = {
82
         login: {
81
         login: {
82
+            title: APP.translation.translateString('dialog.passwordRequired'),
83
             html: getPasswordInputHtml(),
83
             html: getPasswordInputHtml(),
84
             buttons: loginButtons,
84
             buttons: loginButtons,
85
             focus: ':input:first',
85
             focus: ':input:first',

+ 9
- 75
modules/UI/toolbars/Toolbar.js 查看文件

6
 let emitter = null;
6
 let emitter = null;
7
 let Toolbar;
7
 let Toolbar;
8
 
8
 
9
-/**
10
- * Opens the invite link dialog.
11
- */
12
-function openLinkDialog () {
13
-    let inviteAttributes;
14
-
15
-    if (roomUrl === null) {
16
-        inviteAttributes = 'data-i18n="[value]roomUrlDefaultMsg" value="' +
17
-            APP.translation.translateString("roomUrlDefaultMsg") + '"';
18
-    } else {
19
-        inviteAttributes = "value=\"" + encodeURI(roomUrl) + "\"";
20
-    }
21
-
22
-    let inviteLinkId = "inviteLinkRef";
23
-    let focusInviteLink = function() {
24
-        $('#' + inviteLinkId)
25
-            .focus()
26
-            .select();
27
-    };
28
-
29
-    let title = APP.translation.generateTranslationHTML("dialog.shareLink");
30
-    APP.UI.messageHandler.openTwoButtonDialog(
31
-        null, title, null,
32
-        '<input id="' + inviteLinkId + '" type="text" '
33
-            + inviteAttributes + ' readonly/>',
34
-        false, "dialog.copy",
35
-        function (e, v) {
36
-            if (v && roomUrl) {
37
-                JitsiMeetJS.analytics.sendEvent('toolbar.invite.button');
38
-
39
-                focusInviteLink();
40
-
41
-                document.execCommand('copy');
42
-            }
43
-            else {
44
-                JitsiMeetJS.analytics.sendEvent('toolbar.invite.cancel');
45
-            }
46
-        },
47
-        function (event) {
48
-            if (!roomUrl) {
49
-                if (event && event.target) {
50
-                    $(event.target).find('button[value=true]')
51
-                        .prop('disabled', true);
52
-                }
53
-            }
54
-            else {
55
-                focusInviteLink();
56
-            }
57
-        },
58
-        function (e, v, m, f) {
59
-            if(!v && !m && !f)
60
-                JitsiMeetJS.analytics.sendEvent('toolbar.invite.close');
61
-        },
62
-        'Copy' // Focus Copy button.
63
-    );
64
-}
65
-
66
 const buttonHandlers = {
9
 const buttonHandlers = {
67
-    "toolbar_button_authentication": function() {
68
-        JitsiMeetJS.analytics.sendEvent('toolbar.authentication.toggled');
69
-        emitter.emit(UIEvents.TOGGLE_AUTHENTICATION);
70
-    },
71
     "toolbar_button_profile": function () {
10
     "toolbar_button_profile": function () {
72
         JitsiMeetJS.analytics.sendEvent('toolbar.profile.toggled');
11
         JitsiMeetJS.analytics.sendEvent('toolbar.profile.toggled');
73
         emitter.emit(UIEvents.TOGGLE_PROFILE);
12
         emitter.emit(UIEvents.TOGGLE_PROFILE);
186
 };
125
 };
187
 
126
 
188
 const defaultToolbarButtons = {
127
 const defaultToolbarButtons = {
189
-    'authentication': {
190
-        id: 'toolbar_button_authentication',
191
-        tooltipKey: 'toolbar.authenticate',
192
-        sideContainerId: 'authentication_container'
193
-    },
194
     'microphone': {
128
     'microphone': {
195
         id: 'toolbar_button_mute',
129
         id: 'toolbar_button_mute',
196
         tooltipKey: 'toolbar.mute',
130
         tooltipKey: 'toolbar.mute',
457
      * @param show <tt>true</tt> to show or <tt>false</tt> to hide
391
      * @param show <tt>true</tt> to show or <tt>false</tt> to hide
458
      */
392
      */
459
     showAuthenticateButton (show) {
393
     showAuthenticateButton (show) {
460
-        if (UIUtil.isButtonEnabled('authentication') && show) {
461
-            $('#toolbar_button_authentication').css({display: "inline"});
462
-        } else {
463
-            $('#toolbar_button_authentication').css({display: "none"});
464
-        }
394
+        let display = show ? 'block' : 'none';
395
+
396
+        $('#authenticationContainer').css({display});
465
     },
397
     },
466
 
398
 
467
     showEtherpadButton () {
399
     showEtherpadButton () {
515
      * @param authIdentity identity name to be displayed.
447
      * @param authIdentity identity name to be displayed.
516
      */
448
      */
517
     setAuthenticatedIdentity (authIdentity) {
449
     setAuthenticatedIdentity (authIdentity) {
450
+        let selector = $('#toolbar_auth_identity');
451
+
518
         if (authIdentity) {
452
         if (authIdentity) {
519
-            let selector = $('#toolbar_auth_identity');
520
             selector.css({display: "list-item"});
453
             selector.css({display: "list-item"});
521
             selector.text(authIdentity);
454
             selector.text(authIdentity);
522
         } else {
455
         } else {
523
-            $('#toolbar_auth_identity').css({display: "none"});
456
+            selector.css({display: "none"});
457
+            selector.text('');
524
         }
458
         }
525
     },
459
     },
526
 
460
 
529
      * @param show <tt>true</tt> to show
463
      * @param show <tt>true</tt> to show
530
      */
464
      */
531
     showLoginButton (show) {
465
     showLoginButton (show) {
532
-        if (UIUtil.isButtonEnabled('authentication') && show) {
466
+        if (show) {
533
             $('#toolbar_button_login').css({display: "list-item"});
467
             $('#toolbar_button_login').css({display: "list-item"});
534
         } else {
468
         } else {
535
             $('#toolbar_button_login').css({display: "none"});
469
             $('#toolbar_button_login').css({display: "none"});
541
      * @param show <tt>true</tt> to show
475
      * @param show <tt>true</tt> to show
542
      */
476
      */
543
     showLogoutButton (show) {
477
     showLogoutButton (show) {
544
-        if (UIUtil.isButtonEnabled('authentication') && show) {
478
+        if (show) {
545
             $('#toolbar_button_logout').css({display: "list-item"});
479
             $('#toolbar_button_logout').css({display: "list-item"});
546
         } else {
480
         } else {
547
             $('#toolbar_button_logout').css({display: "none"});
481
             $('#toolbar_button_logout').css({display: "none"});

+ 9
- 0
modules/UI/util/UIUtil.js 查看文件

204
         return interfaceConfig.SETTINGS_SECTIONS.indexOf(name) !== -1;
204
         return interfaceConfig.SETTINGS_SECTIONS.indexOf(name) !== -1;
205
     },
205
     },
206
 
206
 
207
+    /**
208
+     * Indicates if Authentication Section should be shown
209
+     *
210
+     * @returns {boolean}
211
+     */
212
+    isAuthenticationEnabled: function() {
213
+        return interfaceConfig.AUTHENTICATION_ENABLE;
214
+    },
215
+
207
     /**
216
     /**
208
      * Shows the element given by id.
217
      * Shows the element given by id.
209
      *
218
      *

+ 0
- 4
service/UI/UIEvents.js 查看文件

44
      * Notifies that the profile toolbar button has been clicked.
44
      * Notifies that the profile toolbar button has been clicked.
45
      */
45
      */
46
     TOGGLE_PROFILE: "UI.toggle_profile",
46
     TOGGLE_PROFILE: "UI.toggle_profile",
47
-    /**
48
-     * Notifies that the authentication toolbar button has been clicked.
49
-     */
50
-    TOGGLE_AUTHENTICATION: "UI.toggle_authentication",
51
     /**
47
     /**
52
      * Notifies that a command to toggle the film strip has been issued. The
48
      * Notifies that a command to toggle the film strip has been issued. The
53
      * event may optionally specify a {Boolean} (primitive) value to assign to
49
      * event may optionally specify a {Boolean} (primitive) value to assign to

Loading…
取消
儲存