Browse Source

Registry hotfix (#3627)

sdess09 2 years ago
parent
commit
854569407e

+ 4 - 1
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`

+ 2 - 0
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;

+ 12 - 13
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;

+ 4 - 2
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;
 `;