Skip to content

Commit 35e7157

Browse files
authored
Make screenshot fill up the whole browser panel (All-Hands-AI#1846)
* fix frontend browsing screenshot, allow link following in MD * make screenshot auto scale and fill the whole browser panel
1 parent 0cb707b commit 35e7157

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

frontend/src/components/Browser.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ function Browser(): JSX.Element {
2424
</div>
2525
<div className="overflow-y-auto grow scrollbar-hide rounded-xl">
2626
{screenshotSrc ? (
27-
<img src={imgSrc} className="rounded-xl" alt="Browser Screenshot" />
27+
<img
28+
src={imgSrc}
29+
style={{ objectFit: "contain", width: "100%", height: "auto" }}
30+
className="rounded-xl"
31+
alt="Browser Screenshot"
32+
/>
2833
) : (
2934
<div className="flex flex-col items-center h-full justify-center">
3035
<IoIosGlobe size={100} />

0 commit comments

Comments
 (0)