Wallet/src/js/controllers/preferencesLogs.js

25 lines
697 B
JavaScript
Raw Normal View History

2015-04-25 12:37:04 -03:00
'use strict';
angular.module('copayApp.controllers').controller('preferencesLogs',
2015-10-07 12:17:13 -03:00
function(historicLog) {
2015-04-25 21:08:19 -03:00
this.logs = historicLog.get();
this.sendLogs = function() {
2015-04-26 11:41:25 -03:00
var body = 'Copay Session Logs\n Be careful, this could contain sensitive private data\n\n';
body += '\n\n';
2015-04-25 21:08:19 -03:00
body += this.logs.map(function(v) {
return v.msg;
}).join('\n');
window.plugins.socialsharing.shareViaEmail(
body,
'Copay Logs',
null, // TO: must be null or an array
null, // CC: must be null or an array
null, // BCC: must be null or an array
null, // FILES: can be null, a string, or an array
function() {},
function() {}
);
2015-04-25 21:08:19 -03:00
};
});