Эх сурвалжийг харах

Make screenshot fill up the whole browser panel (#1846)

* fix frontend browsing screenshot, allow link following in MD

* make screenshot auto scale and fill the whole browser panel
Frank Xu 1 жил өмнө
parent
commit
35e7157565

+ 6 - 1
frontend/src/components/Browser.tsx

@@ -24,7 +24,12 @@ function Browser(): JSX.Element {
       </div>
       <div className="overflow-y-auto grow scrollbar-hide rounded-xl">
         {screenshotSrc ? (
-          <img src={imgSrc} className="rounded-xl" alt="Browser Screenshot" />
+          <img
+            src={imgSrc}
+            style={{ objectFit: "contain", width: "100%", height: "auto" }}
+            className="rounded-xl"
+            alt="Browser Screenshot"
+          />
         ) : (
           <div className="flex flex-col items-center h-full justify-center">
             <IoIosGlobe size={100} />