Spellauge 9 роки тому
джерело
коміт
277f340063
2 змінених файлів з 21 додано та 4 видалено
  1. 1
    0
      config.js
  2. 20
    4
      modules/UI/authentication/LoginDialog.js

+ 1
- 0
config.js Переглянути файл

@@ -4,6 +4,7 @@ var config = {
4 4
     hosts: {
5 5
         domain: 'jitsi-meet.example.com',
6 6
         //anonymousdomain: 'guest.example.com',
7
+        // authdomain: 'jitsi-meet.example.com',  // defaults to <domain>
7 8
         muc: 'conference.jitsi-meet.example.com', // FIXME: use XEP-0030
8 9
         bridge: 'jitsi-videobridge.jitsi-meet.example.com', // FIXME: use XEP-0030
9 10
         //jirecon: 'jirecon.jitsi-meet.example.com',

+ 20
- 4
modules/UI/authentication/LoginDialog.js Переглянути файл

@@ -24,12 +24,18 @@ function Dialog(callback, obtainSession) {
24 24
 
25 25
     var message = '<h2 data-i18n="dialog.passwordRequired">';
26 26
     message += APP.translation.translateString("dialog.passwordRequired");
27
+    // ++__authdomain__
27 28
     message += '</h2>' +
28
-        '<input name="username" type="text" ' +
29
-        'placeholder="user@domain.net" autofocus>' +
30
-        '<input name="password" ' +
29
+        '<input name="username" type="text" ';
30
+    if (config.hosts.authdomain) {
31
+      message += 'placeholder="user identity" autofocus>';
32
+    } else {
33
+      message += 'placeholder="user@domain.net" autofocus>';
34
+    }
35
+    message += '<input name="password" ' +
31 36
         'type="password" data-i18n="[placeholder]dialog.userPassword"' +
32 37
         ' placeholder="user password">';
38
+    // --__authdomain__
33 39
 
34 40
     var okButton = APP.translation.generateTranslationHTML("dialog.Ok");
35 41
 
@@ -50,6 +56,16 @@ function Dialog(callback, obtainSession) {
50 56
                     var password = f.password;
51 57
                     if (jid && password) {
52 58
                         stop = false;
59
+                        //++__authdomain__ complete jid by appending @<domain> if no @ was found in jid
60
+                        if (jid.indexOf("@") < 0) {
61
+                          jid = jid.concat('@');
62
+                          if (config.hosts.authdomain) {
63
+                            jid += config.hosts.authdomain;
64
+                          } else {
65
+                            jid += config.hosts.domain;
66
+                          }
67
+                        }
68
+                        // --__authdomain__
53 69
                         connection.reset();
54 70
                         connDialog.goToState('connecting');
55 71
                         connection.connect(jid, password, stateHandler);
@@ -225,4 +241,4 @@ var LoginDialog = {
225 241
     }
226 242
 };
227 243
 
228
-module.exports = LoginDialog;
244
+module.exports = LoginDialog;

Завантаження…
Відмінити
Зберегти