Commit 61a0e1bb authored by JC Brand's avatar JC Brand

New config setting `show_client_info`

Determines whether we show the icon for opening the client's "About" modal.
parent 49da581d
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
## 4.1.3 (Unreleased) ## 4.1.3 (Unreleased)
- New config setting [locked_muc_domain](https://conversejs.org/docs/html/configuration.html#locked-muc-domain) - New config setting [locked_muc_domain](https://conversejs.org/docs/html/configuration.html#locked-muc-domain)
- New config setting [show_client_info](https://conversejs.org/docs/html/configuration.html#show-client-info)
- #1373: Re-add support for the [muc_domain](https://conversejs.org/docs/html/configuration.html#muc-domain) setting - #1373: Re-add support for the [muc_domain](https://conversejs.org/docs/html/configuration.html#muc-domain) setting
- #1400: When a chat message is just an emoji, enlarge the emoji - #1400: When a chat message is just an emoji, enlarge the emoji
- #1437: List of groupchats in modal doesn't scroll - #1437: List of groupchats in modal doesn't scroll
......
...@@ -57327,6 +57327,11 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_4__["default"].plugins ...@@ -57327,6 +57327,11 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_4__["default"].plugins
*/ */
const _converse = this._converse, const _converse = this._converse,
__ = _converse.__; __ = _converse.__;
_converse.api.settings.update({
'show_client_info': true
});
_converse.ProfileModal = _converse.BootstrapModal.extend({ _converse.ProfileModal = _converse.BootstrapModal.extend({
events: { events: {
'change input[type="file"': "updateFilePreview", 'change input[type="file"': "updateFilePreview",
...@@ -94248,9 +94253,13 @@ var __t, __p = '', __e = _.escape, __j = Array.prototype.join; ...@@ -94248,9 +94253,13 @@ var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') } function print() { __p += __j.call(arguments, '') }
__p += '<!-- src/templates/profile_view.html -->\n<div class="userinfo controlbox-padded">\n<div class="controlbox-section profile d-flex">\n <a class="show-profile" href="#">\n <canvas class="avatar align-self-center" height="40" width="40"></canvas>\n </a>\n <span class="username w-100 align-self-center">' + __p += '<!-- src/templates/profile_view.html -->\n<div class="userinfo controlbox-padded">\n<div class="controlbox-section profile d-flex">\n <a class="show-profile" href="#">\n <canvas class="avatar align-self-center" height="40" width="40"></canvas>\n </a>\n <span class="username w-100 align-self-center">' +
__e(o.fullname) + __e(o.fullname) +
'</span>\n <a class="controlbox-heading__btn show-client-info fa fa-info-circle align-self-center" title="' + '</span>\n ';
if (o._converse.show_client_info) { ;
__p += '\n <a class="controlbox-heading__btn show-client-info fa fa-info-circle align-self-center" title="' +
__e(o.info_details) + __e(o.info_details) +
'"></a>\n '; '"></a>\n ';
} ;
__p += '\n ';
if (o._converse.allow_logout) { ; if (o._converse.allow_logout) { ;
__p += '\n <a class="controlbox-heading__btn logout fa fa-sign-out-alt align-self-center" title="' + __p += '\n <a class="controlbox-heading__btn logout fa fa-sign-out-alt align-self-center" title="' +
__e(o.title_log_out) + __e(o.title_log_out) +
...@@ -1271,6 +1271,14 @@ show_chatstate_notifications ...@@ -1271,6 +1271,14 @@ show_chatstate_notifications
Specifies whether chat state (online, dnd, away) HTML5 desktop notifications should be shown. Specifies whether chat state (online, dnd, away) HTML5 desktop notifications should be shown.
show_client_info
----------------
* Default: ``true``
Specifies whether the info icon is shown on the controlbox which when clicked opens an
"About" modal with more information about the version of Converse being used.
show_controlbox_by_default show_controlbox_by_default
-------------------------- --------------------------
......
...@@ -33,6 +33,10 @@ converse.plugins.add('converse-profile', { ...@@ -33,6 +33,10 @@ converse.plugins.add('converse-profile', {
const { _converse } = this, const { _converse } = this,
{ __ } = _converse; { __ } = _converse;
_converse.api.settings.update({
'show_client_info': true
});
_converse.ProfileModal = _converse.BootstrapModal.extend({ _converse.ProfileModal = _converse.BootstrapModal.extend({
events: { events: {
......
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
<canvas class="avatar align-self-center" height="40" width="40"></canvas> <canvas class="avatar align-self-center" height="40" width="40"></canvas>
</a> </a>
<span class="username w-100 align-self-center">{{{o.fullname}}}</span> <span class="username w-100 align-self-center">{{{o.fullname}}}</span>
{[ if (o._converse.show_client_info) { ]}
<a class="controlbox-heading__btn show-client-info fa fa-info-circle align-self-center" title="{{{o.info_details}}}"></a> <a class="controlbox-heading__btn show-client-info fa fa-info-circle align-self-center" title="{{{o.info_details}}}"></a>
{[ } ]}
{[ if (o._converse.allow_logout) { ]} {[ if (o._converse.allow_logout) { ]}
<a class="controlbox-heading__btn logout fa fa-sign-out-alt align-self-center" title="{{{o.title_log_out}}}"></a> <a class="controlbox-heading__btn logout fa fa-sign-out-alt align-self-center" title="{{{o.title_log_out}}}"></a>
{[ } ]} {[ } ]}
......
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