chore: minor url bar alignment fixes and refactor (#6714)

This commit is contained in:
Bijin A B
2026-01-07 08:20:02 +05:30
committed by GitHub
parent dcbf38bf61
commit c8371410c2
4 changed files with 11 additions and 12 deletions

View File

@@ -6,7 +6,6 @@ const StyledWrapper = styled.div`
display: flex;
align-items: center;
height: 100%;
margin-right: 0.5rem;
}
.method-dropdown-trigger {

View File

@@ -300,7 +300,7 @@ const GrpcQueryUrl = ({ item, collection, handleRun }) => {
<span className="text-xs font-medium" style={{ color: theme.request.grpc }}>gRPC</span>
</div>
</div>
<div className="flex items-center w-full input-container h-full relative overflow-auto pr-2">
<div className="flex items-center w-full input-container h-full relative overflow-auto">
<SingleLineEditor
ref={editorRef}
value={url}
@@ -315,7 +315,7 @@ const GrpcQueryUrl = ({ item, collection, handleRun }) => {
</div>
<div className="flex items-center h-full mr-2 gap-3" id="send-request">
<div className="flex items-center h-full mx-2 gap-3" id="send-request">
<MethodDropdown
grpcMethods={grpcMethods}
selectedGrpcMethod={selectedGrpcMethod}

View File

@@ -375,7 +375,7 @@ const QueryUrl = ({ item, collection, handleRun }) => {
</div>
<div
id="request-url"
className="h-full w-full flex flex-row input-container overflow-auto pr-2"
className="h-full w-full flex flex-row input-container overflow-auto"
>
<SingleLineEditor
ref={editorRef}
@@ -393,10 +393,10 @@ const QueryUrl = ({ item, collection, handleRun }) => {
/>
</div>
<div className="flex items-center h-full mr-2 cursor-pointer" id="send-request" onClick={handleRun}>
<div className="flex items-center h-full mx-2 gap-3 cursor-pointer" id="send-request" onClick={handleRun}>
<div
title="Generate Code"
className="infotip mr-3"
className="infotip"
onClick={(e) => {
handleGenerateCode(e);
}}
@@ -406,7 +406,7 @@ const QueryUrl = ({ item, collection, handleRun }) => {
</div>
<div
title="Save Request"
className="infotip mr-3"
className="infotip"
onClick={(e) => {
e.stopPropagation();
if (!hasChanges) return;

View File

@@ -123,7 +123,7 @@ const WsQueryUrl = ({ item, collection, handleRun }) => {
return (
<StyledWrapper>
<div className="flex items-center h-full">
<div className="flex items-center input-container flex-1 w-full input-container pr-2 h-full relative">
<div className="flex items-center input-container flex-1 w-full h-full relative">
<div className="flex items-center justify-center px-[10px]">
<span className="text-xs font-medium method-ws">WS</span>
</div>
@@ -138,9 +138,9 @@ const WsQueryUrl = ({ item, collection, handleRun }) => {
collection={collection}
item={item}
/>
<div className="flex items-center h-full mr-2 cursor-pointer">
<div className="flex items-center h-full cursor-pointer gap-3 mx-3">
<div
className="infotip mr-3"
className="infotip"
onClick={(e) => {
e.stopPropagation();
if (!hasChanges) return;
@@ -159,7 +159,7 @@ const WsQueryUrl = ({ item, collection, handleRun }) => {
</div>
{connectionStatus === 'connected' && (
<div className="connection-controls relative flex items-center h-full gap-3 mr-3">
<div className="connection-controls relative flex items-center h-full">
<div className="infotip" onClick={(e) => handleDisconnect(e, true)}>
<IconPlugConnectedX
color={theme.colors.text.danger}
@@ -173,7 +173,7 @@ const WsQueryUrl = ({ item, collection, handleRun }) => {
)}
{connectionStatus !== 'connected' && (
<div className="connection-controls relative flex items-center h-full gap-3 mr-3">
<div className="connection-controls relative flex items-center h-full">
<div className="infotip" onClick={handleConnect}>
<IconPlugConnected
className={classnames('cursor-pointer', {