import React, {PropTypes, Component} from 'react'; import {Tab, Tabs, TabList, TabPanel} from 'react-tabs' import StatusTag from './StatusTag'; import SizeTag from './SizeTag'; import TimeTag from './TimeTag'; import PreviewModeDropdown from './PreviewModeDropdown'; import ResponseBodyViewer from './ResponseBodyViewer'; import ResponseHeadersViewer from './ResponseHeadersViewer'; import {getPreviewModeName} from '../lib/previewModes'; import {PREVIEW_MODE_SOURCE} from '../lib/previewModes'; import {REQUEST_TIME_TO_SHOW_COUNTER} from '../lib/constants'; import {MOD_SYM} from '../lib/constants'; class ResponsePane extends Component { render () { const { response, request, previewMode, updatePreviewMode, loadingRequests, editorLineWrapping, editorFontSize } = this.props; const loadStartTime = loadingRequests[request ? request._id : '__NONE__']; let timer = null; if (loadStartTime) { // Set a timer to update the UI again soon setTimeout(() => { this.forceUpdate(); }, 30); // NOTE: We subtract 200ms because the request has some time padding on either end const elapsedTime = Math.round((Date.now() - loadStartTime - 200) / 100) / 10; timer = (
Send Request | {MOD_SYM}Enter |
Switch Requests | {MOD_SYM}P |
Focus Url Bar | {MOD_SYM}L |