Browse Source

ui: update create collection ui

Signed-off-by: ryjiang <jiangruiyi@gmail.com>
ryjiang 1 month ago
parent
commit
3ddf59d953

+ 1 - 1
client/src/pages/dialogs/CreateCollectionDialog.tsx

@@ -444,7 +444,7 @@ const CreateCollectionDialog: FC<CollectionCreateProps> = ({ onCreate }) => {
       confirmLabel={btnTrans('create')}
       handleConfirm={handleCreateCollection}
       confirmDisabled={disabled || !fieldsValidation}
-      sx={{ width: 900 }}
+      sx={{ width: 980 }}
     >
       <Box sx={{ display: 'flex', gap: 2, flexDirection: 'column' }}>
         <Box sx={{ display: 'flex', gap: 2, width: '100%' }}>

+ 2 - 0
client/src/pages/dialogs/create/ElementTypeSelector.tsx

@@ -34,6 +34,8 @@ const ElementTypeSelector: FC<ElementTypeSelectorProps> = ({
         display: 'flex',
         flexDirection: 'column',
         width: 120,
+        position: 'relative',
+        top: '-4px',
         ...sx,
       }}
     >

+ 2 - 0
client/src/pages/dialogs/create/PrimaryKeyTypeSelector.tsx

@@ -37,6 +37,8 @@ const PrimaryKeyTypeSelector: FC<PrimaryKeyTypeSelectorProps> = ({
         display: 'flex',
         flexDirection: 'column',
         width: 140,
+        position: 'relative',
+        top: '-4px',
         ...sx,
       }}
     >

+ 2 - 0
client/src/pages/dialogs/create/ScalarTypeSelector.tsx

@@ -26,6 +26,8 @@ const ScalarTypeSelector: FC<ScalarTypeSelectorProps> = ({
         display: 'flex',
         flexDirection: 'column',
         width: 140,
+        position: 'relative',
+        top: '-4px',
         ...sx,
       }}
     >

+ 2 - 0
client/src/pages/dialogs/create/VectorTypeSelector.tsx

@@ -26,6 +26,8 @@ const VectorTypeSelector: FC<VectorTypeSelectorProps> = ({
         display: 'flex',
         flexDirection: 'column',
         width: 140,
+        position: 'relative',
+        top: '-4px',
         ...sx,
       }}
     >

+ 2 - 2
client/src/pages/dialogs/create/rows/ScalarFieldRow.tsx

@@ -76,9 +76,9 @@ const ScalarFieldRow: FC<ScalarFieldRowProps> = ({
     borderRadius: 4,
     display: 'flex',
     flexDirection: 'column',
-    paddingLeft: 0,
+    padding: 1,
     paddingTop: 0,
-    paddingRight: 2,
+    paddingBottom: 0,
     minHeight: 44,
     alignSelf: 'flex-start',
     alignItems: 'flex-start',