Skip to content

Commit

Permalink
fix height of server card
Browse files Browse the repository at this point in the history
  • Loading branch information
liaotonglang committed Mar 14, 2023
1 parent d00f0c4 commit d1281d0
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions src/view/ServerCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,19 +162,21 @@ export function ServerCard(props: ServerCardProps) {
sx={{ cursor: 'move' }} ref={drop}>
<Box ref={dragRef}>
<Typography color={colorByOnline()} variant='h6'>{server.name}</Typography>
{!mouseEnter && <Typography variant='caption' >{server.username + "@" + server.host + ":" + server.port}</Typography>}
{mouseEnter && <Box sx={{ cursor: 'default' }}>
<Box>
<Box display='flex' >
<IconButton sx={{ cursor: 'move' }}> <DragIndicatorIcon color="disabled" /> </IconButton>
<IconButton onClick={() => gotoEditServer()}><EditIcon /> </IconButton>
<IconButton onClick={() => startSftp()} ><DriveFileMoveIcon /> </IconButton>
<IconButton sx={{ mr: 'auto' }} onClick={() => startShell()}><TerminalIcon /> </IconButton>

<IconButton onClick={() => deleteServer()} sx={{ float: 'right' }}><DeleteIcon /> </IconButton>
<Box sx={{ height: '30px' }}>
{!mouseEnter && <Typography variant='caption' >{server.username + "@" + server.host + ":" + server.port}</Typography>}
{mouseEnter && <Box sx={{ cursor: 'default' }}>
<Box>
<Box display='flex' >
<IconButton sx={{ cursor: 'move' }}> <DragIndicatorIcon color="disabled" /> </IconButton>
<IconButton onClick={() => gotoEditServer()}><EditIcon /> </IconButton>
<IconButton onClick={() => startSftp()} ><DriveFileMoveIcon /> </IconButton>
<IconButton sx={{ mr: 'auto' }} onClick={() => startShell()}><TerminalIcon /> </IconButton>

<IconButton onClick={() => deleteServer()} sx={{ float: 'right' }}><DeleteIcon /> </IconButton>
</Box>
</Box>
</Box>
</Box>}
</Box>}
</Box>
</Box>

<Box>
Expand Down

0 comments on commit d1281d0

Please sign in to comment.