mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-23 00:58:32 +02:00
Minor style updates
This commit is contained in:
Binary file not shown.
@@ -55,7 +55,7 @@ export function RequestPane({ fullHeight, className }: Props) {
|
|||||||
defaultValue="body"
|
defaultValue="body"
|
||||||
label="Request body"
|
label="Request body"
|
||||||
>
|
>
|
||||||
<TabContent value="headers" className="pl-2">
|
<TabContent value="headers">
|
||||||
<PairEditor
|
<PairEditor
|
||||||
key={activeRequest.id}
|
key={activeRequest.id}
|
||||||
pairs={activeRequest.headers}
|
pairs={activeRequest.headers}
|
||||||
|
|||||||
@@ -70,15 +70,13 @@ export const ResponsePane = memo(function ResponsePane({ className }: Props) {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<HStack alignItems="center" className="ml-auto h-8">
|
<HStack alignItems="center" className="ml-auto h-8">
|
||||||
<IconButton
|
|
||||||
title={viewMode === 'pretty' ? 'View Raw' : 'View Prettified'}
|
|
||||||
icon={viewMode === 'pretty' ? 'eye' : 'code'}
|
|
||||||
size="sm"
|
|
||||||
className="ml-1"
|
|
||||||
onClick={() => setViewMode((m) => (m === 'pretty' ? 'raw' : 'pretty'))}
|
|
||||||
/>
|
|
||||||
<Dropdown
|
<Dropdown
|
||||||
items={[
|
items={[
|
||||||
|
{
|
||||||
|
label: viewMode === 'pretty' ? 'View Raw' : 'View Prettified',
|
||||||
|
onSelect: () => setViewMode((m) => (m === 'pretty' ? 'raw' : 'pretty')),
|
||||||
|
},
|
||||||
|
'-----',
|
||||||
{
|
{
|
||||||
label: 'Clear Response',
|
label: 'Clear Response',
|
||||||
onSelect: deleteResponse.mutate,
|
onSelect: deleteResponse.mutate,
|
||||||
@@ -100,7 +98,7 @@ export const ResponsePane = memo(function ResponsePane({ className }: Props) {
|
|||||||
<DropdownMenuTrigger>
|
<DropdownMenuTrigger>
|
||||||
<IconButton
|
<IconButton
|
||||||
title="Show response history"
|
title="Show response history"
|
||||||
icon="clock"
|
icon="triangleDown"
|
||||||
className="ml-auto"
|
className="ml-auto"
|
||||||
size="sm"
|
size="sm"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ export default function Workspace() {
|
|||||||
{activeRequest?.name}
|
{activeRequest?.name}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex-1 flex justify-end -mr-2">
|
<div className="flex-1 flex justify-end -mr-2">
|
||||||
|
<IconButton size="sm" title="" icon="magnifyingGlass" />
|
||||||
<IconButton size="sm" title="" icon="gear" />
|
<IconButton size="sm" title="" icon="gear" />
|
||||||
</div>
|
</div>
|
||||||
</HStack>
|
</HStack>
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import {
|
|||||||
UpdateIcon,
|
UpdateIcon,
|
||||||
RowsIcon,
|
RowsIcon,
|
||||||
MagicWandIcon,
|
MagicWandIcon,
|
||||||
|
MagnifyingGlassIcon,
|
||||||
} from '@radix-ui/react-icons';
|
} from '@radix-ui/react-icons';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
|
|
||||||
@@ -50,7 +51,9 @@ const icons = {
|
|||||||
triangleRight: TriangleRightIcon,
|
triangleRight: TriangleRightIcon,
|
||||||
update: UpdateIcon,
|
update: UpdateIcon,
|
||||||
magicWand: MagicWandIcon,
|
magicWand: MagicWandIcon,
|
||||||
|
magnifyingGlass: MagnifyingGlassIcon,
|
||||||
x: Cross2Icon,
|
x: Cross2Icon,
|
||||||
|
empty: () => <span />,
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface IconProps {
|
export interface IconProps {
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ export const IconButton = forwardRef<HTMLButtonElement, Props>(function IconButt
|
|||||||
onClick,
|
onClick,
|
||||||
className,
|
className,
|
||||||
iconClassName,
|
iconClassName,
|
||||||
|
tabIndex,
|
||||||
size = 'md',
|
size = 'md',
|
||||||
iconSize,
|
iconSize,
|
||||||
...props
|
...props
|
||||||
@@ -32,6 +33,9 @@ export const IconButton = forwardRef<HTMLButtonElement, Props>(function IconButt
|
|||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
ref={ref}
|
ref={ref}
|
||||||
|
aria-hidden={icon === 'empty'}
|
||||||
|
disabled={icon === 'empty'}
|
||||||
|
tabIndex={tabIndex ?? icon === 'empty' ? -1 : undefined}
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
if (showConfirm) setConfirmed();
|
if (showConfirm) setConfirmed();
|
||||||
onClick?.(e);
|
onClick?.(e);
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ function FormRow({
|
|||||||
}) {
|
}) {
|
||||||
const { id } = pairContainer;
|
const { id } = pairContainer;
|
||||||
return (
|
return (
|
||||||
<div className="group grid grid-cols-[1fr_1fr_2.5rem] grid-rows-1 gap-2 items-center">
|
<div className="group grid grid-cols-[1fr_1fr_auto] grid-rows-1 gap-2 items-center">
|
||||||
<Input
|
<Input
|
||||||
hideLabel
|
hideLabel
|
||||||
containerClassName={classnames(isLast && 'border-dashed')}
|
containerClassName={classnames(isLast && 'border-dashed')}
|
||||||
@@ -118,7 +118,7 @@ function FormRow({
|
|||||||
placeholder={isLast ? 'new value' : 'value'}
|
placeholder={isLast ? 'new value' : 'value'}
|
||||||
useEditor={{ useTemplating: true, contentType: 'text/plain' }}
|
useEditor={{ useTemplating: true, contentType: 'text/plain' }}
|
||||||
/>
|
/>
|
||||||
{onDelete && (
|
{onDelete ? (
|
||||||
<IconButton
|
<IconButton
|
||||||
icon="trash"
|
icon="trash"
|
||||||
title="Delete header"
|
title="Delete header"
|
||||||
@@ -126,6 +126,8 @@ function FormRow({
|
|||||||
tabIndex={-1}
|
tabIndex={-1}
|
||||||
className={classnames('opacity-0 group-hover:opacity-100')}
|
className={classnames('opacity-0 group-hover:opacity-100')}
|
||||||
/>
|
/>
|
||||||
|
) : (
|
||||||
|
<IconButton title="" icon="empty" />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user