Skip to content

Commit d1281d0

Browse files
author
liaotonglang
committed
fix height of server card
1 parent d00f0c4 commit d1281d0

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

src/view/ServerCard.tsx

+14-12
Original file line numberDiff line numberDiff line change
@@ -162,19 +162,21 @@ export function ServerCard(props: ServerCardProps) {
162162
sx={{ cursor: 'move' }} ref={drop}>
163163
<Box ref={dragRef}>
164164
<Typography color={colorByOnline()} variant='h6'>{server.name}</Typography>
165-
{!mouseEnter && <Typography variant='caption' >{server.username + "@" + server.host + ":" + server.port}</Typography>}
166-
{mouseEnter && <Box sx={{ cursor: 'default' }}>
167-
<Box>
168-
<Box display='flex' >
169-
<IconButton sx={{ cursor: 'move' }}> <DragIndicatorIcon color="disabled" /> </IconButton>
170-
<IconButton onClick={() => gotoEditServer()}><EditIcon /> </IconButton>
171-
<IconButton onClick={() => startSftp()} ><DriveFileMoveIcon /> </IconButton>
172-
<IconButton sx={{ mr: 'auto' }} onClick={() => startShell()}><TerminalIcon /> </IconButton>
173-
174-
<IconButton onClick={() => deleteServer()} sx={{ float: 'right' }}><DeleteIcon /> </IconButton>
165+
<Box sx={{ height: '30px' }}>
166+
{!mouseEnter && <Typography variant='caption' >{server.username + "@" + server.host + ":" + server.port}</Typography>}
167+
{mouseEnter && <Box sx={{ cursor: 'default' }}>
168+
<Box>
169+
<Box display='flex' >
170+
<IconButton sx={{ cursor: 'move' }}> <DragIndicatorIcon color="disabled" /> </IconButton>
171+
<IconButton onClick={() => gotoEditServer()}><EditIcon /> </IconButton>
172+
<IconButton onClick={() => startSftp()} ><DriveFileMoveIcon /> </IconButton>
173+
<IconButton sx={{ mr: 'auto' }} onClick={() => startShell()}><TerminalIcon /> </IconButton>
174+
175+
<IconButton onClick={() => deleteServer()} sx={{ float: 'right' }}><DeleteIcon /> </IconButton>
176+
</Box>
175177
</Box>
176-
</Box>
177-
</Box>}
178+
</Box>}
179+
</Box>
178180
</Box>
179181

180182
<Box>

0 commit comments

Comments
 (0)