mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-02-25 00:55:03 +01:00
Show response body size
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { forwardRef } from 'react';
|
||||
import { Icon, IconProps } from './Icon';
|
||||
import { Button, ButtonProps } from './Button';
|
||||
import classnames from 'classnames';
|
||||
|
||||
type Props = Omit<IconProps, 'size'> & ButtonProps<typeof Button>;
|
||||
|
||||
@@ -10,7 +11,14 @@ export const IconButton = forwardRef<HTMLButtonElement, Props>(function IconButt
|
||||
) {
|
||||
return (
|
||||
<Button ref={ref} className="group" {...props}>
|
||||
<Icon icon={icon} spin={spin} className="text-gray-700 group-hover:text-gray-900" />
|
||||
<Icon
|
||||
icon={icon}
|
||||
spin={spin}
|
||||
className={classnames(
|
||||
'text-gray-700 group-hover:text-gray-900',
|
||||
props.disabled && 'opacity-70',
|
||||
)}
|
||||
/>
|
||||
</Button>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -64,7 +64,8 @@ export function ResponsePane({ requestId, error }: Props) {
|
||||
{response.status}
|
||||
{response.statusReason && ` ${response.statusReason}`}
|
||||
•
|
||||
{response.elapsed}ms
|
||||
{response.elapsed}ms •
|
||||
{Math.round(response.body.length / 1000)} KB
|
||||
</HStack>
|
||||
{contentType.includes('html') ? (
|
||||
<iframe
|
||||
|
||||
Reference in New Issue
Block a user