From c2f6de875a03485680476b7e3a0dd630afd0ab35 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Fri, 17 Mar 2023 17:32:24 -0700 Subject: [PATCH] Dropdown highlight --- src-tauri/icons/icon.icns | Bin 616124 -> 616124 bytes src-web/components/Sidebar.tsx | 10 +++++++++- src-web/components/core/Dropdown.tsx | 6 +++--- src-web/components/core/Editor/Editor.css | 2 +- tailwind.config.cjs | 1 + 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src-tauri/icons/icon.icns b/src-tauri/icons/icon.icns index ed1d9efd0c2ce847178939fe03225f3efc974258..e7cf6f378dc2c9696bcdac454a1c8e62645aff80 100644 GIT binary patch delta 101 zcmdmUR&~!=RgTQ$ykZ8@3???c!L|qe zo3F%nv3G1foXp7v7TW_(a^%cy-zv<$eXB6X*JaHOH@7$3Wc;>lyZ=d!+_{@8=Ca!W E085xFA^-pY delta 95 zcmV-l0HFW8%_Y3eB?xI_ZgT($X1urUp#*ZBx3?+@1w4mQ<_5P><_GttfeVET0fh?! zg$o0<3k05Rx1g8=P6@ZEZ3G7dw^M)wPZ)<_KLxj7KL+xqx3F;pr49izxACC_Y@H_^ BB{2X1 diff --git a/src-web/components/Sidebar.tsx b/src-web/components/Sidebar.tsx index 816ba251..0abb65bb 100644 --- a/src-web/components/Sidebar.tsx +++ b/src-web/components/Sidebar.tsx @@ -155,6 +155,7 @@ function SidebarItem({ request, active }: { request: HttpRequest; active: boolea }} to={`/workspaces/${request.workspaceId}/requests/${request.id}`} onDoubleClick={() => setEditing(true)} + onClick={active ? () => setEditing(true) : undefined} justify="start" > {editing ? ( @@ -175,7 +176,14 @@ function SidebarItem({ request, active }: { request: HttpRequest; active: boolea }} /> ) : ( - {request.name || request.url} + + {request.name || request.url || 'New Request'} + )} (function ItemInner( ref={ref} className={classnames( className, - 'outline-none px-2 py-1.5 flex items-center text-sm text-gray-700 whitespace-nowrap pr-4', - !noHover && 'focus:bg-gray-50 focus:text-gray-900 rounded', + 'min-w-[8rem] outline-none px-2 h-7 flex items-center text-sm text-gray-700 whitespace-nowrap pr-4', + !noHover && 'focus:bg-highlight focus:text-gray-900 rounded', )} {...props} > diff --git a/src-web/components/core/Editor/Editor.css b/src-web/components/core/Editor/Editor.css index fe496669..03c5025e 100644 --- a/src-web/components/core/Editor/Editor.css +++ b/src-web/components/core/Editor/Editor.css @@ -163,7 +163,7 @@ } & > ul > li[aria-selected] { - @apply bg-gray-100 text-gray-900; + @apply bg-highlight text-gray-900; } & > ul > li:hover { diff --git a/tailwind.config.cjs b/tailwind.config.cjs index 27237f61..34be4811 100644 --- a/tailwind.config.cjs +++ b/tailwind.config.cjs @@ -21,6 +21,7 @@ module.exports = { "5xl": "3.052rem" }, colors: { + highlight: "hsl(var(--color-gray-200) / 0.3)", transparent: "transparent", white: "hsl(0 100% 100% / )", black: "hsl(0 100% 0% / )",