Remove the "debug" button from request error alerts

Using the browser's console to debug failed requests is much more powerful
This commit is contained in:
Toby Zerner
2018-09-21 14:27:39 +09:30
parent 5ce702a5d0
commit 64686ef7a9
3 changed files with 1 additions and 48 deletions

View File

@ -1,9 +1,7 @@
import ItemList from './utils/ItemList';
import Alert from './components/Alert';
import Button from './components/Button';
import ModalManager from './components/ModalManager';
import AlertManager from './components/AlertManager';
import RequestErrorModal from './components/RequestErrorModal';
import Translator from './Translator';
import Store from './Store';
import Session from './Session';
@ -333,10 +331,7 @@ export default class Application {
error.alert = new Alert({
type: 'error',
children,
controls: app.forum.attribute('debug') ? [
<Button className="Button Button--link" onclick={this.showDebug.bind(this, error)}>Debug</Button>
] : undefined
children
});
try {
@ -351,16 +346,6 @@ export default class Application {
return deferred.promise;
}
/**
* @param {RequestError} error
* @private
*/
showDebug(error) {
this.alerts.dismiss(this.requestErrorAlert);
this.modal.show(new RequestErrorModal({error}));
}
/**
* Construct a URL to the route with the given name.
*