mirror of
https://github.com/usebruno/bruno.git
synced 2024-12-23 07:09:01 +01:00
chore: pr #766 ux polish
This commit is contained in:
parent
36f19ec7bc
commit
32b696da57
@ -2,6 +2,7 @@ import styled from 'styled-components';
|
||||
|
||||
const StyledWrapper = styled.div`
|
||||
font-size: 0.8125rem;
|
||||
color: ${(props) => props.theme.requestTabPanel.responseStatus};
|
||||
`;
|
||||
|
||||
export default StyledWrapper;
|
||||
|
@ -2,6 +2,7 @@ import React from 'react';
|
||||
import StyledWrapper from './StyledWrapper';
|
||||
import toast from 'react-hot-toast';
|
||||
import get from 'lodash/get';
|
||||
import { IconDownload } from '@tabler/icons';
|
||||
|
||||
const ResponseSave = ({ item }) => {
|
||||
const { ipcRenderer } = window;
|
||||
@ -21,9 +22,9 @@ const ResponseSave = ({ item }) => {
|
||||
};
|
||||
|
||||
return (
|
||||
<StyledWrapper className="ml-4">
|
||||
<button onClick={saveResponseToFile} disabled={!response.dataBuffer}>
|
||||
Save Response
|
||||
<StyledWrapper className="ml-4 flex items-center">
|
||||
<button onClick={saveResponseToFile} disabled={!response.dataBuffer} title="Save response to file">
|
||||
<IconDownload size={16} strokeWidth={1.5} />
|
||||
</button>
|
||||
</StyledWrapper>
|
||||
);
|
||||
|
@ -6,7 +6,7 @@ import StyledWrapper from './StyledWrapper';
|
||||
// Todo: text-error class is not getting pulled in for 500 errors
|
||||
const StatusCode = ({ status }) => {
|
||||
const getTabClassname = (status) => {
|
||||
return classnames('', {
|
||||
return classnames('ml-2', {
|
||||
'text-ok': status >= 100 && status < 200,
|
||||
'text-ok': status >= 200 && status < 300,
|
||||
'text-error': status >= 300 && status < 400,
|
||||
|
@ -113,10 +113,10 @@ const ResponsePane = ({ rightPaneWidth, item, collection }) => {
|
||||
</div>
|
||||
{!isLoading ? (
|
||||
<div className="flex flex-grow justify-end items-center">
|
||||
<ResponseSave item={item} />
|
||||
<StatusCode status={response.status} />
|
||||
<ResponseTime duration={response.duration} />
|
||||
<ResponseSize size={response.size} />
|
||||
<ResponseSave item={item} />
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user