Merge branch 'master' into implement_last_user_interaction_in_presence
This commit is contained in:
commit
45c47ab2c0
@ -13,6 +13,7 @@
|
|||||||
- #1306 added option `notification_delay`
|
- #1306 added option `notification_delay`
|
||||||
- #1305 added value 'all' for 'show_desktop_notifications' to notifiy even if converse.js is open
|
- #1305 added value 'all' for 'show_desktop_notifications' to notifiy even if converse.js is open
|
||||||
- #1312 Error `unrecognized expression` in Safari
|
- #1312 Error `unrecognized expression` in Safari
|
||||||
|
- #1318 added values 'on' and 'off' for 'trusted' option which removes the "This is a trusted device" checkbox from the login form
|
||||||
- #1319 Implement sending of presences according to XEP-0319: Last User Interaction in Presence
|
- #1319 Implement sending of presences according to XEP-0319: Last User Interaction in Presence
|
||||||
|
|
||||||
## 4.0.4 (2018-10-29)
|
## 4.0.4 (2018-10-29)
|
||||||
|
@ -1409,6 +1409,11 @@ open, what features the XMPP server supports and what your online status was.
|
|||||||
Clearing the cache makes Converse much slower when the user logs
|
Clearing the cache makes Converse much slower when the user logs
|
||||||
in again, because all data needs to be fetch anew.
|
in again, because all data needs to be fetch anew.
|
||||||
|
|
||||||
|
If ``trusted`` is set to ``on`` or ``off`` the "This is a trusted device"
|
||||||
|
checkbox in the login form will not appear at all and cannot be changed by the user.
|
||||||
|
``on`` means to trust the device as stated above and use ``localStorage``. ``off``
|
||||||
|
means to not trust the device (cache is cleared when the user logs out) and to use
|
||||||
|
``sessionStorage``.
|
||||||
|
|
||||||
time_format
|
time_format
|
||||||
-----------
|
-----------
|
||||||
|
@ -403,6 +403,7 @@ converse.plugins.add('converse-controlbox', {
|
|||||||
'conn_feedback_message': _converse.connfeedback.get('message'),
|
'conn_feedback_message': _converse.connfeedback.get('message'),
|
||||||
'placeholder_username': (_converse.locked_domain || _converse.default_domain) &&
|
'placeholder_username': (_converse.locked_domain || _converse.default_domain) &&
|
||||||
__('Username') || __('user@domain'),
|
__('Username') || __('user@domain'),
|
||||||
|
'show_trust_checkbox': _converse.trusted !== 'on' && _converse.trusted !== 'off'
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@ -442,10 +443,18 @@ converse.plugins.add('converse-controlbox', {
|
|||||||
if (!this.validate()) { return; }
|
if (!this.validate()) { return; }
|
||||||
|
|
||||||
const form_data = new FormData(ev.target);
|
const form_data = new FormData(ev.target);
|
||||||
|
|
||||||
|
if (_converse.trusted === 'on' || _converse.trusted === 'off') {
|
||||||
|
_converse.config.save({
|
||||||
|
'trusted': _converse.trusted === 'on',
|
||||||
|
'storage': _converse.trusted === 'on' ? 'local' : 'session'
|
||||||
|
});
|
||||||
|
} else {
|
||||||
_converse.config.save({
|
_converse.config.save({
|
||||||
'trusted': form_data.get('trusted') && true || false,
|
'trusted': form_data.get('trusted') && true || false,
|
||||||
'storage': form_data.get('trusted') ? 'local' : 'session'
|
'storage': form_data.get('trusted') ? 'local' : 'session'
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
let jid = form_data.get('jid');
|
let jid = form_data.get('jid');
|
||||||
if (_converse.locked_domain) {
|
if (_converse.locked_domain) {
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
<input id="converse-login-password" class="form-control" required="required" type="password" name="password" placeholder="{{{o.__('password')}}}">
|
<input id="converse-login-password" class="form-control" required="required" type="password" name="password" placeholder="{{{o.__('password')}}}">
|
||||||
</div>
|
</div>
|
||||||
{[ } ]}
|
{[ } ]}
|
||||||
|
{[ if (o.show_trust_checkbox) { ]}
|
||||||
<div class="form-group form-check login-trusted">
|
<div class="form-group form-check login-trusted">
|
||||||
<input id="converse-login-trusted" type="checkbox" class="form-check-input" name="trusted" {[ if (o._converse.config.get('trusted')) { ]} checked="checked" {[ } ]}>
|
<input id="converse-login-trusted" type="checkbox" class="form-check-input" name="trusted" {[ if (o._converse.config.get('trusted')) { ]} checked="checked" {[ } ]}>
|
||||||
<label for="converse-login-trusted" class="form-check-label login-trusted__desc">{{{o.__('This is a trusted device')}}}</label>
|
<label for="converse-login-trusted" class="form-check-label login-trusted__desc">{{{o.__('This is a trusted device')}}}</label>
|
||||||
@ -25,6 +26,7 @@
|
|||||||
data-title="Trusted device?"
|
data-title="Trusted device?"
|
||||||
data-content="{{{o.__('To improve performance, we cache your data in this browser. Uncheck this box if this is a public computer or if you want your data to be deleted when you log out. It\'s important that you explicitly log out, otherwise not all cached data might be deleted. Please note, when using an untrusted device, OMEMO encryption is NOT available.')}}}"></i>
|
data-content="{{{o.__('To improve performance, we cache your data in this browser. Uncheck this box if this is a public computer or if you want your data to be deleted when you log out. It\'s important that you explicitly log out, otherwise not all cached data might be deleted. Please note, when using an untrusted device, OMEMO encryption is NOT available.')}}}"></i>
|
||||||
</div>
|
</div>
|
||||||
|
{[ } ]}
|
||||||
|
|
||||||
<fieldset class="buttons">
|
<fieldset class="buttons">
|
||||||
<input class="btn btn-primary" type="submit" value="{{{o.__('Log in')}}}">
|
<input class="btn btn-primary" type="submit" value="{{{o.__('Log in')}}}">
|
||||||
|
Loading…
Reference in New Issue
Block a user