Skip to content

Commit

Permalink
Take full page screenshots #143
Browse files Browse the repository at this point in the history
Added the fullPage flag to take full screen screenshots
updated the UI accordingly to properly show the screenshots instead of scaling it down
  • Loading branch information
kamtschatka committed May 10, 2024
1 parent cbc8dde commit 7d6960e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/web/components/dashboard/preview/LinkContentSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ function ScreenshotSection({ link }: { link: ZBookmarkedLink }) {
return (
<div className="relative h-full min-w-full">
<Image
fill={true}
alt="screenshot"
src={`/api/assets/${link.screenshotAssetId}`}
className="object-contain"
width={0}
height={0}
sizes="100vw"
style={{ width: '100%', height: 'auto' }}
/>
</div>
);
Expand Down
1 change: 1 addition & 0 deletions apps/workers/crawlerWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ async function crawlPage(jobId: string, url: string) {
// If you change this, you need to change the asset type in the store function.
type: "png",
encoding: "binary",
fullPage: true,
}),
]);
logger.info(
Expand Down

0 comments on commit 7d6960e

Please sign in to comment.