mirror of
https://github.com/Kong/insomnia.git
synced 2026-05-18 21:55:38 -04:00
Fixed disabled styles
This commit is contained in:
@@ -37,7 +37,7 @@ export function newBodyRaw (rawBody, contentType) {
|
||||
export function newBodyFormUrlEncoded (parameters) {
|
||||
// Remove any properties (eg. fileName) that might not fit
|
||||
parameters = (parameters || []).map(
|
||||
p => ({name: p.name, value: p.value})
|
||||
p => ({name: p.name, value: p.value, disabled: p.disabled})
|
||||
);
|
||||
|
||||
return {
|
||||
|
||||
@@ -90,6 +90,10 @@ class RequestPane extends Component {
|
||||
)
|
||||
}
|
||||
|
||||
let numBodyParams = 0;
|
||||
if (request.body && request.body.params) {
|
||||
numBodyParams = request.body.params.filter(p => !p.disabled).length;
|
||||
}
|
||||
const numParameters = request.parameters.filter(p => !p.disabled).length;
|
||||
const numHeaders = request.headers.filter(h => !h.disabled).length;
|
||||
const hasAuth = !request.authentication.disabled && request.authentication.username;
|
||||
@@ -111,6 +115,8 @@ class RequestPane extends Component {
|
||||
<Tab onClick={() => trackEvent('Request Pane', 'View', 'Body')}>
|
||||
<button>
|
||||
{getContentTypeName(request.body.mimeType || '')}
|
||||
{" "}
|
||||
{numBodyParams ? <span className="txt-sm">({numBodyParams})</span> : null}
|
||||
</button>
|
||||
<ContentTypeDropdown updateRequestMimeType={updateRequestMimeType}/>
|
||||
</Tab>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import React, {PropTypes, Component} from 'react';
|
||||
import KeyValueEditor from '../../base/KeyValueEditor';
|
||||
import {trackEvent} from '../../../../analytics/index';
|
||||
import {CONTENT_TYPE_FORM_DATA} from '../../../../common/constants';
|
||||
|
||||
class FormEditor extends Component {
|
||||
render () {
|
||||
@@ -22,9 +21,6 @@ class FormEditor extends Component {
|
||||
pairs={parameters}
|
||||
multipart={true}
|
||||
/>
|
||||
<div className="faded faint txt-sm italic pad no-pad-bottom">
|
||||
Sends as <code>{CONTENT_TYPE_FORM_DATA}</code>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import React, {PropTypes, Component} from 'react';
|
||||
import KeyValueEditor from '../../base/KeyValueEditor';
|
||||
import {trackEvent} from '../../../../analytics/index';
|
||||
import {CONTENT_TYPE_FORM_URLENCODED} from '../../../../common/constants';
|
||||
|
||||
class UrlEncodedEditor extends Component {
|
||||
render () {
|
||||
@@ -19,9 +18,6 @@ class UrlEncodedEditor extends Component {
|
||||
onDelete={() => trackEvent('Url Encoded Editor', 'Delete')}
|
||||
pairs={parameters}
|
||||
/>
|
||||
<div className="faded faint txt-sm italic pad no-pad-bottom">
|
||||
Sends as <code>{CONTENT_TYPE_FORM_URLENCODED}</code>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -87,7 +87,7 @@ label > .form-control,
|
||||
}
|
||||
}
|
||||
|
||||
.btn:disabled {
|
||||
*:disabled {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ code, pre, .monospace {
|
||||
}
|
||||
|
||||
.faded {
|
||||
opacity: 0.5;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.outlined {
|
||||
|
||||
Reference in New Issue
Block a user