mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-24 15:49:08 -04:00
Some small style things
This commit is contained in:
1 parent
26fb1e2714
commit
5b8aa7545d
4 files changed
+23
-7
No files matched your search
@@ -56,17 +56,19 @@ class RequestPane extends Component {
|
||||
</Tab>
|
||||
<Tab>
|
||||
<button>
|
||||
Params {request.params.length ? `(${request.params.length})` : ''}
|
||||
Params {request.params.length ? (
|
||||
<span className="txt-sm">({request.params.length})</span> ) : null}
|
||||
</button>
|
||||
</Tab>
|
||||
<Tab>
|
||||
<button>
|
||||
Auth {request.authentication.username ? <i className="fa fa-lock"></i> : ''}
|
||||
Auth {request.authentication.username ? <i className="fa fa-lock txt-sm"></i> : ''}
|
||||
</button>
|
||||
</Tab>
|
||||
<Tab>
|
||||
<button>
|
||||
Headers {request.headers.length ? `(${request.headers.length})` : ''}
|
||||
Headers {request.headers.length ? (
|
||||
<span className="txt-sm">({request.headers.length})</span> ) : null}
|
||||
</button>
|
||||
</Tab>
|
||||
</TabList>
|
||||
|
||||
@@ -47,7 +47,12 @@ class ResponsePane extends Component {
|
||||
updatePreviewMode={updatePreviewMode}
|
||||
/>
|
||||
</Tab>
|
||||
<Tab><button>Headers</button></Tab>
|
||||
<Tab>
|
||||
<button>
|
||||
Headers {response.headers.length ? (
|
||||
<span className="txt-sm">({response.headers.length})</span> ) : null}
|
||||
</button>
|
||||
</Tab>
|
||||
</TabList>
|
||||
<TabPanel>
|
||||
{response.error ? (
|
||||
|
||||
@@ -71,9 +71,14 @@ class App extends Component {
|
||||
const requestPaneWidth = requestPane.offsetWidth;
|
||||
const responsePaneWidth = responsePane.offsetWidth;
|
||||
const pixelOffset = e.clientX - requestPane.offsetLeft;
|
||||
const ratio = pixelOffset / (requestPaneWidth + responsePaneWidth);
|
||||
const paneWidth = Math.max(Math.min(ratio, 0.6), 0.4);
|
||||
|
||||
let paneWidth = pixelOffset / (requestPaneWidth + responsePaneWidth);
|
||||
|
||||
if (paneWidth < 0.1) {
|
||||
paneWidth = 0.01;
|
||||
} else if (paneWidth > 0.9) {
|
||||
paneWidth = 0.99;
|
||||
}
|
||||
|
||||
this.setState({paneWidth});
|
||||
} else if (this.state.draggingSidebar) {
|
||||
this.refs.sidebar.resize(e.clientX);
|
||||
|
||||
@@ -119,6 +119,10 @@ i.fa {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.pad {
|
||||
box-sizing: border-box;
|
||||
padding: $padding-md;
|
||||
|
||||
Reference in new issue
Block a user