mirror of
https://github.com/moparisthebest/mail
synced 2024-11-22 17:02:17 -05:00
[WO-490] add bug reporting to error dialog
This commit is contained in:
parent
6bc2ee54f3
commit
275a602274
@ -89,6 +89,7 @@ define(function(require) {
|
|||||||
message: message,
|
message: message,
|
||||||
positiveBtnStr: str.updatePublicKeyPosBtn,
|
positiveBtnStr: str.updatePublicKeyPosBtn,
|
||||||
negativeBtnStr: str.updatePublicKeyNegBtn,
|
negativeBtnStr: str.updatePublicKeyNegBtn,
|
||||||
|
showBugReporter: false,
|
||||||
showNegativeBtn: true,
|
showNegativeBtn: true,
|
||||||
callback: callback
|
callback: callback
|
||||||
});
|
});
|
||||||
|
@ -65,6 +65,7 @@ define(function(require) {
|
|||||||
$scope.state.account.toggle(false);
|
$scope.state.account.toggle(false);
|
||||||
$scope.$apply();
|
$scope.$apply();
|
||||||
$scope.onError({
|
$scope.onError({
|
||||||
|
showBugReporter: false,
|
||||||
title: 'Success',
|
title: 'Success',
|
||||||
message: 'Exported keypair to file.'
|
message: 'Exported keypair to file.'
|
||||||
});
|
});
|
||||||
|
@ -61,7 +61,8 @@ define(function(require) {
|
|||||||
// verifiy public key string
|
// verifiy public key string
|
||||||
if (publicKeyArmored.indexOf('-----BEGIN PGP PUBLIC KEY BLOCK-----') < 0) {
|
if (publicKeyArmored.indexOf('-----BEGIN PGP PUBLIC KEY BLOCK-----') < 0) {
|
||||||
$scope.onError({
|
$scope.onError({
|
||||||
errMsg: 'Invalid public key!'
|
showBugReporter: false,
|
||||||
|
message: 'Invalid public key!'
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@ define(function(require) {
|
|||||||
$scope.importKey = function() {
|
$scope.importKey = function() {
|
||||||
if (!$scope.state.agree) {
|
if (!$scope.state.agree) {
|
||||||
$scope.onError({
|
$scope.onError({
|
||||||
|
showBugReporter: false,
|
||||||
message: termsMsg
|
message: termsMsg
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@ -42,6 +43,7 @@ define(function(require) {
|
|||||||
$scope.setPassphrase = function() {
|
$scope.setPassphrase = function() {
|
||||||
if (!$scope.state.agree) {
|
if (!$scope.state.agree) {
|
||||||
$scope.onError({
|
$scope.onError({
|
||||||
|
showBugReporter: false,
|
||||||
message: termsMsg
|
message: termsMsg
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
@ -32,7 +32,10 @@ define(function(require) {
|
|||||||
|
|
||||||
$scope.verifyRecoveryToken = function(callback) {
|
$scope.verifyRecoveryToken = function(callback) {
|
||||||
if (!$scope.recoveryToken) {
|
if (!$scope.recoveryToken) {
|
||||||
$scope.onError(new Error('Please set the recovery token!'));
|
$scope.onError({
|
||||||
|
message: 'Please set the recovery token!',
|
||||||
|
showBugReporter: false
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,7 +68,10 @@ define(function(require) {
|
|||||||
var inputCode = '' + $scope.code0 + $scope.code1 + $scope.code2 + $scope.code3 + $scope.code4 + $scope.code5;
|
var inputCode = '' + $scope.code0 + $scope.code1 + $scope.code2 + $scope.code3 + $scope.code4 + $scope.code5;
|
||||||
|
|
||||||
if (!inputCode) {
|
if (!inputCode) {
|
||||||
$scope.onError(new Error('Please enter the keychain code!'));
|
$scope.onError({
|
||||||
|
message: 'Please enter the keychain code!',
|
||||||
|
showBugReporter: false
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,8 @@ define(function(require) {
|
|||||||
// show message
|
// show message
|
||||||
$scope.onError({
|
$scope.onError({
|
||||||
title: 'Info',
|
title: 'Info',
|
||||||
message: 'Your PGP key has already been synced.'
|
message: 'Your PGP key has already been synced.',
|
||||||
|
showBugReporter: false
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -181,7 +182,8 @@ define(function(require) {
|
|||||||
// show success message
|
// show success message
|
||||||
$scope.onError({
|
$scope.onError({
|
||||||
title: 'Success',
|
title: 'Success',
|
||||||
message: 'Whiteout Keychain setup successful!'
|
message: 'Whiteout Keychain setup successful!',
|
||||||
|
showBugReporter: false
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -74,7 +74,8 @@ define(function(require) {
|
|||||||
$scope.$apply();
|
$scope.$apply();
|
||||||
$scope.onError({
|
$scope.onError({
|
||||||
title: 'Success',
|
title: 'Success',
|
||||||
message: 'Passphrase change complete.'
|
message: 'Passphrase change complete.',
|
||||||
|
showBugReporter: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -21,6 +21,7 @@ define(function(require) {
|
|||||||
positiveBtnStr: options.positiveBtnStr || 'Ok',
|
positiveBtnStr: options.positiveBtnStr || 'Ok',
|
||||||
negativeBtnStr: options.negativeBtnStr || 'Cancel',
|
negativeBtnStr: options.negativeBtnStr || 'Cancel',
|
||||||
showNegativeBtn: options.showNegativeBtn || false,
|
showNegativeBtn: options.showNegativeBtn || false,
|
||||||
|
showBugReporter: (typeof options.showBugReporter !== 'undefined' ? options.showBugReporter : true),
|
||||||
callback: options.callback
|
callback: options.callback
|
||||||
};
|
};
|
||||||
// don't call apply for synchronous calls
|
// don't call apply for synchronous calls
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
.control {
|
.control {
|
||||||
button {
|
button {
|
||||||
width: 100px;
|
min-width: 100px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -6,7 +6,7 @@
|
|||||||
<li class="google enabled" popover="#google-info" wo-touch="connectToGoogle()">
|
<li class="google enabled" popover="#google-info" wo-touch="connectToGoogle()">
|
||||||
<div><img src="img/google_logo.png" alt="Google Mail"></div>
|
<div><img src="img/google_logo.png" alt="Google Mail"></div>
|
||||||
</li>
|
</li>
|
||||||
<li class="whiteout disabled" popover="#whiteout-info" wo-touch="onError({message:'Whiteout Mailbox coming soon!', sync:true})">
|
<li class="whiteout disabled" popover="#whiteout-info" wo-touch="onError({message:'Whiteout Mailbox coming soon!', sync:true, showBugReporter:false})">
|
||||||
<div><img src="img/whiteout_logo.svg" alt="Whiteout Mailbox"></div>
|
<div><img src="img/whiteout_logo.svg" alt="Whiteout Mailbox"></div>
|
||||||
</li>
|
</li>
|
||||||
<li class="tonline" popover="#tonline-info" wo-touch="connectToTonline()">
|
<li class="tonline" popover="#tonline-info" wo-touch="connectToTonline()">
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<p>{{state.dialog.message}} <a ng-show="state.dialog.faqLink" href="{{state.dialog.faqLink}}" target="_blank">Learn more</a></p>
|
<p>{{state.dialog.message}} <a ng-show="state.dialog.faqLink" href="{{state.dialog.faqLink}}" target="_blank">Learn more</a></p>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
|
<button wo-touch="confirm(true); state.writer.reportBug()" class="btn btn-alt" ng-show="state.writer && state.dialog.showBugReporter">Report this bug</button><!-- only show if we can actually report a bug, i.e. the writer is attached to the scope -->
|
||||||
<button wo-touch="confirm(false)" class="btn btn-alt" ng-show="state.dialog.showNegativeBtn">{{state.dialog.negativeBtnStr}}</button>
|
<button wo-touch="confirm(false)" class="btn btn-alt" ng-show="state.dialog.showNegativeBtn">{{state.dialog.negativeBtnStr}}</button>
|
||||||
<button wo-touch="confirm(true)" class="btn">{{state.dialog.positiveBtnStr}}</button>
|
<button wo-touch="confirm(true)" class="btn">{{state.dialog.positiveBtnStr}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<li><a href="#" wo-touch="state.account.toggle(true); $event.preventDefault()">Account</a></li>
|
<li><a href="#" wo-touch="state.account.toggle(true); $event.preventDefault()">Account</a></li>
|
||||||
<li><a href="#" wo-touch="state.contacts.toggle(true); $event.preventDefault()">Contacts</a></li>
|
<li><a href="#" wo-touch="state.contacts.toggle(true); $event.preventDefault()">Contacts</a></li>
|
||||||
<li><a href="#" wo-touch="state.privateKeyUpload.toggle(true); $event.preventDefault()">Key sync (experimental)</a></li>
|
<li><a href="#" wo-touch="state.privateKeyUpload.toggle(true); $event.preventDefault()">Key sync (experimental)</a></li>
|
||||||
<li><a href="#" wo-touch="state.writer.reportBug(); $event.preventDefault()">Report a bug</button>
|
<li><a href="#" wo-touch="state.writer.reportBug(); $event.preventDefault()">Report a bug</a></li>
|
||||||
<li><a href="#" wo-touch="state.about.toggle(true); $event.preventDefault()">About</a></li>
|
<li><a href="#" wo-touch="state.about.toggle(true); $event.preventDefault()">About</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user