Skip to content

Commit d8eda97

Browse files
refactor(site): Redesign the agent row (#7226)
1 parent a86830a commit d8eda97

File tree

12 files changed

+568
-501
lines changed

12 files changed

+568
-501
lines changed

site/src/components/AppLink/AppLink.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ export const AppLink: FC<AppLinkProps> = ({
8484

8585
const button = (
8686
<Button
87-
size="small"
8887
startIcon={icon}
8988
endIcon={isPrivateApp ? undefined : <ShareIcon app={app} />}
9089
className={styles.button}
@@ -136,9 +135,18 @@ const useStyles = makeStyles((theme) => ({
136135
button: {
137136
whiteSpace: "nowrap",
138137
backgroundColor: theme.palette.background.default,
138+
padding: theme.spacing(0, 3),
139+
height: 44,
140+
borderRadius: 6,
139141

140142
"&:hover": {
141-
backgroundColor: `${theme.palette.background.default} !important`,
143+
backgroundColor: `${theme.palette.background.paper} !important`,
144+
},
145+
146+
"& .MuiButton-startIcon": {
147+
width: 16,
148+
height: 16,
149+
marginRight: theme.spacing(1.5),
142150
},
143151
},
144152

site/src/components/Logs/Logs.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const Logs: FC<React.PropsWithChildren<LogsProps>> = ({
4141
? idx + 1
4242
: dayjs(line.time).format(`HH:mm:ss.SSS`)}
4343
</span>
44-
<span className={styles.space}>&nbsp;&nbsp;&nbsp;&nbsp;</span>
44+
<span className={styles.space} />
4545
</>
4646
)}
4747
<span>{line.output}</span>
@@ -76,7 +76,7 @@ export const LogLine: FC<{
7676
<span className={styles.time}>
7777
{number ? number : dayjs(line.time).format(`HH:mm:ss.SSS`)}
7878
</span>
79-
<span className={styles.space}>&nbsp;&nbsp;&nbsp;&nbsp;</span>
79+
<span className={styles.space} />
8080
</>
8181
)}
8282
<span
@@ -96,7 +96,6 @@ const useStyles = makeStyles<
9696
>((theme) => ({
9797
root: {
9898
minHeight: 156,
99-
fontSize: 13,
10099
padding: theme.spacing(2, 0),
101100
borderRadius: theme.shape.borderRadius,
102101
overflowX: "auto",
@@ -107,12 +106,14 @@ const useStyles = makeStyles<
107106
},
108107
line: {
109108
wordBreak: "break-all",
109+
display: "flex",
110+
fontSize: 14,
110111
color: theme.palette.text.primary,
111112
fontFamily: MONOSPACE_FONT_FAMILY,
112113
height: ({ lineNumbers }) => (lineNumbers ? logLineHeight : "auto"),
113114
// Whitespace is significant in terminal output for alignment
114115
whiteSpace: "pre",
115-
padding: theme.spacing(0, 3),
116+
padding: theme.spacing(0, 4),
116117

117118
"&.error": {
118119
backgroundColor: theme.palette.error.dark,
@@ -128,6 +129,9 @@ const useStyles = makeStyles<
128129
},
129130
space: {
130131
userSelect: "none",
132+
width: theme.spacing(3),
133+
display: "block",
134+
flexShrink: 0,
131135
},
132136
time: {
133137
userSelect: "none",

site/src/components/PortForwardButton/PortForwardButton.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import Link from "@material-ui/core/Link"
33
import Popover from "@material-ui/core/Popover"
44
import { makeStyles } from "@material-ui/core/styles"
55
import TextField from "@material-ui/core/TextField"
6-
import OpenInNewOutlined from "@material-ui/icons/OpenInNewOutlined"
76
import { Stack } from "components/Stack/Stack"
87
import { useRef, useState, Fragment } from "react"
98
import { colors } from "theme/colors"
@@ -149,8 +148,8 @@ export const PortForwardButton: React.FC<PortForwardButtonProps> = (props) => {
149148
return (
150149
<>
151150
<Button
151+
variant="outlined"
152152
className={styles.button}
153-
startIcon={<OpenInNewOutlined />}
154153
size="small"
155154
ref={anchorRef}
156155
onClick={() => {
@@ -211,11 +210,10 @@ const useStyles = makeStyles((theme) => ({
211210
},
212211

213212
button: {
214-
whiteSpace: "nowrap",
215-
backgroundColor: theme.palette.background.default,
216-
217-
"&:hover": {
218-
backgroundColor: `${theme.palette.background.default} !important`,
219-
},
213+
fontSize: 12,
214+
fontWeight: 500,
215+
height: theme.spacing(4),
216+
minHeight: theme.spacing(4),
217+
borderRadius: 4,
220218
},
221219
}))

0 commit comments

Comments
 (0)