forked from extern/egroupware
using now a domain-specific "egroupware" keyring, instead of default "mailvelope", which only works on localhost, plus improved instructions
This commit is contained in:
parent
8e8a3b7b61
commit
517286fdab
@ -4407,8 +4407,9 @@ app.classes.mail = AppJS.extend(
|
||||
{
|
||||
if (typeof mailvelope == 'undefined')
|
||||
{
|
||||
this.egw.message(this.egw.lang('You need to install Mailvelope plugin available for Chrome and Firefox and enable it for your domain.')+
|
||||
"\n"+this.egw.lang('Download from %1','<a href="https://www.mailvelope.com/">mailvelope.com</a>'), 'info');
|
||||
this.egw.message(this.egw.lang('You need to install Mailvelope plugin available for Chrome and Firefox from %1.','<a href="https://www.mailvelope.com/">mailvelope.com</a>')+"\n"+
|
||||
this.egw.lang('Add your domain as "%1" in options to list of email providers and enable API.',
|
||||
'*.'+this._mailvelopeDomain()), 'info');
|
||||
return;
|
||||
}
|
||||
var mimeType = this.et2.getWidgetById('mimeType');
|
||||
|
@ -858,13 +858,37 @@ var AppJS = Class.extend(
|
||||
var callback = _callback;
|
||||
var self = this;
|
||||
|
||||
mailvelope.getKeyring('mailvelope').then(function(_keyring)
|
||||
mailvelope.getKeyring('egroupware').then(function(_keyring)
|
||||
{
|
||||
callback.call(self, _keyring);
|
||||
},
|
||||
function(_err)
|
||||
{
|
||||
self.egw.message(_err.message, 'error');
|
||||
mailvelope.createKeyring('egroupware').then(function(_keyring)
|
||||
{
|
||||
self.egw.message(self.egw.lang('Keyring "%1" created.', self._mailvelopeDomain()+' (egroupware)')+"\n\n"+
|
||||
self.egw.lang('Please click on lock icon in lower right corner to create or import a key:')+"\n"+
|
||||
self.egw.lang("Go to Key Management and create a new key-pair or import your existing one.")+"\n\n"+
|
||||
self.egw.lang("You will NOT be able to send or receive encrypted mails before completing that step!"), 'info');
|
||||
|
||||
callback.call(self, _keyring);
|
||||
},
|
||||
function(_err)
|
||||
{
|
||||
self.egw.message(_err.message, 'error');
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Mailvelope uses Domain without first part: eg. "stylite.de" for "egw.stylite.de"
|
||||
*
|
||||
* @returns {string}
|
||||
*/
|
||||
_mailvelopeDomain: function()
|
||||
{
|
||||
var parts = document.location.hostname.split('.');
|
||||
if (parts.length > 1) parts.shift();
|
||||
return parts.join('.');
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user