From 67d8bbc1546432314cb08fcf4fa9eee84aa02f1a Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Sat, 25 Feb 2023 23:08:19 -0800 Subject: [PATCH] Show response body size --- src-web/components/IconButton.tsx | 10 +++++++++- src-web/components/ResponsePane.tsx | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src-web/components/IconButton.tsx b/src-web/components/IconButton.tsx index 3ddad745..acb73418 100644 --- a/src-web/components/IconButton.tsx +++ b/src-web/components/IconButton.tsx @@ -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 & ButtonProps; @@ -10,7 +11,14 @@ export const IconButton = forwardRef(function IconButt ) { return ( ); }); diff --git a/src-web/components/ResponsePane.tsx b/src-web/components/ResponsePane.tsx index 4768a884..9f5b10f8 100644 --- a/src-web/components/ResponsePane.tsx +++ b/src-web/components/ResponsePane.tsx @@ -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 {contentType.includes('html') ? (