Fixes #1129 Hide "Contacts" section when logged in anonymously
This commit is contained in:
parent
b4d2007972
commit
16faf62d3f
13
dist/converse.js
vendored
13
dist/converse.js
vendored
|
@ -70795,8 +70795,6 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
||||||
|
|
||||||
_converse.api.promises.add('controlboxInitialized');
|
_converse.api.promises.add('controlboxInitialized');
|
||||||
|
|
||||||
const LABEL_CONTACTS = __('Contacts');
|
|
||||||
|
|
||||||
_converse.addControlBox = () => _converse.chatboxes.add({
|
_converse.addControlBox = () => _converse.chatboxes.add({
|
||||||
id: 'controlbox',
|
id: 'controlbox',
|
||||||
box_id: 'controlbox',
|
box_id: 'controlbox',
|
||||||
|
@ -70865,7 +70863,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
||||||
},
|
},
|
||||||
|
|
||||||
insertRoster() {
|
insertRoster() {
|
||||||
|
if (_converse.authentication === _converse.ANONYMOUS) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/* Place the rosterview inside the "Contacts" panel. */
|
/* 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));
|
_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')
|
'away': __('This contact is away')
|
||||||
};
|
};
|
||||||
|
|
||||||
const LABEL_CONTACTS = __('Contacts');
|
|
||||||
|
|
||||||
const LABEL_GROUPS = __('Groups');
|
const LABEL_GROUPS = __('Groups');
|
||||||
|
|
||||||
const HEADER_CURRENT_CONTACTS = __('My contacts');
|
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
|
/* Create an instance of RosterView once the RosterGroups
|
||||||
* collection has been created (in converse-core.js)
|
* collection has been created (in converse-core.js)
|
||||||
*/
|
*/
|
||||||
|
if (_converse.authentication === _converse.ANONYMOUS) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
_converse.rosterview = new _converse.RosterView({
|
_converse.rosterview = new _converse.RosterView({
|
||||||
'model': _converse.rostergroups
|
'model': _converse.rostergroups
|
||||||
});
|
});
|
||||||
|
|
|
@ -200,8 +200,6 @@
|
||||||
|
|
||||||
_converse.api.promises.add('controlboxInitialized');
|
_converse.api.promises.add('controlboxInitialized');
|
||||||
|
|
||||||
const LABEL_CONTACTS = __('Contacts');
|
|
||||||
|
|
||||||
_converse.addControlBox = () =>
|
_converse.addControlBox = () =>
|
||||||
_converse.chatboxes.add({
|
_converse.chatboxes.add({
|
||||||
id: 'controlbox',
|
id: 'controlbox',
|
||||||
|
@ -269,6 +267,9 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
insertRoster () {
|
insertRoster () {
|
||||||
|
if (_converse.authentication === _converse.ANONYMOUS) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/* Place the rosterview inside the "Contacts" panel. */
|
/* Place the rosterview inside the "Contacts" panel. */
|
||||||
_converse.api.waitUntil('rosterViewInitialized')
|
_converse.api.waitUntil('rosterViewInitialized')
|
||||||
.then(() => this.controlbox_pane.el.insertAdjacentElement('beforeEnd', _converse.rosterview.el))
|
.then(() => this.controlbox_pane.el.insertAdjacentElement('beforeEnd', _converse.rosterview.el))
|
||||||
|
|
|
@ -96,7 +96,6 @@
|
||||||
'xa': __('This contact is away for an extended period'),
|
'xa': __('This contact is away for an extended period'),
|
||||||
'away': __('This contact is away')
|
'away': __('This contact is away')
|
||||||
};
|
};
|
||||||
const LABEL_CONTACTS = __('Contacts');
|
|
||||||
const LABEL_GROUPS = __('Groups');
|
const LABEL_GROUPS = __('Groups');
|
||||||
const HEADER_CURRENT_CONTACTS = __('My contacts');
|
const HEADER_CURRENT_CONTACTS = __('My contacts');
|
||||||
const HEADER_PENDING_CONTACTS = __('Pending contacts');
|
const HEADER_PENDING_CONTACTS = __('Pending contacts');
|
||||||
|
@ -977,6 +976,9 @@
|
||||||
/* Create an instance of RosterView once the RosterGroups
|
/* Create an instance of RosterView once the RosterGroups
|
||||||
* collection has been created (in converse-core.js)
|
* collection has been created (in converse-core.js)
|
||||||
*/
|
*/
|
||||||
|
if (_converse.authentication === _converse.ANONYMOUS) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
_converse.rosterview = new _converse.RosterView({
|
_converse.rosterview = new _converse.RosterView({
|
||||||
'model': _converse.rostergroups
|
'model': _converse.rostergroups
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user