import React, {Component, PropTypes} from 'react'; import {Tab, Tabs, TabList, TabPanel} from 'react-tabs'; import KeyValueEditor from './base/KeyValueEditor'; import RequestHeadersEditor from './editors/RequestHeadersEditor'; import ContentTypeDropdown from './dropdowns/ContentTypeDropdown'; import RenderedQueryString from './RenderedQueryString'; import BodyEditor from './editors/BodyEditor'; import AuthEditor from './editors/AuthEditor'; import RequestUrlBar from './RequestUrlBar.js'; import {MOD_SYM, getContentTypeName, getContentTypeFromHeaders} from '../../common/constants'; import {debounce} from '../../common/misc'; class RequestPane extends Component { render () { const { request, importFile, showPasswords, editorFontSize, editorLineWrapping, requestCreate, sendRequest, useBulkHeaderEditor, updateRequestUrl, updateRequestMethod, updateRequestBody, updateRequestParameters, updateRequestAuthentication, updateRequestHeaders, updateRequestContentType, updateSettingsUseBulkHeaderEditor } = this.props; if (!request) { return (
New Request {MOD_SYM}N
Switch Requests {MOD_SYM}P
Manage Cookies {MOD_SYM}K
Edit Environments {MOD_SYM}E
) } return (
) } } RequestPane.propTypes = { // Functions sendRequest: PropTypes.func.isRequired, requestCreate: PropTypes.func.isRequired, updateRequestUrl: PropTypes.func.isRequired, updateRequestMethod: PropTypes.func.isRequired, updateRequestBody: PropTypes.func.isRequired, updateRequestParameters: PropTypes.func.isRequired, updateRequestAuthentication: PropTypes.func.isRequired, updateRequestHeaders: PropTypes.func.isRequired, updateRequestContentType: PropTypes.func.isRequired, updateSettingsShowPasswords: PropTypes.func.isRequired, updateSettingsUseBulkHeaderEditor: PropTypes.func.isRequired, importFile: PropTypes.func.isRequired, // Other useBulkHeaderEditor: PropTypes.bool.isRequired, showPasswords: PropTypes.bool.isRequired, editorFontSize: PropTypes.number.isRequired, editorLineWrapping: PropTypes.bool.isRequired, // Optional request: PropTypes.object, }; export default RequestPane;