Explorar o código

Move config settings to the relevant plugins

JC Brand %!s(int64=9) %!d(string=hai) anos
pai
achega
a2b8d04d84
Modificáronse 4 ficheiros con 7 adicións e 7 borrados
  1. 4 0
      src/converse-controlbox.js
  2. 0 7
      src/converse-core.js
  3. 1 0
      src/converse-muc.js
  4. 2 0
      src/converse-rosterview.js

+ 4 - 0
src/converse-controlbox.js

@@ -162,7 +162,11 @@
              */
             var converse = this.converse;
             this.updateSettings({
+                allow_logout: true,
+                default_domain: undefined,
                 show_controlbox_by_default: false,
+                xhr_user_search: false,
+                xhr_user_search_url: ''
             });
 
             var LABEL_CONTACTS = __('Contacts');

+ 0 - 7
src/converse-core.js

@@ -243,15 +243,11 @@
         // Default configuration values
         // ----------------------------
         this.default_settings = {
-            allow_chat_pending_contacts: false,
-            allow_contact_removal: true,
             allow_contact_requests: true,
             allow_dragresize: true,
-            allow_logout: true,
             animate: true,
             authentication: 'login', // Available values are "login", "prebind", "anonymous".
             auto_away: 0, // Seconds after which user status is set to 'away'
-            auto_list_rooms: false,
             auto_login: false, // Currently only used in connection with anonymous login
             auto_reconnect: false,
             auto_subscribe: false,
@@ -259,7 +255,6 @@
             bosh_service_url: undefined, // The BOSH connection manager URL.
             csi_waiting_time: 0, // Support for XEP-0352. Seconds before client is considered idle and CSI is sent out.
             debug: false,
-            default_domain: undefined,
             expose_rid_and_sid: false,
             forward_messages: false,
             hide_offline_users: false,
@@ -287,8 +282,6 @@
             websocket_url: undefined,
             xhr_custom_status: false,
             xhr_custom_status_url: '',
-            xhr_user_search: false,
-            xhr_user_search_url: ''
         };
 
         _.extend(this, this.default_settings);

+ 1 - 0
src/converse-muc.js

@@ -207,6 +207,7 @@
             this.updateSettings({
                 allow_muc: true,
                 auto_join_on_invite: false,  // Auto-join chatroom on invite
+                auto_list_rooms: false,
                 hide_muc_server: false,
                 muc_history_max_stanzas: undefined, // Takes an integer, limits the amount of messages to fetch from chat room's history
                 show_toolbar: true,

+ 2 - 0
src/converse-rosterview.js

@@ -41,6 +41,8 @@
              * loaded by converse.js's plugin machinery.
              */
             this.updateSettings({
+                allow_chat_pending_contacts: false,
+                allow_contact_removal: true,
                 show_toolbar: true,
             });