mirror of
https://github.com/moparisthebest/mail
synced 2024-11-21 16:35:04 -05:00
Merge pull request #107 from whiteout-io/dev/WO-490
[WO-490] add bug reporting to error dialog
This commit is contained in:
commit
1ee280c74e
@ -61,7 +61,8 @@ define(function(require) {
|
||||
// verifiy public key string
|
||||
if (publicKeyArmored.indexOf('-----BEGIN PGP PUBLIC KEY BLOCK-----') < 0) {
|
||||
$scope.onError({
|
||||
errMsg: 'Invalid public key!'
|
||||
showBugReporter: false,
|
||||
message: 'Invalid public key!'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
@ -48,6 +48,7 @@ define(function(require) {
|
||||
|
||||
function onPassphraseChanged(err, newPrivateKeyArmored) {
|
||||
if (err) {
|
||||
err.showBugReporter = false;
|
||||
$scope.onError(err);
|
||||
return;
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ define(function(require) {
|
||||
positiveBtnStr: options.positiveBtnStr || 'Ok',
|
||||
negativeBtnStr: options.negativeBtnStr || 'Cancel',
|
||||
showNegativeBtn: options.showNegativeBtn || false,
|
||||
showBugReporter: (typeof options.showBugReporter !== 'undefined' ? options.showBugReporter : !options.title), // if title is set, presume it's not an error by default
|
||||
callback: options.callback
|
||||
};
|
||||
// don't call apply for synchronous calls
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
.control {
|
||||
button {
|
||||
width: 100px;
|
||||
min-width: 100px;
|
||||
}
|
||||
}
|
||||
}
|
@ -8,7 +8,9 @@
|
||||
<p>{{state.dialog.message}} <a ng-show="state.dialog.faqLink" href="{{state.dialog.faqLink}}" target="_blank">Learn more</a></p>
|
||||
<div class="control">
|
||||
<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>
|
||||
<!-- only show bug report button if we can actually report a bug, i.e. the writer is attached to the scope -->
|
||||
<button wo-touch="confirm(true)" class="btn" ng-show="!state.writer || !state.dialog.showBugReporter">{{state.dialog.positiveBtnStr}}</button>
|
||||
<button wo-touch="confirm(true); state.writer.reportBug()" class="btn" ng-show="state.writer && state.dialog.showBugReporter">Report bug</button>
|
||||
</div>
|
||||
</div><!-- /.content -->
|
||||
</div><!-- /.lightbox-body -->
|
@ -18,7 +18,7 @@
|
||||
<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.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>
|
||||
</ul>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user