fix(ui) - headers two line, fetch body parse, live session msg two lines

This commit is contained in:
Shekar Siri 2021-10-05 17:51:24 +05:30
parent 3edf00c842
commit fafb40bd23
5 changed files with 14 additions and 3 deletions

View file

@ -26,12 +26,14 @@ export default class FetchDetails extends React.PureComponent {
try {
jsonPayload = typeof payload === 'string' ? JSON.parse(payload) : payload
requestHeaders = jsonPayload.headers
jsonPayload.body = typeof jsonPayload.body === 'string' ? JSON.parse(jsonPayload.body) : jsonPayload.body
delete jsonPayload.headers
} catch (e) {}
try {
jsonResponse = typeof response === 'string' ? JSON.parse(response) : response;
responseHeaders = jsonResponse.headers
jsonResponse.body = typeof jsonResponse.body === 'string' ? JSON.parse(jsonResponse.body) : jsonResponse.body
delete jsonResponse.headers
} catch (e) {}

View file

@ -1,5 +1,5 @@
import React from 'react'
import { NoContent } from 'UI'
import { NoContent, TextEllipsis } from 'UI'
import stl from './headers.css'
function Headers(props) {
@ -19,7 +19,9 @@ function Headers(props) {
Object.keys(props.requestHeaders).map(h => (
<div className={stl.row}>
<div className="mr-2 font-medium">{h}:</div>
<div>{props.requestHeaders[h]}</div>
<div className="flex-1">
<TextEllipsis text={props.requestHeaders[h]} />
</div>
</div>
))
}

View file

@ -6,4 +6,8 @@
&:hover {
background-color: $active-blue;
}
& div:last-child {
max-width: 80%;
}
}

View file

@ -1,4 +1,7 @@
.text {
color: $gray-light;
font-size: 40px;
max-width: 680px;
line-height: 48px;
text-align: center;
}

View file

@ -7,5 +7,5 @@ interface Props {
}
export default function LiveStatusText({ text }: Props) {
return <div className={ovStl.overlay}><span className={stl.text}>{text}</span></div>
return <div className={ovStl.overlay}><div className={stl.text}>{text}</div></div>
}