Commit 16faf62d authored by JC Brand's avatar JC Brand

Fixes #1129 Hide "Contacts" section when logged in anonymously

parent b4d20079
......@@ -70795,8 +70795,6 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
_converse.api.promises.add('controlboxInitialized');
const LABEL_CONTACTS = __('Contacts');
_converse.addControlBox = () => _converse.chatboxes.add({
id: 'controlbox',
box_id: 'controlbox',
......@@ -70865,7 +70863,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
},
insertRoster() {
if (_converse.authentication === _converse.ANONYMOUS) {
return;
}
/* Place the rosterview inside the "Contacts" panel. */
_converse.api.waitUntil('rosterViewInitialized').then(() => this.controlbox_pane.el.insertAdjacentElement('beforeEnd', _converse.rosterview.el)).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
},
......@@ -82222,8 +82225,6 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
'away': __('This contact is away')
};
const LABEL_CONTACTS = __('Contacts');
const LABEL_GROUPS = __('Groups');
const HEADER_CURRENT_CONTACTS = __('My contacts');
......@@ -83200,6 +83201,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
/* Create an instance of RosterView once the RosterGroups
* collection has been created (in converse-core.js)
*/
if (_converse.authentication === _converse.ANONYMOUS) {
return;
}
_converse.rosterview = new _converse.RosterView({
'model': _converse.rostergroups
});
......@@ -200,8 +200,6 @@
_converse.api.promises.add('controlboxInitialized');
const LABEL_CONTACTS = __('Contacts');
_converse.addControlBox = () =>
_converse.chatboxes.add({
id: 'controlbox',
......@@ -269,6 +267,9 @@
},
insertRoster () {
if (_converse.authentication === _converse.ANONYMOUS) {
return;
}
/* Place the rosterview inside the "Contacts" panel. */
_converse.api.waitUntil('rosterViewInitialized')
.then(() => this.controlbox_pane.el.insertAdjacentElement('beforeEnd', _converse.rosterview.el))
......
......@@ -96,7 +96,6 @@
'xa': __('This contact is away for an extended period'),
'away': __('This contact is away')
};
const LABEL_CONTACTS = __('Contacts');
const LABEL_GROUPS = __('Groups');
const HEADER_CURRENT_CONTACTS = __('My contacts');
const HEADER_PENDING_CONTACTS = __('Pending contacts');
......@@ -977,6 +976,9 @@
/* Create an instance of RosterView once the RosterGroups
* collection has been created (in converse-core.js)
*/
if (_converse.authentication === _converse.ANONYMOUS) {
return;
}
_converse.rosterview = new _converse.RosterView({
'model': _converse.rostergroups
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment