mirror of
https://github.com/moparisthebest/mail
synced 2024-11-25 10:22:18 -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
|
// 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;
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,7 @@ define(function(require) {
|
|||||||
|
|
||||||
function onPassphraseChanged(err, newPrivateKeyArmored) {
|
function onPassphraseChanged(err, newPrivateKeyArmored) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
err.showBugReporter = false;
|
||||||
$scope.onError(err);
|
$scope.onError(err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -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 : !options.title), // if title is set, presume it's not an error by default
|
||||||
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -8,7 +8,9 @@
|
|||||||
<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(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>
|
<!-- 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>
|
||||||
</div><!-- /.content -->
|
</div><!-- /.content -->
|
||||||
</div><!-- /.lightbox-body -->
|
</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.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