Skip to content

Commit 1ed1b91

Browse files
style bug fixed
1 parent 5b5cde8 commit 1ed1b91

4 files changed

Lines changed: 22 additions & 25 deletions

File tree

src/renderer/src/components/app/collections/request/response/content/EmptyResponse.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Empty from "@/components/ui/empty";
22

33
const EmptyResponse = () => {
44
return (
5-
<div className="w-full h-full p-2.5 pt-0">
5+
<div className="w-full h-full p-2.5">
66
<Empty label="Send a request to see the response here" />
77
</div>
88
);

src/renderer/src/components/app/header/search/SearchResultItem.tsx

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
import { useCallback } from "react";
22
import { cn } from "@/lib/utils";
3-
import type {
4-
RequestListItemInterface,
5-
THTTPMethods,
6-
} from "@shared/types/request-response.types";
7-
import { FolderClosed as FolderIcon } from "lucide-react";
8-
import RequestMethodTag from "@/components/app/RequestMethodTag";
3+
import type { RequestListItemInterface } from "@shared/types/request-response.types";
94
import { useAppDispatch } from "@/context/redux/hooks";
105
import { handleChangeSelectedTab } from "@/context/redux/request-response/request-response-slice";
116
import { expendParentsOnSelectedChangeTabsData } from "@/context/redux/request-response/thunks/tab-list";
7+
import CollectionTabType from "@/components/app/tab-sidebar/CollectionTabType";
128

139
interface Props extends RequestListItemInterface {
1410
selectedTab?: string | null;
@@ -35,7 +31,7 @@ const SearchResultItem = ({
3531
return (
3632
<div
3733
className={cn(
38-
"w-full h-8 cursor-pointer px-3 shrink-0 border-b border-accent",
34+
"w-full h-9 cursor-pointer px-3 shrink-0 border-b border-accent",
3935
{
4036
"bg-accent hover:bg-accent/80": selectedTab === id,
4137
"bg-transparent hover:bg-accent/50": selectedTab !== id,
@@ -52,16 +48,12 @@ const SearchResultItem = ({
5248
>
5349
<div className="w-full h-full flex items-center gap-2 px-1">
5450
{(children || method) && (
55-
<div className="flex justify-center items-center w-12 shrink-0">
56-
{children && <FolderIcon size={16} />}
57-
{method && (
58-
<RequestMethodTag
59-
method={method as THTTPMethods}
60-
shortCut={true}
61-
className={"w-full"}
62-
/>
63-
)}
64-
</div>
51+
<CollectionTabType
52+
haveChildren={Boolean(children)}
53+
isShort={true}
54+
method={method}
55+
isFlexibleSize={false}
56+
/>
6557
)}
6658
<div className="flex items-center w-full min-w-0">
6759
<span className="w-full text-sm whitespace-nowrap overflow-hidden text-ellipsis cursor-pointer select-none">

src/renderer/src/components/app/tab-sidebar/horizontal/TabItem.tsx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,22 +142,27 @@ const TabItem = memo(({ id, index, className, ...props }: Props) => {
142142
>
143143
<CollectionTabType
144144
haveChildren={Boolean(children)}
145-
isShort={false}
145+
isShort={true}
146146
method={method}
147147
/>
148148
<motion.div
149149
className={cn(
150-
"shrink-0 flex-1",
151-
"cursor-pointer flex items-center transition-all duration-300",
150+
"flex-1",
151+
"cursor-pointer flex items-center transition-all duration-300 overflow-hidden",
152152
{
153153
"flex-1": isTabListOpen,
154154
},
155155
)}
156-
style={{ transformOrigin: "left" }}
156+
style={{
157+
transformOrigin: "left",
158+
}}
157159
key={id}
158-
transition={{ duration: 0.3, ease: "easeInOut" }}
160+
transition={{
161+
duration: 0.3,
162+
ease: "easeInOut",
163+
}}
159164
>
160-
<p className="w-full text-xs line-clamp-1">{name}</p>
165+
<p className="w-full text-xs truncate line-clamp-1">{name}</p>
161166
</motion.div>
162167
<Tooltip>
163168
<TooltipTrigger asChild>

src/renderer/src/components/app/tab-sidebar/vertical/TabItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ const TabItem = memo(({ id, index }: Props) => {
137137
>
138138
<CollectionTabType
139139
haveChildren={Boolean(children)}
140-
isShort={!isTabListOpen}
140+
isShort={true}
141141
method={method}
142142
isFlexibleSize={false}
143143
/>

0 commit comments

Comments
 (0)