From 854569407e50456f26ddd219c03e956aee7b73bb Mon Sep 17 00:00:00 2001 From: sdess09 <37374498+sdess09@users.noreply.github.com> Date: Thu, 21 Sep 2023 18:21:40 -0400 Subject: [PATCH] Registry hotfix (#3627) --- .../components/image-selector/ImageList.tsx | 5 +++- .../image-selector/ImageSelector.tsx | 2 ++ .../src/components/image-selector/TagList.tsx | 25 +++++++++---------- .../components/RegistryImageList.tsx | 6 +++-- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/dashboard/src/components/image-selector/ImageList.tsx b/dashboard/src/components/image-selector/ImageList.tsx index c18f8f65c1..83f1b470c6 100644 --- a/dashboard/src/components/image-selector/ImageList.tsx +++ b/dashboard/src/components/image-selector/ImageList.tsx @@ -315,7 +315,8 @@ const ImageItem = styled.div<{ lastItem: boolean; isSelected: boolean }>` color: #ffffff; align-items: center; padding: 10px 0px; - cursor: pointer; + user-select: text; + cursor: text; background: ${(props) => (props.isSelected ? "#ffffff11" : "")}; :hover { background: #ffffff22; @@ -341,6 +342,8 @@ const LoadingWrapper = styled.div` font-size: 13px; justify-content: center; color: #ffffff44; + user-select: text; + cursor: text; `; const ExpandedWrapper = styled.div` diff --git a/dashboard/src/components/image-selector/ImageSelector.tsx b/dashboard/src/components/image-selector/ImageSelector.tsx index f0a421147b..64ce28ee9b 100644 --- a/dashboard/src/components/image-selector/ImageSelector.tsx +++ b/dashboard/src/components/image-selector/ImageSelector.tsx @@ -242,6 +242,8 @@ const ImageItem = styled.div` width: 100%; font-size: 13px; border-bottom: 1px solid + user-select: text; + cursor: text; ${(props: { lastItem: boolean; isSelected: boolean }) => props.lastItem ? "#00000000" : "#606166"}; color: #ffffff; diff --git a/dashboard/src/components/image-selector/TagList.tsx b/dashboard/src/components/image-selector/TagList.tsx index 64d1e91596..d82bbbd316 100644 --- a/dashboard/src/components/image-selector/TagList.tsx +++ b/dashboard/src/components/image-selector/TagList.tsx @@ -12,19 +12,19 @@ var ecrRepoRegex = /(^[a-zA-Z0-9][a-zA-Z0-9-_]*)\.dkr\.ecr(\-fips)?\.([a-zA-Z0-9 type PropsType = | { - setSelectedTag: (x: string) => void; - selectedTag: string; - selectedImageUrl: string; - registryId: number; - readOnly?: boolean; - } + setSelectedTag: (x: string) => void; + selectedTag: string; + selectedImageUrl: string; + registryId: number; + readOnly?: boolean; + } | { - setSelectedTag?: (x: string) => void; - selectedTag: string; - selectedImageUrl: string; - registryId: number; - readOnly: true; - }; + setSelectedTag?: (x: string) => void; + selectedTag: string; + selectedImageUrl: string; + registryId: number; + readOnly: true; + }; type StateType = { loading: boolean; @@ -196,7 +196,6 @@ const TagName = styled.div<{ lastItem?: boolean; isSelected?: boolean }>` border-bottom: 1px solid ${(props) => (props.lastItem ? "#00000000" : "#606166")}; color: #ffffff; - user-select: none; align-items: center; padding: 10px 0px; cursor: pointer; diff --git a/dashboard/src/main/home/onboarding/components/RegistryImageList.tsx b/dashboard/src/main/home/onboarding/components/RegistryImageList.tsx index b7c943236f..c1ece3d9ab 100644 --- a/dashboard/src/main/home/onboarding/components/RegistryImageList.tsx +++ b/dashboard/src/main/home/onboarding/components/RegistryImageList.tsx @@ -32,7 +32,7 @@ const RegistryImageList: React.FC<{ setImageList(res.data); }) .catch(console.error); - return () => {}; + return () => { }; }, []); const getIcon = () => { @@ -90,7 +90,8 @@ const ImageRow = styled.div<{ isLast?: boolean }>` align-items: center; font-size: 13px; padding: 12px; - + user-select: text; + > img { width: 20px; filter: grayscale(100%); @@ -105,4 +106,5 @@ const ImageList = styled.div` overflow-y: auto; background: #ffffff11; margin: 20px 0 20px; + user-select: text; `;