Browse Source

fix: ui bugs

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

+ 1 - 4
client/src/components/grid/Table.tsx

@@ -134,6 +134,7 @@ const EnhancedTable: FC<TableType> = props => {
                           <Checkbox
                             checked={isItemSelected}
                             color="primary"
+                            size="small"
                             disabled={disableSelect}
                             inputProps={{
                               'aria-labelledby': labelId,
@@ -162,8 +163,6 @@ const EnhancedTable: FC<TableType> = props => {
                                     textOverflow: 'ellipsis',
                                     whiteSpace: 'nowrap',
                                     maxWidth: tableCellMaxWidth,
-                                    fontSize: '14px',
-                                    lineHeight: '20px',
                                   },
                                 }),
                                 (theme: Theme) => ({
@@ -206,8 +205,6 @@ const EnhancedTable: FC<TableType> = props => {
                                     textOverflow: 'ellipsis',
                                     whiteSpace: 'nowrap',
                                     maxWidth: tableCellMaxWidth,
-                                    fontSize: '14px',
-                                    lineHeight: '20px',
                                   },
                                 }),
                                 (theme: Theme) => ({

+ 1 - 0
client/src/components/grid/TableHead.tsx

@@ -66,6 +66,7 @@ const EnhancedTableHead: FC<TableHeadType> = props => {
           <TableCell padding="checkbox" role="cell">
             <Checkbox
               color="primary"
+              size="small"
               indeterminate={numSelected > 0 && numSelected < rowCount}
               checked={rowCount > 0 && numSelected === rowCount}
               onChange={onSelectAllClick}

+ 2 - 3
client/src/pages/databases/collections/Collections.tsx

@@ -325,7 +325,6 @@ const Collections = () => {
                 width: 150,
                 overflow: 'hidden',
                 textOverflow: 'ellipsis',
-                height: 20,
                 textDecoration: 'none',
               }}
               title={collection_name}
@@ -452,7 +451,7 @@ const Collections = () => {
       ),
       formatter(v) {
         return (
-          <Typography variant="body1">
+          <Typography variant="body1" component="div">
             <Aliases aliases={v.aliases} collection={v} />
           </Typography>
         );
@@ -500,7 +499,7 @@ const Collections = () => {
           onPageChange={handlePageChange}
           rowsPerPage={pageSize}
           tableHeaderHeight={46}
-          rowHeight={43}
+          rowHeight={41}
           setRowsPerPage={handlePageSize}
           isLoading={loading}
           handleSort={handleGridSort}

+ 1 - 3
client/src/pages/databases/collections/data/CollectionData.tsx

@@ -26,8 +26,6 @@ import {
   MenuItem,
   FormControl,
   InputLabel,
-  Checkbox,
-  ListItemText,
 } from '@mui/material';
 import EmptyDataDialog from '@/pages/dialogs/EmptyDataDialog';
 import ImportSampleDialog from '@/pages/dialogs/ImportSampleDialog';
@@ -615,7 +613,7 @@ const CollectionData = (props: CollectionDataProps) => {
             rows={queryResult.data}
             rowCount={total}
             tableHeaderHeight={46}
-            rowHeight={43}
+            rowHeight={41}
             selected={selectedData}
             setSelected={onSelectChange}
             page={currentPage}

+ 2 - 0
client/src/pages/user/User.tsx

@@ -258,6 +258,8 @@ const Users = () => {
         primaryKey="username"
         showPagination={true}
         selected={selectedUser}
+        tableHeaderHeight={46}
+        rowHeight={39}
         setSelected={handleSelectChange}
         page={currentPage}
         onPageChange={handlePageChange}

+ 2 - 2
client/src/styles/theme.ts

@@ -184,8 +184,8 @@ const typography = {
   },
   mono: {
     fontFamily: 'IBM Plex Mono, monospace',
-    fontSize: 12,
-    lineHeight: 1.5,
+    fontSize: 13,
+    lineHeight: 1.8,
   },
   button: {
     textTransform: 'initial',