mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-25 10:08:15 +01:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb10910d20 | ||
|
|
6ba83d424d |
@@ -71,7 +71,7 @@ export const RequestMethodDropdown = memo(function RequestMethodDropdown({
|
||||
onChange={handleChange}
|
||||
>
|
||||
<Button size="xs" className={classNames(className, 'text-text-subtle hover:text')}>
|
||||
<HttpMethodTag request={request} />
|
||||
<HttpMethodTag request={request} noAlias />
|
||||
</Button>
|
||||
</RadioDropdown>
|
||||
);
|
||||
|
||||
@@ -8,6 +8,7 @@ interface Props {
|
||||
request: HttpRequest | GrpcRequest | WebsocketRequest;
|
||||
className?: string;
|
||||
short?: boolean;
|
||||
noAlias?: boolean;
|
||||
}
|
||||
|
||||
const methodNames: Record<string, string> = {
|
||||
@@ -24,9 +25,9 @@ const methodNames: Record<string, string> = {
|
||||
websocket: 'WS',
|
||||
};
|
||||
|
||||
export const HttpMethodTag = memo(function HttpMethodTag({ request, className, short }: Props) {
|
||||
export const HttpMethodTag = memo(function HttpMethodTag({ request, className, short, noAlias }: Props) {
|
||||
const method =
|
||||
request.model === 'http_request' && request.bodyType === 'graphql'
|
||||
request.model === 'http_request' && (request.bodyType === 'graphql' && !noAlias)
|
||||
? 'graphql'
|
||||
: request.model === 'grpc_request'
|
||||
? 'grpc'
|
||||
|
||||
Reference in New Issue
Block a user