add send logs by email
This commit is contained in:
parent
55d8c00658
commit
3abfb65087
2 changed files with 25 additions and 4 deletions
|
|
@ -1,7 +1,22 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('preferencesLogs',
|
||||
function(historicLog) {
|
||||
this.logs = historicLog.get();
|
||||
console.log('[preferencesLogs.js.5:historicLog:]',this.logs); //TODO
|
||||
});
|
||||
function(historicLog, isCordova) {
|
||||
this.logs = historicLog.get();
|
||||
this.isCordova = isCordova;
|
||||
|
||||
this.sendLogs = function() {
|
||||
var body = 'Copay Session Logs\n Be careful, this could contain sensitive private data\n\n Copay v' + window.version + ' #' + window.commitHash;
|
||||
body += '\n\n'
|
||||
body += this.logs.map(function(v) {
|
||||
return v.msg;
|
||||
}).join('\n');
|
||||
|
||||
var properties = {
|
||||
subject: 'Copay Logs',
|
||||
body: body,
|
||||
isHtml: false
|
||||
};
|
||||
window.plugin.email.open(properties);
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue